The rewrite is almost never the answer
2 June 2026 · CodeGenexis
Every inherited codebase produces the same first instinct: burn it down and start clean. The code is undocumented, the framework is three major versions behind, and the one developer who understood it left last year. A rewrite feels like hygiene. It is usually a mistake, and after twenty years of being called in after the fact, we can be specific about why.
The old system is not just code — it is an accumulation of decisions, most of them invisible. That strange conditional in the invoicing module is a tax rule from 2019. The rewrite team deletes it, ships, and discovers the rule the hard way. Multiply that by every edge case a business accretes over a decade, and the 'clean' rewrite spends most of its budget rediscovering requirements the old system already encoded.
What works instead
- Stabilise first: monitoring, backups, and a reproducible deploy before anything else changes.
- Write the missing tests around the behaviour that makes money — as it is, bugs included.
- Carve out one module at a time behind a stable interface, replace it, and ship. The old and new systems run side by side for months, and the business never stops.
- Reserve the true rewrite for the rare case where the platform itself is dead — and even then, migrate data and rules incrementally.
A staged modernisation is less satisfying to announce and far more likely to finish. The rewrite that takes eighteen months and quietly dies in month eleven is a cliché in this industry for a reason. If someone is quoting you a big-bang rewrite as the first option, ask them what happens to the business between the day the budget runs out and the day the new system works.