Staff-level decision on rewrite versus incremental modernisation: assessing the system (value, change rate, quality, knowledge), the hidden costs of rewrites (second-system effect, feature parity, frozen delivery), estimating options with ranges, a decision matrix including retain and replace-with-SaaS, presenting risk to executives, and when a rewrite is justified.
I treat it as an investment decision, not a technical preference. I assess the system module by module on business value, change frequency, technical health and how well the behaviour is understood, then compare a portfolio of options: retain, rehost, incremental modernisation, rewrite, replace with SaaS, or retire.
Rewrites look clean but carry hidden costs: undocumented requirements, a long chase for feature parity, frozen delivery and double running, and they are routinely underestimated. Incremental modernisation delivers value early and has stop points, at the cost of coordination and longer dual running. A rewrite is right when the system is small, the domain has fundamentally changed, or the platform is a true dead end. I present estimates as ranges, with cost of delay and decision gates. The trade-off is certainty of progress versus the appeal of a clean slate.
"I start by refusing the binary. 'Rewrite or refactor' hides at least six options: retain as is, rehost to cheaper infrastructure, modernise incrementally, rewrite, replace with a SaaS product, or retire it. And the answer is rarely the same for the whole system, so I assess it module by module on four things: business value, how often it changes, technical health (test coverage, defect rate, how scary deployments are), and how well we understand its behaviour. A stable, rarely changed billing module and a fast-changing pricing engine deserve different decisions.
Then I estimate each viable option with ranges and confidence, not single numbers, and I'm explicit about what rewrites usually miss: the hundreds of implicit rules in the old code, the months spent chasing parity, the cost of running both systems, and the feature freeze the business will hate. Reference-class data helps here: most large rewrites overrun badly. For example, at [company] I [prepared a rewrite-vs-modernise case for a system of about N modules]; we [chose incremental for most modules and a rewrite for one], and [result].
When I present to executives, I talk about cost of delay, the probability of overrun, and reversibility. Incremental has early value and stop points: if funding is cut after six months, we still have something better. A rewrite has value at the end and nothing before. The mistake I see is engineers selling a rewrite because the code is unpleasant to work in; that's a real cost, but it has to be weighed against the risk. A rewrite is right when the system is small, the domain has changed so much that the old model is wrong, or the platform is a genuine dead end. I record the decision in an ADR, including what would make us revisit it."
| Option | When it fits | Typical cost | Main risk |
|---|---|---|---|
| Retain (stay on .NET Framework 4.8.1) | Stable, low change, still supported | Low | Skills and talent drain, security posture |
| Rehost (lift and shift to Azure VMs) | Data-centre exit deadline | Low–medium | Moves the problem, few benefits |
| Incremental modernisation | Valuable, actively changed, large | Medium–high, spread out | Long dual running, coordination |
| Rewrite | Small, or domain radically changed, or dead-end platform | High, up front | Parity chase, overrun, frozen delivery |
| Replace with SaaS | Commodity capability (CRM, HR, payroll) | Licence + integration | Fit, lock-in, customisation |
| Retire | Low value, few users | Low | Hidden dependents |
| Module | Value | Change rate | Health | Understood? | Leaning |
|---|---|---|---|---|---|
| Pricing engine | High | Weekly | Poor | Partly | Incremental, with characterisation tests |
| Billing | High | Yearly | OK | Yes | Retain, extract later |
| Reporting | Medium | Monthly | Poor | Yes | Replace with Power BI |
| Legacy fax gateway | Low | Never | Poor | No | Retire |
For a 1.2 million-line .NET Framework system, the team proposed an 18-month rewrite. The assessment found 30% of the code unused, reporting replaceable with Power BI, and only the pricing engine both high-change and unhealthy. The agreed plan modernised pricing incrementally, retired two modules and kept billing on 4.8.1; the first modernised slice shipped in seven weeks, and the total spend was about 40% of the rewrite estimate.
Checks staff-level judgement: framing a high-stakes technical decision as a business investment, estimating honestly and knowing when a rewrite is really justified.
Green flags
Red flags
Rewrite timeline
month 0 ---- spec from old system (incomplete: implicit rules) ----
month 6 ---- old system keeps changing: new target moves ----
month 12 ---- parity gap discovered in UAT ----
month 18 ---- planned go-live; real go-live month 26+ ----
value delivered before go-live: ~0
The old code is the specification, including bug-compatible behaviour customers rely on. Joel Spolsky's 'things you should never do' and Fred Brooks's second-system effect describe the same trap: the new system tries to fix everything at once.
Incremental modernisation (strangler fig, branch by abstraction, module extraction) delivers working software throughout, keeps the old system as a fallback, and creates natural stop points. Its costs are real: a proxy layer, shared auth and data, two stacks for a while, and the discipline to actually finish (decommissioning).
score per option = value delivered over time
- (build cost + dual-running cost + cost of delay)
adjusted by probability of overrun and reversibility
It doesn't need to be precise; it needs to make the assumptions visible so executives can challenge them.
Even then, rewrite slice by slice behind a router if possible: a rewrite and a strangler fig are not exclusive.
One page: the options, a range for cost and time, value timeline, top risks with mitigation, reversibility, and the recommended decision with gates ("we review at month 3 against these measures"). Avoid technical vocabulary; translate code health into incident counts, lead time and staff turnover.
git log --since=1.year --name-only) to find the files that change most, and compare with defect counts.Mining change frequency and hotspots from git to support the module assessment:
# Files changed most often in the last year (change rate)
git log --since="1 year ago" --name-only --pretty=format: -- '*.cs' \
| grep -v '^$' | sort | uniq -c | sort -rn | head -20
# Commits mentioning fixes per top-level folder (rough defect density)
git log --since="1 year ago" -i --grep='fix\|bug' --name-only --pretty=format: \
| grep -v '^$' | cut -d/ -f1-2 | sort | uniq -c | sort -rn
A small model that makes the assumptions behind each option explicit, so executives can challenge numbers rather than opinions:
namespace Contoso.Modernisation;
public sealed record OptionEstimate(
string Name,
decimal BuildCostP50,
decimal BuildCostP90,
int MonthsToFirstValue,
int MonthsToComplete,
decimal MonthlyDualRunningCost,
decimal MonthlyValueWhenDelivered,
bool HasStopPoints);
public static class OptionComparison
{
// Net value over a horizon using the pessimistic (P90) cost: rewrites are rarely early
public static decimal NetValue(OptionEstimate o, int horizonMonths)
{
var monthsDelivering = Math.Max(0, horizonMonths - o.MonthsToFirstValue);
// Incremental options deliver part of the value early; assume a linear ramp to completion
var averageValueShare = o.HasStopPoints ? 0.6m : 1.0m;
var deliveredValue = monthsDelivering * o.MonthlyValueWhenDelivered * averageValueShare;
var dualRunning = Math.Min(o.MonthsToComplete, horizonMonths) * o.MonthlyDualRunningCost;
return deliveredValue - o.BuildCostP90 - dualRunning;
}
}
// Example: the numbers are placeholders to be replaced with your assessment
var rewrite = new OptionEstimate("Rewrite", 2_400_000m, 4_000_000m, 20, 20, 60_000m, 250_000m, HasStopPoints: false);
var incremental = new OptionEstimate("Incremental", 1_800_000m, 2_600_000m, 2, 18, 40_000m, 250_000m, HasStopPoints: true);
foreach (var o in new[] { rewrite, incremental })
Console.WriteLine($"{o.Name}: net value over 36 months = {Contoso.Modernisation.OptionComparison.NetValue(o, 36):C0}");
At staff level, the job is to make the decision legible and reversible. I bring options, ranges and assumptions, not a favourite. Most of the time the answer is a mix: retire what nobody uses, replace commodity parts with SaaS, keep stable parts on a supported runtime, and modernise the high-value, high-change core incrementally. Rewrites are the right call more often for small components than for whole systems, and even then I'd rather rewrite slice by slice behind a router.
The industry record supports the caution: Netscape's decision to rewrite its browser from scratch (the case Joel Spolsky made famous) left it without a competitive release for about three years, and many public-sector 'replace the core system' programmes have run years late and well over budget for the same reasons: implicit requirements and a moving target. For estimates, I use the organisation's own history (how long did the last three similar projects take versus their estimates?), size parity work by counting screens, reports, integrations and rules, and re-forecast after each slice, which is far more accurate than story points estimated up front for a multi-year rewrite.
I also check the organisation: a rewrite needs a team that understands the domain deeply and a business willing to wait for value. If either is missing, the technical merits don't matter.
| Signal | Points to | Why |
|---|---|---|
| High value, high change, poor health | Incremental modernisation | Pays back fastest, needs safety |
| High value, low change, OK health | Retain / extract later | Low return on migration |
| Commodity capability | Replace with SaaS | Not a differentiator |
| Small, well understood, dead-end design | Rewrite (slice by slice) | Contained risk |
| Low value, few users | Retire | Cheapest option |
Evolutionary architecture (Ford, Parsons and Kua) is architecture designed to support guided, incremental change, rather than a fixed upfront design. The key tool is fitness functions: automated checks that protect the characteristics you care about, such as dependency rules (architecture tests), latency budgets, or startup time, run in CI or production. Around that, I keep boundaries modular (often a modular monolith first), make decisions reversible where possible and defer irreversible ones to the last responsible moment, record decisions in ADRs, and rely on continuous delivery, feature flags and observability so each change is small and safe.
I treat a large refactoring as a series of small, behaviour-preserving steps merged to main continuously, not a big-bang branch. First I pin current behaviour with characterisation tests. Then I pick a technique: strangler fig to route traffic piece by piece to a new implementation, branch by abstraction to put an interface in front of the old code and swap implementations behind it, or parallel change (expand, migrate, contract) for APIs and database schemas. Feature flags and shadow comparisons let old and new paths run side by side. I prioritise hotspots (code that changes often and hurts), keep refactoring commits separate from feature commits, and define an end state so it does not drag on forever.
Technical debt is the future cost of a shortcut, and the interest is the extra effort or risk it adds every time we work near it. I make it visible in a debt register with each item's impact, how often we pay its interest (change frequency, incidents, delays) and a rough cost to fix. I prioritise by interest, not by how ugly the code is: debt in a hotspot that slows every feature beats a messy module nobody touches. I get time by explaining it in business terms (lead time, incident risk, cost), by reserving a steady share of capacity, and by pairing debt fixes with features that touch the same area.
How to tell it (STAR)
**S:** Our [logistics platform] was slow to change and the team wanted an 18-month rewrite; the board wanted a recommendation in [six weeks]. **T:** I was asked to lead the assessment and present the options. **A:** I assessed it module by module with git history, defect data and usage telemetry, and found most of the pain in one module and a third of the code unused. I put three options to the board with P50/P90 ranges, cost of delay and decision gates, and recommended a mix: retire, replace, rehost and modernise pricing incrementally. **R:** The board approved it at about [40%] of the rewrite cost; the first modernised pricing slice shipped in [seven weeks], and lead time on pricing changes fell from [six weeks] to [one] within the year.
Last updated 23 Nov 2026.