Naming is Hard!
summary
Names should reveal why something exists not just what it does; extraction into tiny methods follows Sandi Metz rules (classes <100 lines, methods <5 lines) and makes intent visible. Concrete refactors include simplifying a long controller into named helpers, cleaning a Paperclip method in paperclip, and extracting a command-runner library called cocaine. Tests act as original documentation so test names must justify behavior. Prefer precise names like recent_popular_posts and arrays named users so code reads as a story.
AI-written summary · about
chapters (36)
- 0:00Intro
- 0:37This talk is about naming
- 2:40Code is communication
- 2:54The computer doesn't care about names
- 3:05It just cares that everything lines up
- 4:26Languages are written for humans
- 5:03We work on teams. We need to communicate.
- 5:40Names have power.
- 6:00A hypothesis holding that the structure of a language affects the perceptions of reality of its speakers and thus influences their thought patterns and worldviews. Sapir-Whorf Hypothesis
- 6:42Build a domain language
- 7:04Assigning good names helps you think about concepts
- 7:39SRP applies to names, too
- 8:49If it has one function, it easier to name
- 9:16Sandi Metz's rules
- 9:49Small classes, small methods
- 10:08The parts become labelled for you
- 10:28Best action is to extract methods
- 10:55Refactoring and extraction reveal meaning
- 11:29Learn how it works by extracting methods
- 12:04Knowing intent lets you apply names
- 12:25Document the system
- 12:39Code can tell a story
- 15:09Ruby isn't statically typed
- 16:28Don't ever name a variable "x" Try searching for
- 17:14Let your names document your code
- 19:45Systems Hungarian strUsername
- 21:59Clarity is key
- 22:16Say what you mean, mean what you say
- 23:42Don't take a metaphor too far
- 24:22Cocaine.do_line("...")
- 25:00Document your Documentation
- 25:38A test's name should be its justification
- 26:58Names are important
- 27:17Names are how you interact with your code
- 28:07This is hard, don't feel too bad
- 29:17It's one of the hardest things in Computer Science








