5 ms·
After thirty years of software development, the one principle that keeps recurring is Donald Knuth's "Premature optimization is the root of all evil". It appli
by foxylad 7y ago
After thirty years of software development, the one principle that keeps recurring is Donald Knuth's "Premature optimization is the root of all evil".
It applies on so many levels, including whether to go all in on any software engineering methodology. For instance, applying SOLID principles to your personal side project is counter-productive; but if it grows into a multi-developer project you might well gain efficiencies by rationalising your code structure.
- paulgrant999 7y agoI just got rejected from a job, because they wanted me to write tests, without even supplying ANY input with which to presume what types of tests would be applicable (i.e. how was the data gathered)... when I pointed out I wrote the spec-based generation hookable so that you could override it in seconds to generate any set of errors you'ld care to model, and that it was a deliberate choice to avoid premature optimization, they were not amused. I told them the toy spec they sent, would never work for testing an experienced engineer who is aware of the many specific modes of failure depending on how the system was architected. I don't get it anymore. I send beautiful, well-thought out code. And get spit in my face for the effort. Not even a first-round interview. Its like they're specifically avoiding hiring experienced engineers. It is positively, frustrating. My last two projects were so well-architected you could significantly enhance the scope of the project with a few lines of code, that literally write themselves (you know have a good code-base when it suggests an immediate, maintainable solution for feature creep, with zero uncertainty)... And yet, apparently, I'm not fit to get a coding monkey job... So I read these articles, and think? Why the fuck even bother? You don't have coders anymore. Just mediocre software engineers who think coding is 'writing tests'.
- zmmmmm 7y agoYep. As another old-timer, pretty much the only principles I have seen that consistently pay off are KISS and YAGNI. And the problem is nearly all of this SOLID type stuff is directly contrary to that.
- 13rac1 7y agoI've found it important to include the context of that quote: > We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%. That 3% can be significant.
- hinkley 7y agoYes, I’ve had to find a new job many times because we waited too long to fix real problems that hampered our ability to make progress.
- lubonay 7y agoSounds interesting, could you elaborate? Why did you have to find a new job? What were the problems that ruined your project?
- hinkley 7y agoIf my competitor can add features faster than us then they will pull ahead and there’s very little we can do about it. I’ve been on both sides of that. Sometimes on the same project (quick hacks up front leading to calcification and death). If each feature takes longer than the last one it becomes hell, and you don’t really want to stick around for that.