Themes

We’ll work through an example of incrementally improving a legacy codebase. You’ll learn a handful of specific techniques, each tailored to the specific legacy challenge at hand. The approaches you’ll learn are a subset of at least a couple dozen such techniques found in Working Effectively with Legacy Code [Fea04] and elsewhere. You’ll discover that the techniques are simple to learn and that once you’ve learned a handful, it’s pretty easy to figure out many of the rest.

Core themes for approaching legacy challenges include the following:

  • Test-drive whenever you can. Test-drive code changes into either new members or even new classes when possible.

  • Don’t decrease the test coverage. It’s very easy to introduce a small amount of code and ...

Get Modern C++ Programming with Test-Driven Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.