Variables of the Veracious Variety: How to Better Name your Variables
summary
Explains a practical naming method: the three C’s — consistent, concise, correct — and concrete patterns like boolean names that read as questions (isAnyUserActive) and explicit counts (numberOfEligibleDiscountItems). Recommends thesaurus.com to find precise verbs, shows how homonyms and synonyms inflate cognitive load, cites a study where 334 developers had only a 6.9% median agreement on names, and argues for explicit types (e.g., monthAsString, productIdToSuppliersMap) to reduce future refactors.
AI-written summary · about
chapters (13)
- 0:00Variable naming challenges
- 1:09Why naming matters
- 5:27Scientific precision in naming
- 10:51Why naming is difficult
- 28:20Three C's of great names
- 31:50Naming booleans clearly
- 36:11Integer variable best practices
- 40:49Floating point naming
- 42:16String variable guidelines
- 45:04Naming collections
- 46:54Naming maps and pairs
- 47:38Naming tuples effectively
- 50:08Summary
related talks
29mWhat's in a Name: From Variables to Domain-Driven Design
26mEven Naming This Talk Is Hard
49mVariability, The Second Hardest Problem ...
32mAHA Programming
41mUnpacking Technical Decisions
05mLightning Talk: Effective APIs in Practice in C++
01h 00mDesign Idioms from an Alternate Universe
25mDefault to Consistent
