Header Image

Challenges and Techniques for Dealing with C++ Legacy Code

C++ legacy code is everywhere. It’s not a big problem when it works and you don’t have to touch it, but it becomes a huge problem when you have to change it and you are afraid to do so.

In this session I will look at a few common challenges and techniques that you can use to overcome them. Here is a sample:

  • Incrementally rewriting legacy code using the strangler pattern
  • Changing code that takes a long time to compile (spoiler alert: use a smaller compilation unit)
  • Replacing external dependencies by replacing the .h file
  • Writing tests using extract and override; replace extract and override with mocks
  • Using dependency injection to enable unit testing

I will show a few samples for each technique, and point out to additional resources for learning more.

June 24 @ 09:45
09:45 — 10:35 (50′)

Room A

Alex Bolboaca