Rewrite vs. Evolution
Posted by mika314@reddit | programming | View on Reddit | 6 comments
There is a common wisdom in software engineering: rewriting a system is always a bad idea, and issues can always be fixed through evolutionary improvements. I no longer think this is universally true.
The idea gained traction from the Netscape story, often cited as proof that rewrites kill products. But the reality is more complicated — Microsoft was aggressively pushing Internet Explorer, Netscape was already struggling, and the rewrite was one factor among many. It also eventually produced Gecko, Mozilla, and Firefox, which still powers one of the two major browser engines today.
The argument against rewriting assumes that architectural complexity reflects real constraints. Often it doesn't. Many decisions are driven by fashion, cargo culting, and misapplied abstractions adopted as silver bullets. Early mistakes accumulate, workarounds stack on workarounds, and the system becomes increasingly hard to reason about. At some point, incremental repair becomes slower and riskier than starting over.
I saw this firsthand when the decision was made to delegate saving to a separate thread. Five years later, that turned into an untangable mess covered with locks, semaphores, and helper classes trying to tame a stream of crashes in production. Rewriting the subsystem from scratch would likely have been faster — and saved at least five times the effort spent just patching an already broken system.
That said, large systems carry real value in tribal knowledge, undocumented edge cases, and implicit constraints invisible in the code. That cost is genuine and shouldn't be dismissed.
The right takeaway from Netscape isn't "never rewrite." It's that the decision depends on whether the existing system can still be evolved within the limits of human reasoning. Sometimes rewriting is dangerous. Sometimes it's the only sane path.
programming-ModTeam@reddit
Content about AI and LLMs are considered off-topic with the sole exclusion of deeply technical content about implementation. See the AI policy. This article is also very short without much substance.
prehensilemullet@reddit
You can’t extrapolate the value of a redesign that takes one day to the redesign of an entire production system…. The larger the system, the less you can afford it and the more it’s necessary to get the high level design right from the start
Smallpaul@reddit
Related question: Are there good open source examples of very messy software that was refactored towards maintainability instead of just adding features or rewriting. Could Mozilla have achieved the same thing with a long-term, incremental refactor instead of a rewrite?
elmuerte@reddit
LibreOffice is a good example. Another good example would be what we currently call Firefox.
you-get-an-upvote@reddit
Yes, architectural mistakes can compound but features mistake fixes also accumulate over time and are much less visible. As a result, rewrites always takes significantly longer than expected.
You might think I’m crazy to claim that features are not visible. To which I can only respond: name every feature in the Photos app. Or the Facebook website. Or Gmail.
You will name maybe a dozen. I swear to you there are literally hundreds of features on these apps, and the engineer championing a rewrite, even if they try to do their homework will be missing at least half of them.
Hopefully my claim that big fixes are not very visible is easy to believe. There is no architecture that solves “why is my god damn button not showing up for Alice” and you will have to solve a whole swarm of unreproducible bugs in every rewrite. Somehow those never get mentioned in planning.
And even if you have the perfect plan I promise you that you’ll be halfway through your rewrite and the guy 1 or 2 levels above your team will ask why 5 engineers have delivered no business value for 1.5 years and the project will be “deprioritized”. Now you either have two architectures, or you got literally nothing out of your rewrite.
Is it fair to blame the senior+ engineer who championed a rewrite for business politics?
Yes, it is. That’s part of the job description.
bzbub2@reddit
this conflates the idea of large systems (with userbases and complex gui workflows that users are used to and things like this, that would inevitable be shaken up by second system syndrome)w ith small systems that could, likely, be swapped out with invisibility and no change to end api