Naming is Hard: Let's Do Better
summary
Explains why many C++ names (RAII, partial_sort_copy) confuse intent and shows concrete fixes: rename a bloated set_status into approve and deny, prefer partial_sort_copy -> topN style intent, and use refactoring tools to rename safely across codebases. Covers naming verbs vs nouns, when to add units or adjectives, enum/API design, and template type names; gives practices for iterative renaming during refactoring and concrete examples you can apply immediately. refactoring tool
AI-written summary · about
chapters (15)
- 0:00Better naming practices
- 3:13Why naming matters
- 6:24Names evolve and mislead
- 10:44Consistency across docs
- 14:23Avoid misleading metaphors
- 19:05Natural pairs and conventions
- 23:41Verb-based function names
- 28:00Naming classes and variables
- 32:01Purpose-driven naming
- 39:25Local variable scope
- 44:06Pitfalls of abbreviations
- 46:15Meaningful type names
- 48:27When to rename
- 53:25Demand good names
- 55:13Final thoughts and Q&A
related talks
48m“Speak” Your Architecture: From Domain Language to Well-Named Components
50mRefactoring Is Not Just Clickbait
24mThe Art and Science of Naming
36mWhy It's Worth Arguing for an Hour About Naming in Code Review
55mIdentifying Common Code Smells (In C++)
29mWhat's in a Name: From Variables to Domain-Driven Design
20mTouring the Tips of the Week Series
54mWriting C++ to Be Read
