~/talk

Who Needs C++ Unit Tests Anyway? - Modernizing Legacy Code with 0% Code Coverage

Talkat C++ on Sea 2024 · 2024-07-02..07-05· [legacy-modernisation]
name:Jan Baart
links:none on file
slides:none on file

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

  1. 0:00Introduction
  2. 1:15What are Legacy Systems
  3. 3:55Why modernize Legacy Systems
  4. 8:40The Human Factor
  5. 12:35The Practical Side
  6. 18:12No Unit Tests
  7. 20:00Understanding the Code
  8. 28:03Declutter
  9. 31:53Fixing Existing Code
  10. 34:00Updating the Foundation
  11. 35:56Project Settings
  12. 37:01Style Guide
  13. 39:57Changing Code
  14. 43:53Refactor
  15. 46:38Examples
  16. 54:09Documentation
  17. 55:32Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.