Identifying Common Code Smells (In C++)
summary
Examines concrete C++ smells and fixes with real examples: a 260-line main refactored into helpers and small classes, long conditionals turned into named predicates and collision helper functions, pointer cleanup replaced by RAII and smart pointers, missing const qualifiers and Rule-of-Five issues highlighted in vendor drivers. Recommends tools and measurements: use compilers and optimizers, run profilers, UB/memory sanitizers and IDE refactorings before hand-rolling changes. Coverage includes SFML, libsass and hardware-driver examples so the payoff and tradeoffs are visible.
AI-written summary · about
chapters (9)
- 0:00Start
- 1:29Code Smells - What's that?
- 4:59Example code
- 5:52Long function
- 16:32Premature generalization
- 21:09Deeply nested control flow
- 24:24Complicated expression
- 40:50C++ smell: Violating Rule of 5
- 50:01And ranges?
related talks
56mIdentifying Common Code Smells
59mC++ Code Smells
54mC++ Common Knowledge
01h 22mSimplicity: not just for beginners
56mClean Code, Two Decades Later
27mInfiltrating a Code Base: Moving Toward a Better C
55mC++ Core and Other C++ Guidelines - The Good, the Bad, the… Questionable?
50mCore and other guidelines. The good, the bad, the... questionable?
