A reused, single-letter flag led to a system failure that cost a company $500 million. Learn how better naming prevents catastrophic bugs.
#1about 3 minutes
Why good naming is critical for understanding code
Good names act as an introduction to a domain's core concepts, making code more approachable for newcomers.
#2about 2 minutes
How mental models influence code interpretation
We process code using the same mental shortcuts as natural language, creating meaningful chunks and making assumptions based on names.
#3about 3 minutes
The danger of misleading function names
A function's name must not misrepresent its behavior, such as hiding side effects or returning unexpected types.
#4about 2 minutes
Using specific names instead of general terms
Overly general names like 'process' or 'handle' obscure a function's true purpose and should be replaced with more descriptive alternatives.
#5about 4 minutes
Establishing a one-to-one mapping for concepts
Maintain clarity by assigning exactly one name to each concept, avoiding both synonyms and using one name for multiple different ideas.
#6about 3 minutes
A cautionary tale of catastrophic naming failure
The Knight Capital case illustrates how a seemingly small naming ambiguity, when combined with other system faults, can lead to massive financial loss.
#7about 5 minutes
Designing consistent and intuitive APIs
APIs that are consistent with domain nomenclature or established frameworks are easier for developers to learn and use correctly.
#8about 2 minutes
Keeping names updated as code and business evolve
Names must be re-evaluated and updated when underlying technology or business domain concepts change to prevent them from becoming misleading.
#9about 4 minutes
Summary of key principles for effective naming
The core principles of good naming are to avoid being misleading, consider the reader's perspective, respect context, and maintain names over time.
Related jobs
Jobs that call for the skills explored in this talk.
Dev Digest 201: Don't Stop Thinking, AI Slop vs. OSS Security, Rank ThingsInside last week’s Dev Digest 201 .
🧠 Despite AI you still need to think
🍋 Bitter lessons from building AI products
🤖 AI Slop vs. OSS security
📱 Cloning tap-to-pay on Android
🤑 Saving $500k/year by re-inventing S3
📄 AI reads manuals
🎥 Automating FFM...
From learning to earning
Jobs that call for the skills explored in this talk.