Getting it right the first time is a very hard game to win. It’s best to save some of your energy for the times that really count. It’s always interesting to me when coworkers exclaim that doing the right thing is too hard. Reminds me of myself at age nine trying to get out of chores. More seriously though, “if it hurts stop doing it” is how dumb animals think. Pain is information. Ignoring it is dumb. Almost as dumb as giving up is.
Just last week I was having a hell of a time getting some code to work. Running into a wall. Okay fine, I’ll write more tests. Still struggling. Oh hey, you know what would make this way easier? If I rearranged this code in the manner I thought about this morning but decided to not work on until tomorrow.
If eating the code is difficult, there’s a point of very quickly diminishing returns where adding more logic to the tests is making things worse, and you should think about whether The code is too complicated to test. Maybe you need to remove code, instead of adding it twice.
"Getting it right the first time is a very hard game to win."
I cannot disagree if it is one's first time yet this is my sixth and I have no losses to date. I have nothing but time and so in that time I will see how this game plays out.
Everything else is just annoyance, and lumping those in with the others ends up pulling attention away from the ones that really matter, meaning those solutions get compromised on quality.
Leaving space for a solution is not the same thing as creating an abstraction for a solution, and most people don't get that. Architectural astronauts elevate this blind spot to performance art, and none more profoundly than J2EE architects, as lampooned by Enterprise FizzBuzz: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
I wonder sometimes if some of my former coworkers' cognitive dissonance ends at the office door, or if at home they hang empty picture frames on their walls as placeholders for when they eventually find some art they like, put armchair-shaped boxes labeled "Chair" in their living rooms, dolls in empty cribs and stuffed animals in empty pet beds.