Over-engineering considered useful
isbullsh.it
isbullsh.it
Also, completely rewriting things is a major skill for a professional. Churning out great code, and doing it fast and with few bugs is worth a lot in the industry
Applying learning to a new project, now that is something different.
If a re-write saves more time than it takes, then it should be considered. If it takes you a week to implement something that should be done in a day, and you realize that you'll be doing lots of those things over the course of the next few years, it's probably worth considering a re-write. It's not a solution to every problem, and it's probably done more often than it's not, but there are certainly times when it pays to do it. It's easy to have simple rules that say don't do things. It's much harder to make the best decision for the business. Just because some businesses in the past have made the wrong decision with regards to re-writes doesn't mean it's always wrong.
This is commonly trotted out to discourage re-writes, but how does that square with another piece of common advice: "build one to throw away" ?
I'm genuinely curious, and I'm not trying to pick on you specifically. There are just many different situations where one or the other makes sense, so I don't think it's so cut and dried.
If you've written a program, but it doesn't work yet, and you've realized you made major architectural mistakes or whatever, feel free to rewrite from scratch.
If you've written a program and it's been in real use for a while, solving real problems for a lot of happy users, that means it embodies a lot of knowledge that will be difficult to re-create from scratch; in that case, think very carefully before embarking on a rewrite, and look hard for a way forward that will preserve that knowledge.
That said, when systems need to be re-engineered, completely thrown out and re-written, or a new feature needs to be cranked out to meet a business need, the developers who can design and create large coherent systems quickly is irreplaceable or very expensive. Constantly throwing your code out gives you this valuable experience.
I don't think we know enough about solving problems with software to detect over- and under-engineering before ... I don't know. Before we need to? Before users complain that it doesn't work? Before MegaSoftCorp spends a few million too much?
Which brings back to why we have a safety factor at all. The only reason why we have it is because of uncertainty. The real why we have safety factor at all is because we don't know enough.
I have a strong personal opinion of when things become over-engineered, but that means little.
I've worked for smaller companies, which tend to under-engineer due to time restraints.
And I've worked for large corporations with such overkill process that it is amazing anything gets shipped ever. And yet it does, it takes almost forever, and costs far more than it should, but it does eventually ship.
Discussing "over-engineering" may be fine for general interest communities. But I think on HN we should aim higher. I'd love to have a rigorous discussion on how we can identify designs as either over or under engineered.
"over-engineering" was not the point anyway. The title is a lie. The point was: dont be afraid of making mistakes (Over-engineering and the likes) when you can afford to, so you can learn from them and aim at high quality discussions on HN.
Another kind of over-engineering is speculative optimization (often called "Premature Optimization", but I like to emphasize the speculative nature of it, because that's the heart of the issue). Am I working to make the system faster in response to actual evidence of a performance problem, or am I just guessing about performance?
Over-engineering isn't always bad. It's all about predicting the future and weighing risks, with everything that entails. It's hard, but it's a fundamental part of design, and of life.
Whenever I'm unsure about whether a particular speculative generality or optimization is justified, I try to step back and find implicit assumptions. I try to turn "This might help some day" into "I'll need this if XYZ happens". If I can't do that, it's a bad sign.
And I agree with the original author's point: making mistakes in places where you can afford to fail, or where you can afford to recover, is a great way to learn.
"A scrupulous writer, in every sentence that he writes, will ask himself at least four questions, thus: 1. What am I trying to say? 2. What words will express it? 3. What image or idiom will make it clearer? 4. Is this image fresh enough to have an effect?"
- George Orwell
The first two apply to composition in a formal language. Over-engineer the structure of the thing but be as merciless as Hemingway when actually composing your thoughts and sentences. Eschew excessive lines and actual tokens. Those are the byproducts of the rushed and/or cluttered mind (which commercial projects may necessitate ;)
i know i wouldnt have been as completely allergic to complexity as I am, had it not been for some very important life lessons on the subject.