Strangle Your Legacy Code

When refactoring is risky and expensive, how do you deliver?



When you're mired in an ancient codebase that makes refactoring risky and expensive, how do you clear a path to continued delivery? According to the old saw, the best time to plant a tree is 20 years ago, and the next best time is today. But if you already have a gnarled old source tree, an old saw is the wrong tool. Instead, plant a Strangler: a pattern for preserving your software investment by arranging for new functionality to grow in a new codebase.

As a mob, we'll take a quick look at a Strangler, then test-drive new features into it. Don't know what to try next? Take the keyboard. Got an idea? Step away and talk someone else through it. You'll leave with a powerful strategy for extending the useful life of working, valuable software -- *especially* when it's hard to change. We'll also send you home with a free bonus development practice to accelerate your team's learning. For a limited time only!

Audience background

All are welcome, even with no programming experience. People with the following prerequisites will get the most out of the session:

- Refactoring: You prefer a little bit every day (not too much, not none, just enough)
- Legacy code: You've lived with code where a little refactoring is difficult
- Yourself: You learn best by doing

Benefits of participating

Participants will come away not only understanding the Strangler pattern in principle, but also having put it into practice.

Materials provided

- Slides with definitions and examples
- Example legacy codebase


The primary learning technique is Mob Programming, with Amitai and Tim doing most of the navigating.

Detailed timetable

00:00 - 00:05: demo our legacy application

00:06 - 00:65: mob programming! a dozen or so 4-minute rotations (pausing occasionally to look at a slide and discuss)

00:66 - 00:75: retro


- Slides, including code, your learnings, and further readings and listenings:


Amitai and Tim haven't run this particular workshop before (though Amitai will likely get to do it a few times between now and the conference). In any case, Amitai and Tim have each run lots of timed workshops for clients and conferences, and have facilitated plenty of mob sessions. Here's video of Amitai using mob programming to teach TDD to non-programmers:


  1. Amitai Schleier
    Latent Agility
  2. Tim Bourguignon
    MATHEMA Software GmbH