Overview
Uncle Bob's classic on software craftsmanship. This book fundamentally changed how I think about writing code.
Core Principles
Meaningful Names
// Bad
const d = new Date();
// Good
const currentDate = new Date();Names should reveal intent, avoid disinformation, and be pronounceable.
Functions
- Should be small (really small!)
- Do one thing
- One level of abstraction
- Descriptive names
Comments
"Don't comment bad code—rewrite it."
Good code should be self-documenting. Comments often become lies as code changes.
Key Takeaways
- Leave code cleaner than you found it - The Boy Scout Rule
- Code is read far more than it's written - Optimize for readability
- Professionalism - Writing clean code is a matter of professional pride
My Application
Since reading this, I've become much more intentional about:
- Function naming and size
- Reducing duplication
- Writing tests first (TDD)
- Refactoring continuously
Rating: 5/5
Essential reading for any programmer. While some examples feel dated (Java-centric), the principles are timeless.