Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
Python & Django

Repair or Replace

Last updated:

Rewrites fail more often than they succeed

A rewrite must reach parity with a system that absorbed years of business rules and edge cases, while the original keeps running and changing.

The rewrite abandoned at eighty per cent complete is a genuinely common outcome, and it costs more than the problem it was meant to solve.

Genuine reasons to rewrite

  1. The business requirements have fundamentally changed
  2. The original is so poor that understanding it costs more than rebuilding
  3. It depends on something no longer available or supported
  4. The data model cannot express what the business now does

Notice that “it uses an old framework” and “it is not how I would have written it” are not on that list.

Usually fixable instead

ComplaintActual fix
SlowQuery and index work
FragileError handling and retries
Fails silentlyMonitoring and alerting
Hard to changeTests, then incremental refactoring
Outdated dependenciesUpdate them, one at a time

The incremental alternative

New functionality in a modern structure alongside the old code, with old functionality moving across as it needs changing anyway.

Over a year the system modernises without ever being unavailable and without a single high-risk cutover.

If you do rewrite

  • Characterise the existing behaviour with tests first
  • Run both in parallel and compare output before switching
  • Migrate one component at a time where possible
  • Keep the old one running until the new one is proven
  • Accept that it will find rules nobody documented

Frequently asked questions

How do we decide?

List what is actually wrong. If it is four specific things, fix them. If the model no longer fits the business, rewrite.

What if nobody understands it?

Assess it first. Frequently the code is comprehensible and the documentation was the missing part.

Can we rewrite incrementally?

Usually, and it is nearly always the better approach. Component by component, with the old system running throughout.

How long does a rewrite take?

Longer than the estimate, consistently. That is the main argument for incremental replacement.

Keep reading

Been told a system needs rewriting?

Sometimes true, often not. Tell us what is wrong and we will give a straight assessment.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Custom Software DevelopmentWeb DevelopmentMachine Learning