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

    Here is an observation about writing software that may be so general as to be incomprehensible.

    When you go from having one of a thing to having two of a thing, it is easier and possibly even more readable to just duplicate the thing instead of creating a generalized system that can handle N things.

    Once you get to having three of a thing, it is better in all ways to simply have a generalized system that can handle N things.

    But you don't *do* this when N reaches 3. You wait until N reaches 4

    💬 1🔄 64⭐ 175

Replies

  • 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

    💬 0🔄 0⭐ 25
  • 💬 1🔄 0⭐ 0
  • Nov 15, 2026, 3:35 PM

    @benpate @mcc I'm finding, as I get older, I've got less and less tolerance for duplication & prefer everything atomic. But then, I mostly work on complex code stacks & navigating them & recognising *when* duplications occur is the fundamental challenge.

    💬 0🔄 0⭐ 0