Who Needs C++ Unit Tests Anyway? - Modernizing Legacy Code with 0% Code Coverage
summary
Practical roadmap for modernizing a 25‑year C++ codebase that may start at 0% code coverage: set up a dedicated team and an approachable “guru”, upgrade compiler and IDE stepwise, enable W4 and fix header warnings first (often tens of thousands initially), add static analysers and sanitizers, wrap old APIs and custom types, remove dead code and useless macros, do small refactor on the fly (rename locals, constify, extract functions) and commit bigger refactors separately, then introduce unit tests incrementally so changes are safe.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:15What are Legacy Systems
- 3:55Why modernize Legacy Systems
- 8:40The Human Factor
- 12:35The Practical Side
- 18:12No Unit Tests
- 20:00Understanding the Code
- 28:03Declutter
- 31:53Fixing Existing Code
- 34:00Updating the Foundation
- 35:56Project Settings
- 37:01Style Guide
- 39:57Changing Code
- 43:53Refactor
- 46:38Examples
- 54:09Documentation
- 55:32Conclusion
related talks
01h 31mClean(er) Code for Large Scale Legacy Applications
45mWorking with C++ Legacy Code
49mWorking with C++ Legacy Code
38mSurgical Refactoring of Non-Tested Code – A Worked Example
55mSo, you inherited a large code base...
01h 01mYou Can Test Anything
01h 29mAlchemical Code Rejuvenation
48mEarly Modern C++: How to Handle a C++03 Codebase in $CURRENT_YEAR
