Curious Pandas

Most rewrites ship late, and some never ship

Rewriting a system from scratch feels cleaner than changing it. Read what the famous warnings actually say, what really went wrong at TSB, and sort real decisions into the ones you can undo and the ones you can't.

14 min+35 XP for finishing

Every team with an old system has had the conversation. The code is tangled, nobody understands parts of it, and starting again looks so much cleaner. Sometimes it is the right call. This lesson is about why it so often isn’t, and about the one property that separates the safe ways to change a system from the dangerous ones.

What the famous warning says

In April 2000 Joel Spolsky called Netscape’s decision to rewrite its browser “the single worst strategic mistake that any software company can make”. His argument was about knowledge: “When you throw away code and start from scratch, you are throwing away all that knowledge.” Years of bug fixes for odd cases live in the old code, often without a comment to say why.

Two corrections to the way the story is usually told. Spolsky’s essay doesn’t say the rewrite alone killed Netscape. And the long gap between releases wasn’t all rewrite: the decision to replace the old layout code came in October 1998, well after Netscape 4. The rewritten engine, Gecko, later became the engine of Firefox. The lesson is not “never rewrite”; it’s that a rewrite has to relearn everything the old code knew, while the old system keeps changing underneath it.

TSB: the headline and the documents

In April 2018 the UK bank TSB moved its customers to a new platform in a single weekend, and the result was months of disruption. The popular version is “the data migration failed” or “big bang was the mistake”. The official documents say otherwise:

  • The Financial Conduct Authority’s Final Notice says the data migration itself was successful. What failed was the new platform, which wasn’t ready to support TSB’s full customer base.
  • The independent review by Slaughter and May said a largely single-event migration would not necessarily have been the wrong approach, had the right mitigants been in place.
  • Rolling back was essentially impossible once customers were on the new platform.
  • Testing of the two data centres working together had been cut back, in a decision taken outside the forum that should have approved it. The FCA says that testing would likely have found the configuration problem that took online banking down.

Read that way, TSB is a story about a one-way step and a check removed in front of it.

Changes are the usual trigger

Google’s SRE book puts it bluntly: “SRE has found that roughly 70% of outages are due to changes in a live system.” The book doesn’t say what that figure rests on. Google’s later workbook does publish data: across thousands of its own postmortems from 2010 to 2017, binary pushes triggered 37% of outages and configuration pushes 31%. That is one company’s data, and it counts triggers, not root causes, so quote both as Google’s findings, not industry statistics. But the direction is clear: the risk is in changing things, and a rewrite is the biggest change there is.

Google’s book on software engineering adds the cost side: “Evolving a system in place is usually cheaper than replacing it with a new one, when turndown costs are included.”

Try it

Sort four real kinds of decision into the ones you could walk back and the ones you couldn’t. That distinction is what every pattern in the rest of this trail is built on.

Which steps can be undone?
  1. One weekend, every customer

    A bank moves all of its customers from the old platform to the new one over a single weekend. Once the new platform is live, the plan has no way to move them back.

    Your reading

    Source: FCA Final Notice to TSB (2022); Slaughter and May report (2019)

  2. A test that got shorter

    Weeks before the cut-over, testing of the two data centres running together is cut back. The decision is made outside the forum that normally approves such changes.

    Your reading

    Source: FCA Final Notice to TSB (2022)

  3. One route, in the shadow

    A team puts a façade in front of the old system and shadows one read-only route to the new one for two weeks, comparing every answer. Users only ever see the old system's answers.

    Your reading

    Source: GitHub, Move Fast and Fix Things (2015); this trail's shadow lesson

  4. Tidy up straight away

    The morning after moving every route to the new system, a team drops the old database tables to save space.

    Your reading

    Source: Microsoft Azure Architecture Center, Strangler Fig pattern

Check yourself+10 XP

According to the FCA, what failed in TSB's 2018 migration?

Check yourself+10 XP

Why should Google's 'roughly 70% of outages are due to changes' be quoted carefully?

Sources

Finished reading?

Missions and quizzes above earn their own XP. This marks the lesson done.