Naming is Hard: Let's Do Better
summary
Argues that good names must convey the actual behavior: prefer partial_sort vs top_n when callers want the top N, use get/set for simple accessors and use richer methods like approve/deny when side effects matter, keep user-facing terms consistent across code, DB and UI, avoid repeating the class name in members, prefer begin and end (and source/destination) for expected pairs, rename as soon as the true role is known using external TODOs if needed, and choose template and short local names only when they match established, documented conventions.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:13What makes a good name
- 6:30Names tell a story
- 16:34Consistency in naming
- 22:19Functions and verbs
- 28:18Classes and nouns
- 36:25Local variables
- 42:10Avoiding abbreviations
- 45:02When to name things
- 51:10Final thoughts
related talks
31mDangerous Minds: How we're getting developer education wrong
01h 29m“Simplicity: Not Just For Beginners”
39mThings that Matter
35mThe Best Parts! Of My Favorite Things!
22mA Neatly Typed Message: Improving Code Readability
32mRules, Laws, and Gentle Guidelines
05m10 Things Junior C++ Devs Don't Get
26mLearning to overcome the choice paradox
