'Over-engineering' is everyone's favorite punching bag, but I bet your codebase suffers from under-engineering instead

Posted by AtomicScience@reddit | ExperiencedDevs | View on Reddit | 202 comments

There is no shortage of articles and videos and whatever talking about the dangers of over-engineering, and there are plenty of catchy acronyms too - YAGNI, KISS, you name it. And while few of them are really wrong, I think the problem is with the fact that we focus on this problem much more than we should, all while neglecting under-engineering, which is much more prevalent and much more dangerous

I don't know about you (despite the clickbaity title claiming otherwise), but I can confidently say for myself - all the projects I worked on suffered from under-engineering, to a greater or a lesser degree. That was the real problem, and I can't really recall thinking 'Yeah, they surely wasted too much good thought on this one' - it was always 'Did anyone think at all when writing this?'

We all know how under-engineering manifests: sneaky shortcuts through architectural boundaries, god classes, accidental, implicit coupling, silenced compiler warnings all over the place - you name it

The main reason for under-engineered solutions is tactical programming - small, myopic changes that are done as system evolves, with little 'strategic' thinking

Yes, you need to be strategic even when doing the most seemingly tactical changes ever, because not only 'proper-engineering' is hard in and of itself, it has little tolerance for lapses too - you prematurely wrap up a task to end your day early, promise yourself to clean it up later (lol) and you just broke a window - and others will likely follow suit

Also, in a codebase that's deep into under-engineering territory, it's hard to bring yourself to do good work, because you will feel like a sucker cleaning up after all the 'tacticians' who've been here before - that's a textbook negative feedback loop

---

I understand why we mostly talk about over-engineering - it's easy to point fingers at guys who introduce load balancing for an internal admin service or whatever, there is always a clear villain in that case. But under-engineering creeps in at a pace so slow, you only realize you found yourself in a 'death by a thousand bandaids' situation when it's too late

Maybe I'm just too young and read too many smart books, and care a tad too much about shareholders' quarterly revenue, but isn't that common sense - you do diligent work on a weekday so that it doesn't come around and bite your ass on 3am Saturday or when you need to complete some 'needed yesterday' feature?

What do you think?