Clean Code
A Handbook of Agile Software Craftsmanship
Robert C. Martin
464 pages
- Software engineering
- Code quality
- Refactoring
About the book
Clean Code asks readers to examine code closely: what its names communicate, how its functions are organized, and how easily another developer can understand it. Robert C. Martin connects these everyday choices to the work of maintaining software over time.
What it covers
The first part introduces principles and practices for writing code, including meaningful names, function design, formatting, objects, and classes. Error handling and unit testing receive their own treatment, alongside test-driven development.
The book then works through case studies that improve existing code. These longer examples give context to the earlier recommendations: readers can follow the reasoning behind a change and consider how it affects the surrounding implementation. A final collection of heuristics and code smells provides a reference for recognizing recurring problems.
In the opening chapter, Martin treats programming as the precise expression of requirements. That attention to detail carries through the book's emphasis on reading and revising code, including the code developers inherit from other people.
Who it is for
The book is for programmers who want to improve how they write, review, and maintain code. Its worked examples also give teams concrete material for discussions about readability and coding practices. This entry refers to the original first edition.
See the publisher's overview and contents and the opening chapter.
My notes
I’ll add my notes here soon.