3 ms·
"most software is written to solve a particular problem and doesn't need to be reused" Sure. But most software needs to be maintained, and usually over a way l
by rickmb 15y ago
"most software is written to solve a particular problem and doesn't need to be reused"
Sure. But most software needs to be maintained, and usually over a way longer period than the original authors imagined (we're sometimes even talking decades here).
And not only that: that "particular problem" your code solved? Well guess what: the problem changed. Because that's what happens in the real world, nothing is ever static. Shit happens, things change, that's the only constant.
Most software development in the real world is not writing fresh new code in greenfield projects. It's trying to keep the old crap running, old crap written by coders who thought they only needed to solve that one particular problem once.
So no, it's not fine that most code is an unmaintainable mess. It's the primary reason why most software work outside the small world of internet startups mainly consists of digging through steaming piles of crap instead of the joy of writing code.
YAGNI does not stand for "I'm not gonna need it, so fuck everybody else".