Adventures with C++ Legacy Codebases: Tales of Incremental Improvement
Talkat CppCon 2024 · on Wednesday, 2024-09-18· at 16:45· Cottonwood 8/9, 6700 North Gaylord Rockies Boulevard·
summary
Three merged 20+ year C++ codebases total millions of lines and the concrete wins are specific: incremental rollout of ASan and UBSan and unit/regression tests finds real UB, clang-format and clang-tidy diff enforce style and deprecations only on changed lines, a dynamic DLL boundary reliably shares DSP code, and a brittle but effective static-lib workaround ships analytics. Expect false positives from sanitizers, lint-driven refactors to introduce bugs, and that copy‑paste works for tiny pure functions but breaks on change.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:03Legacy code challenges
- 3:28Common perceptions
- 7:42Modernizing risks
- 12:19Style guides with clang-format
- 15:29Static analysis and sanitizers
- 21:48Deprecating APIs
- 27:52clang-tidy for refactoring
- 32:29Sharing legacy code
- 36:0520-year-old code challenges
- 38:14DSP library sharing
- 41:23Copy-paste strategies
- 43:11Static library sharing
- 46:29Summary
related talks
44mAdventures In Updating A Legacy Codebase
55mSo, you inherited a large code base...
32mBuilding a sustainable codebase: 7 years and counting
01h 01mTools from the C++ Ecosystem to save a leg
56mHow to Refactor Millions of Line of Code Without Alienating Colleagues
53mTools and practices to help you deal with legacy code
01h 22mHow to Delete Code
40mLessons from two decades of writing bad code
