# gen2.dev - Field Guide to Second-Generation Software

> gen2.dev is a field guide to second-generation software: when to rewrite a system, when to leave it alone, and how to replace it safely.

Source: https://gen2.dev/

---

The field guide to second-generation software

# Every system gets a Gen 2. Most of them go badly.

Gen 2, NextGen, v2, "the new platform": the project that replaces the system that works but nobody wants to touch. A guide to deciding whether to start one, and to finishing it if you do.

[Should we rewrite it?](https://gen2.dev/should-we-rewrite/) [Read the field guide](https://gen2.dev/guide/)

Most opened

## Start with the question you have

Eight pages that answer what people come here to ask. Pick the one that matches your week.

 [![Sixteen questions lead to one of four recommendations](https://gen2.dev/img/thumb/scorer.png) Tool Should we rewrite it? Sixteen questions about your system. One of four recommendations, with the reasons. Start the questions](https://gen2.dev/should-we-rewrite/)[![Four options around your system](https://gen2.dev/img/thumb/rewrite-vs-refactor.png) Guide Rewrite vs refactor The four real options, and the six facts that decide between them. Read the guide ](https://gen2.dev/guide/rewrite-vs-refactor/)[![Three stages of moving slices behind a router](https://gen2.dev/img/thumb/strangler-fig.png) Guide Strangler fig pattern Replace a system one slice at a time while it keeps running. Read the guide ](https://gen2.dev/guide/strangler-fig/)[![A bar chart: the pitch against the fully counted cost](https://gen2.dev/img/thumb/calculator.png) Tool Rewrite cost calculator Put the overrun, the Gen 1 team and the overlap back into the estimate. Run the numbers ](https://gen2.dev/rewrite-cost-calculator/)[![A small first system beside an overloaded second one](https://gen2.dev/img/thumb/second-system-effect.png) Guide The second-system effect Why the successor to a small system arrives bloated and late. Read the guide ](https://gen2.dev/guide/second-system-effect/)[![Netscape 4, three years with no release, then Netscape 6](https://gen2.dev/img/thumb/case-netscape-6.png) Case file Netscape 6 The rewrite that became the warning every team still quotes. Read the case file ](https://gen2.dev/cases/netscape-6/)[![Python 2 and Python 3 as two timelines side by side](https://gen2.dev/img/thumb/case-python-2-to-3.png) Case file Python 2 to 3 Eleven years of running two versions side by side. Read the case file ](https://gen2.dev/cases/python-2-to-3/)[![A satire status dashboard: launching in 6 months](https://gen2.dev/img/thumb/status.png) Satire Gen 2 status page The rewrite at every company: always six months from launch. Check the status](https://gen2.dev/status/)

What a Gen 2 is

## The second system is the dangerous one

It is not a feature

A Gen 2 replaces something that already works and already earns money. For most of the project the best possible result is that customers notice nothing. That makes it the hardest kind of work to fund, to staff and to finish.

It attracts everything

Fred Brooks named the second-system effect in 1975: the successor to a small, successful system collects every idea that was left out of the first one, and arrives over-engineered and late. Fifty years on, it is still the default outcome.

Gen 1 does not stop

The old system keeps taking orders, fixes and feature requests the whole time. A replacement built somewhere else, from nothing, is chasing a target that is moving and has a head start measured in years.

![Slide: Gen 1 on the left, Gen 2 on the right, and four routes between them: leave it, refactor, replace in slices, rewrite.](https://gen2.dev/img/home.png)

The decision

## There are four answers, not two

"Rewrite or refactor" hides the two options that are right most often. The useful question is which of these four fits the system you actually have.

[1

### Leave it alone

Nothing you described justifies the cost and risk of changing it.

Read how to tell an old system from a failing one.](https://gen2.dev/guide/rewrite-vs-refactor/#leave-it-alone) [2

### Refactor in place

Fix the system you have. The problems you described live in the code, not in the foundations.

Read when refactoring beats replacing.](https://gen2.dev/guide/rewrite-vs-refactor/#refactor-in-place) [3

### Replace it piece by piece

Build Gen 2 around Gen 1 and move one slice at a time until the old system has nothing left to do.

Read the strangler fig pattern.](https://gen2.dev/guide/strangler-fig/) [4

### Rewrite it

A clean rebuild is a defensible choice here. That is rare.

Read what makes a full rewrite survivable.](https://gen2.dev/guide/rewrite-vs-refactor/#rewrite-it)

Case files

## What happened to other people's Gen 2

Only the ones that went public. Hundreds of thousands of other companies face the same decision in private, and nobody writes it down.

[All 37 case files](https://gen2.dev/cases/)

 [![Slide: Netscape 4, the leading browser, then more than three years with no major release, then Netscape 6 on the new Gecko engine. The rewrite cost Netscape the market.](https://gen2.dev/img/thumb/case-netscape-6.png) Failed Netscape 6 About two years from the decision to the release; more than three between major versions In late 1998 Netscape dropped its browser's rendering engine to build a new one. The next major release took until November 2000, and by then the market had moved on. Read the case file](https://gen2.dev/cases/netscape-6/)[![Slide: Python 2 and Python 3 as two timelines side by side for eleven years, from 3.0 on December 3, 2008 to the Python 2 sunset on January 1, 2020.](https://gen2.dev/img/thumb/case-python-2-to-3.png) Worked, slowly Python 2 to 3 Eleven years from 3.0 to the Python 2 sunset on January 1, 2020 Python 3 broke compatibility on purpose in 2008. The language survived and is better for it, but the community carried two versions for more than a decade. Read the case file ](https://gen2.dev/cases/python-2-to-3/)[![Slide: the Firefox engine as five parts, one old Gecko part left and a new part from Servo being lowered in, from 2012 to Firefox Quantum on November 14, 2017.](https://gen2.dev/img/thumb/case-firefox-quantum.png) Worked Firefox Quantum Servo research began in 2012; Firefox Quantum shipped November 14, 2017 Mozilla had already lived through one from-scratch browser rewrite. The second time, it replaced the engine a component at a time, inside a product that never stopped shipping. Read the case file ](https://gen2.dev/cases/firefox-quantum/)[![Slide: Perl 5 keeps shipping in a straight line while Perl 6, a full redesign, branches off and becomes Raku, renamed October 2019.](https://gen2.dev/img/thumb/case-perl-6-raku.png) Failed Perl 6 and Raku More than fifteen years from the announcement to the first stable release Perl 6 was announced in July 2000 as a redesign of Perl. Its first stable release came in December 2015, and in 2019 it gave up the Perl name altogether. Read the case file ](https://gen2.dev/cases/perl-6-raku/)[![Slide: AngularJS, released October 20, 2010, and Angular 2, released September 14, 2016, with a half-built bridge between them. The upgrade path came later.](https://gen2.dev/img/thumb/case-angularjs-to-angular.png) Worked, slowly AngularJS to Angular About two years from the announcement to 2.0; AngularJS support ran to the end of 2021 In October 2014 the Angular team showed a version 2 that shared a name with AngularJS and almost nothing else. The migration path was designed afterward, under pressure from the people who needed it. Read the case file ](https://gen2.dev/cases/angularjs-to-angular/)[![Slide: Windows XP in 2001, the Longhorn tangle of new subsystems in the core, the 2004 reset, and Windows Vista on November 8, 2006.](https://gen2.dev/img/thumb/case-windows-longhorn.png) Worked, slowly Windows Longhorn Five and a half years from the start of work to release; just over two from the reset Longhorn was planned as a minor Windows release for 2003. Three years in, Microsoft restarted it on a different code base and cut its headline feature. It shipped as Windows Vista. Read the case file](https://gen2.dev/cases/windows-longhorn/)

## Sixteen questions before you commit a year

Answer them about your own system. You get one of the four recommendations, the answers that drove it, and the ones that argue against it. It runs in your browser and sends nothing anywhere.

[Start the questions](https://gen2.dev/should-we-rewrite/)

Tools

## Put numbers on the argument

[All tools](https://gen2.dev/tools/)

 [![Sixteen questions lead to one of four recommendations](https://gen2.dev/img/thumb/scorer.png) Scorer Should we rewrite it? Sixteen questions about the system you have. One of four recommendations, with the answers that drove it and the ones that argue against it. Start the questions](https://gen2.dev/should-we-rewrite/)[![A bar chart: the pitch against the fully counted cost](https://gen2.dev/img/thumb/calculator.png) Calculator Rewrite cost calculator Enter the estimate you were given. See it with the overrun, the team that keeps Gen 1 alive, and the months both systems run. Run the numbers ](https://gen2.dev/rewrite-cost-calculator/)[![A manifest file turning into a list of old tools and their successors](https://gen2.dev/img/thumb/check-my-stack.png) Checker Check my stack Paste a package.json, requirements.txt, .csproj, composer.json or pom.xml and see which of your tools have a successor. Nothing leaves your browser. Check your project ](https://gen2.dev/check-my-stack/)[![A satire status dashboard: launching in 6 months](https://gen2.dev/img/thumb/status.png) Satire Gen 2 status page The status page for the rewrite at every company. Always six months from launch. Includes rewrite-meeting bingo and a codename generator. Check the status](https://gen2.dev/status/)

Successor Map

## What replaced the tools you depend on

[All 70 entries](https://gen2.dev/successors/)

 [![Slide: CentOS Linux on the left, an arrow, and Rocky Linux, AlmaLinux or CentOS Stream on the right.](https://gen2.dev/img/thumb/successor-centos-linux.png) Move now CentOS Linux to Rocky Linux, AlmaLinux or CentOS Stream The CentOS Project publishes no updates for CentOS Linux 7 or 8, so every server still on them goes without fixes. Read the entry](https://gen2.dev/successors/centos-linux/)[![Slide: node-sass on the left, an arrow, and Dart Sass on the right.](https://gen2.dev/img/thumb/successor-node-sass.png) Move now node-sass to Dart Sass The node-sass README states that it will receive no more releases, even for security fixes. Read the entry ](https://gen2.dev/successors/node-sass/)[![Slide: TSLint on the left, an arrow, and ESLint on the right.](https://gen2.dev/img/thumb/successor-tslint.png) Move now TSLint to ESLint TSLint has accepted no fixes of any kind since December 1, 2020, including security fixes and fixes for crashes caused by TypeScript changes. Read the entry ](https://gen2.dev/successors/tslint/)[![Slide: Vue 2 on the left, an arrow, and Vue 3 on the right.](https://gen2.dev/img/thumb/successor-vue-2.png) Move now Vue 2 to Vue 3 Vue's own end-of-life page says Vue 2 no longer receives updates or fixes, and it points to third-party extended support for continued security patches. Read the entry](https://gen2.dev/successors/vue-2/)

First hand

## The fleet rebuild log

My own Gen 2: about 100 websites and web applications moved off one aging server, one site at a time, while the old server kept running. What the plan was, what broke, and the rules that came out of it.

[Read the log](https://gen2.dev/fleet-rebuild/)

![Slide: about 100 websites moving one at a time from one Windows server to static builds at the edge.](https://gen2.dev/img/fleet-rebuild.png)

Field guide

## Start here

[All 24 guide pages](https://gen2.dev/guide/)

 [![Slide: four options around your system: leave it alone, refactor in place, replace it piece by piece, rewrite it.](https://gen2.dev/img/thumb/rewrite-vs-refactor.png) Rewrite vs refactor: the four real options The argument is usually framed as two choices. There are four, and the two that get left out are the ones that are right most often. Read the guide](https://gen2.dev/guide/rewrite-vs-refactor/)[![Slide: the seven migration strategies in a row, retire, retain, rehost, relocate, repurchase, replatform and refactor, from least change to most.](https://gen2.dev/img/thumb/seven-rs.png) The 7 Rs of migration: retire, retain, rehost and the rest Before arguing about rewriting, sort every system into one of seven answers. Most of them are not rewrites, and the cheapest one is switching something off. Read the guide ](https://gen2.dev/guide/seven-rs/)[![Slide: record what Gen 1 really does, bugs included, as characterization tests, then Gen 2 must pass the same tests. The running system is the specification.](https://gen2.dev/img/thumb/characterization-tests.png) Characterization tests: pin down what Gen 1 really does Nobody can say exactly what Gen 1 does. Characterization tests find out by asking it, and then hold Gen 2 to the answers. Read the guide ](https://gen2.dev/guide/characterization-tests/)[![Slide: a single estimate date crossed out, replaced by a range bar that includes the Gen 1 team, the overlap and the long tail.](https://gen2.dev/img/thumb/estimating-a-rewrite.png) Estimating a rewrite: a range, not a date The honest answer to how long a rewrite takes is a range with its assumptions attached. A single date is a promise nobody can keep. Read the guide ](https://gen2.dev/guide/estimating-a-rewrite/)[![Slide: three stages behind a router: start with everything on Gen 1, move slice by slice, then switch Gen 1 off.](https://gen2.dev/img/thumb/strangler-fig.png) The strangler fig pattern Grow the new system around the old one, move one slice of work at a time, and switch the old system off when it has nothing left to do. Read the guide ](https://gen2.dev/guide/strangler-fig/)[![Slide: one large monolith block splitting into a few small services, with an arrow going back for teams that regroup them.](https://gen2.dev/img/thumb/monolith-to-microservices.png) Monolith to microservices, and back again Splitting a monolith is a migration like any other, with one extra risk: the destination can be worse than where you started. Read the guide](https://gen2.dev/guide/monolith-to-microservices/)
