Login
You're viewing the scoat.es public feed.
  • Nov 14, 2026, 10:16 PM

    And doing the "make this work for a generalizable N things" refactor is easier when going directly from 1 to N than it is when you're going from 3 things to N things

    💬 2🔄 0⭐ 0

Replies

  • 💬 0🔄 0⭐ 0
  • Nov 14, 2026, 10:26 PM

    @mcc not following this part. I've worked in a number of codebases that introduced N=1 abstractions early on that never really got expanded on, which become a big pain to maintain over time because its never clear exactly *what* you're trying to abstract without multiple concrete examples

    💬 1🔄 0⭐ 0
  • Nov 14, 2026, 10:27 PM

    @bmartin427 How about this: It's easier to conceptualize the abstraction when you have N=3, but it's easier to perform the code-level refactor when you have N=1, and that means no matter what the value of N is when you do the change someone will be unhappy

    💬 2🔄 0⭐ 0
  • Nov 14, 2026, 10:43 PM

    @mcc @bmartin427 I usually wait for N=3. I get unhappy with premature generalisation which results in large complex frameworks, holding up shipping for months, for something where ... in actual real life N never ends up getting to be more than 1.

    💬 0🔄 0⭐ 0
  • Nov 15, 2026, 12:16 AM

    @mcc @bmartin427 this I agree with. I generally am cautious about early abstractions because I've worked on a lot of codebases with programmers who were *heavily* invested into them, and pushed for them to the point where they became leaky and fragile. I think my biases tend to lead towards more readable and self documenting code.

    HOWEVER, they indisputably make me spend more time refactoring and make some of my refactors more involved.

    💬 0🔄 0⭐ 0