The Code is Documentation Enough
summary
Explains concrete techniques: rename variables and functions to reveal roles, extract small functions to keep one level of abstraction, and write unit tests that name behavior so tests double as examples. Demonstrates a weighted‑average refactor and implements strong types prevent parameter mixups (meters, seconds, speed) and shows MPUnits handles unit conversions and operators. Recommends use const and concepts to express intent, and lists tools: clang‑tidy, clang‑format, ReSharper C++, SonarQube and GSL contracts. Comments only explain why.
AI-written summary · about
chapters (11)
- 0:00Expressive code principles
- 3:35Clear variable names
- 9:39Expressive function names
- 13:31Strong types
- 23:05Code readability
- 29:54Unit tests as docs
- 33:51C++ standard library
- 41:02Meaningful comments
- 45:17Tools and reviews
- 48:31Summary
- 48:51Q&A
related talks
50mThe Code is Documentation Enough
40mGood Code: What, Why, and How to Get There
25mMaking Codebases Easier to Learn and Maintain
51mSimplicity: Not Just for Beginners
59mTechniques for writing high-quality code
02h 42mClean Code: The Next Chapter
32mFive Lines of Code
58m10 Techniques to Understand Existing Code
