We all have legacy code, meaning profitable code that we’re afraid to change. It doesn’t matter who wrote it, in which language, nor when. It matters that we feel the fear now and need to deal with it. Rewrite or refactor? How do we write tests? There’s so much to change; how do we get started?
In the typical programmer’s day job, there’s no time to learn how to do this. We’re already behind schedule and the cost of fixing the legacy code is crushing us. We need a way to learn how to do this safely, correctly, and eventually, even quickly. That’s what Surviving Legacy Code is about.
Any programmer forced to deal with code that strikes fear in their heart. That is, all programmers, eventually.
What you’ll learn
- When to refactor and when to rewrite, and how to do that safely.
- The killer technique for exposing in glorious detail exactly where the code wants us to break it apart.
- How to use statistical sampling and logs to cobble together the beginnings of a test suite.
- How to sterilise a legacy environment before even trying to change the code.
- How to crack the chicken-and-egg problem: I need to write tests in order to refactor, and I need to refactor in order to write tests.
What you’ll do
- Work in short sessions on a diabolical-but-fun code base (available in at least 20 programming languages).
- Practise micro-committing, a key technique to changing difficult code safely.
- Apply the lessons from my code base to your project. (Only in private courses longer than one day.)
- Practise a handful of refactoring and testing exercises that develop the most essential legacy code rescue skills and disciplines.
What you’ll need to bring with you
- A computer, with a working software development environment.
- Something to write with, and something to write on. I suggest index cards and a notebook.
What you should do before you attend
- Install the development environment for the programming language you wish to use: Eclipse, IntelliJ IDEA, Visual Studio, vim, emacs, whatever you choose.
- Install git.
- There is no step 3.
You want to make a good investment in your people, and you know they need training, but when you invest thousands of dollars in courses without giving your people the slack they need to apply what they learn, you’re just being cruel. Now granted, you don’t mean to act cruelly, but you have to take… Read more…