Foreword
Introduction: What This Book Assumes
- The Foundation We Build Upon
- So why should we consider naming?
What is the Point?
- Arguing Against Naming Skill
- Does it Actually Matter?
- Features of Good Names
Readability as a Matter of Familiarity
- The Relationship Nature of Readability
- The Team as the Audience
- Profitable vs. Unprofitable Struggle
- Building Shared Familiarity
- Practical Guidelines
Context Creates Clarity
- The Hierarchical Nature of Code
- What is the domain name associated with this concept?
- Windshield Naming
- Unnecessary Context
- The Context Hierarchy
- The Variable Name Sweet Spot
- Domain Context: Speaking the Language
- Process Context: Understanding the Flow
- Mathy or Prosey?
- When to Use Minimal Names
- When Context Is Mixed
- Practical Guidelines for Context-Aware Naming
Length of Names
- The Factors To Consider
- So, No Single-Letter Identifiers?
- @ A name carries meaning
@@ Redundant Context Carries No Meaning
- Primacy
- Programming Nicknames
Rules of Thumb
Extraction and Naming - Two Sides of the Same Coin
- The Dual Nature of Code Organization
- Paragraph markers
- Naming Complex Expressions
- When Functions Aren’t Enough: Extracting Classes
- Cohesion: The Principle Behind Good Extraction
- The Naming-Extraction Feedback Loop
- Practical Guidelines for Extraction and Naming
Nouns And Verbs
- The Nouns
- The Verbs
- Other Parts Of Speech
- Frameworks
Rules of Thumb
Incrementalism
- Naming is a Process
- Intentionally Bad Names
- Obviously Temporary Names
- Renaming Safely
- Caveats
- The Art of Incremental Improvement
Conclusion
- Key Takeaways
- The Naming Checklist
- Moving Forward
- Further Reading
