0.- Introduction
08-02-2025 - Xavier Salvador
Overview
This series of posts is a quick-reference summary of Clean Code by Robert C. Martin. Each post covers one chapter or section of the book. Reading the full book is strongly recommended for deeper understanding.
Book Structure
The book is organized in three conceptual parts:
- Principles, patterns and practices — How to write clean code (Chapters 1–13).
- Case studies — Worked examples of cleaning real code, annotated with references to the heuristics (Chapters 14–16).
- Heuristics and Smells — A catalogue of the heuristics derived from the case studies (Chapter 17 and Appendices).
Key Ideas
- Learning to write clean code requires both knowledge and practice. Reading the principles is not enough — you must apply them.
- The case studies in the second part are the core learning vehicle: they show the heuristics in context, not just as abstract rules.
- The heuristics catalogue at the end is most valuable when read alongside the case studies, not in isolation.
Quick Reference
- Read the whole book, not just the principles section.
- Practice is required — knowledge without application does not produce clean code.
- Use the heuristics catalogue as a checklist, cross-referenced with the case studies.