An Authoritative Guide to Designing Code That Lasts
Chapter 1: What Maintainability Actually Means
- The True Cost of Unmaintainable Code
- What “Maintainable” Actually Means
- How to Measure Maintainability
- The Timeless Principles
- Judgment Over Rules
- What This Book Is and Is Not
- Chapter 1 Synthesis
Chapter 2: Requirements, Domain Modeling and Specification
- Writing Specifications That Survive Change
- Domain Modeling Fundamentals
- Bounded Contexts and Language Boundaries
- Requirements That Resist Obsolescence
- Traceability Without Bureaucracy
- Avoiding the Ambiguity Trap
- Chapter 2 Synthesis
Chapter 3: Architecture and System Design
- Architectural Stability
- Choosing Monolith vs Microservices
- Layered Architecture Done Right
- Designing for Failure and Change
- The Architecture Runway
- Documenting Architecture That People Actually Read
- Chapter 3 Synthesis
Chapter 4: Modularity, Cohesion and Coupling
- High Cohesion
- Low Coupling
- Module Boundaries
- Information Hiding and Encapsulation
- Dependency Management Within Code
- Detecting and Fixing Structural Smells
- Chapter 4 Synthesis
Chapter 5: Abstraction, Separation of Concerns and Naming
- Good Abstraction vs Over-Abstraction
- Separation of Concerns in Practice
- Naming That Communicates
- Naming at Scale
- Self-Documenting Code
- The Lie of “Obvious” Code
- Chapter 5 Synthesis
Chapter 6: Functions, Classes and Data Structures
- Function Design
- Class Design
- Data Structure Choices
- Immutable Data
- Records and Value Objects
- Avoiding Anemic Domain Models
- Chapter 6 Synthesis
Chapter 7: Testing Strategies and Testability
- The Testing Pyramid
- Writing Tests That Survive Refactoring
- Testability as a Design Quality
- Mocking and Dependency Isolation
- Property-Based and Example-Based Testing
- Maintaining Your Test Suite
- Chapter 7 Synthesis
Chapter 8: Error Handling, Logging and Observability
- Error Handling Philosophy
- Exception Design
- Logging for Humans and Machines
- Observability Beyond Logging
- Making Systems Debuggable
- Incident-Friendly Code
- Chapter 8 Synthesis
Chapter 9: Refactoring, Technical Debt and Code Review
- Refactoring as a Discipline
- Managing Technical Debt
- Code Review That Improves Maintainability
- The Refactoring Catalog
- When Not to Touch Working Code
- Debt Prevention Habits
- Chapter 9 Synthesis
Chapter 10: Version Control, CI/CD and Automation
- Git Practices for Maintainable History
- CI Pipelines That Protect Quality
- Automated Tooling That Earns Its Keep
- Deployment Strategies That Reduce Risk
- Infrastructure as Code
- Automation That Doesn’t Become a Liability
- Chapter 10 Synthesis
Chapter 11: Distributed Systems, Databases and Cloud-Native Maintainability
- Distributed System Complexity
- Database Design for Maintainability
- API Design and Backward Compatibility
- Cloud-Native Patterns That Help Versus Hurt
- Configuration Management
- Dependency Upgrades Without Pain
- Chapter 11 Synthesis
Chapter 12: Teams, Culture and Long-Term Evolution
- Team Conventions That Stick
- Developer Experience as Maintainability
- Knowledge Sharing and Bus Factor
- Scaling Teams and Codebases
- Legacy System Strategies
- The Maintainability Mindset
- Chapter 12 Synthesis
Conclusion
Glossary
References
Tip Index
- Chapter 1: What Maintainability Actually Means (Tips 1–85)
- Chapter 2: Requirements, Domain Modeling and Specification (Tips 86–173)
- Chapter 3: Architecture and System Design (Tips 171–257)
- Chapter 4: Modularity, Cohesion and Coupling (Tips 256–343)
- Chapter 5: Abstraction, Separation of Concerns and Naming (Tips 341–430)
- Chapter 6: Functions, Classes and Data Structures (Tips 426–513)
- Chapter 7: Testing Strategies and Testability (Tips 511–600)
- Chapter 8: Error Handling, Logging and Observability (Tips 596–687)
- Chapter 9: Refactoring, Technical Debt and Code Review (Tips 681–773)
- Chapter 10: Version Control, CI/CD and Automation (Tips 766–861)
- Chapter 11: Distributed Systems, Databases and Cloud-Native Maintainability (Tips 851–948)
- Chapter 12: Teams, Culture and Long-Term Evolution (Tips 936–1000)