Cover of Clean Code: A Handbook of Agile Software Craftsmanship

Book Highlights

Clean Code: A Handbook of Agile Software Craftsmanship

by Robert C. Martin

Screvi keeps your highlights from books, articles, newsletters and more in one place, so you stop forgetting what you read.

What it's about

This handbook argues that professional software development requires prioritizing readability over speed. It provides practical patterns and heuristics to help programmers write code that is expressive, maintainable, and easy for others to understand.

Key ideas

  • Readability is king: Developers spend far more time reading code than writing it, so clarity directly impacts productivity.
  • Comments are failures: Code should be expressive enough that comments become unnecessary, as redundant notes often become misleading over time.
  • Small, focused functions: Functions should do one thing, do it well, and remain extremely concise to keep logic straightforward.
  • Meaningful naming: Variables and functions deserve careful naming to eliminate the need for extra explanation, as descriptive names act as documentation.
  • The Redundancy Rule: Duplication is the primary enemy of clean design because it increases complexity and creates more surface area for bugs.

You'll love this book if...

  • You want to transition from simply writing functional code to mastering the craft of professional software engineering.
  • You are tired of spending hours deciphering messy codebases and want actionable rules to improve your own output.

Best for

Software developers focused on long-term maintainability and professional growth.

Books with the same vibe

  • The Pragmatic Programmer by Andrew Hunt and David Thomas
  • Refactoring by Martin Fowler
  • Working Effectively with Legacy Code by Michael Feathers

30 popular highlights from this book

Key Insights & Memorable Quotes

The most popular highlights from Clean Code: A Handbook of Agile Software Craftsmanship, saved by readers on Screvi.

Truth can only be found in one place: the code.
Save
Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code. ...[Therefore,] making it easy to read makes it easier to write.
Save
It is not enough for code to work.
Save
So if you want to go fast, if you want to get done quickly, if you want your code to be easy to write, make it easy to read.
Save
You should name a variable using the same care with which you name a first-born child.
Save
A long descriptive name is better than a short enigmatic name. A long descriptive name is better than a long descriptive comment.
Save
Clean code always looks like it was written by someone who cares.
Save
Of course bad code can be cleaned up. But it’s very expensive.
Save

Keep the quotes that hit you. Save them to Screvi with this book's top highlights.

Save free
Clean code is not written by following a set of rules. You don’t become a software craftsman by learning a list of heuristics. Professionalism and craftsmanship come from values that drive disciplines.
Save
Redundant comments are just places to collect lies and misinformation.
Save
It is not the language that makes programs appear simple. It is the programmer that make the language appear simple!
Save
There are two parts to learning craftsmanship: knowledge and work. You must gain the knowledge of principles, patterns, practices, and heuristics that a craftsman knows, and you must also grind that knowledge into your fingers, eyes, and gut by working hard andpracticing.
Save
You are reading this book for two reasons. First, you are a programmer. Second, you want to be a better programmer. Good. We need better programmers.
Save
One difference between a smart programmer and a professional programmer is thatthe professional understands that clarity is king. Professionals use their powers for good and write code that others can understand.
Save
Don’t Use a Comment When You Can Use a Function or a Variable
Save
Perhaps you thought that “getting it working” was the first order of business for a professional developer. I hope by now, however, that this book has disabused you of that idea. The functionality that you create today has a good chance of changing in the next release, but the readability of your code will have a profound effect on all the changes that will ever be made.
Save

Keep the quotes that hit you. Save them to Screvi with this book's top highlights.

Save free
Programmers must avoid leaving false clues that obscure the meaning of code.
Save
The proper use of comments is to compensate for our failure to express ourself in code. Note that I used the word failure. I meant it. Comments are always failures.
Save
Honesty in small things is not a small thing.
Save
The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that.
Save
Writing clean code is what you must do in order to call yourself a professional. There is no reasonable excuse for doing anything less than your best.
Save
When you see commented-out code, delete it!
Save
Whatever else a TODO might be, it is not an excuse to leave bad code in the system.
Save
First Law You may not write production code until you have written a failing unit test. Second Law You may not write more of a unit test than is sufficient to fail, and not compiling is failing. Third Law You may not write more production code than is sufficient to pass the currently failing test.
Save

Keep the quotes that hit you. Save them to Screvi with this book's top highlights.

Save free
FUNCTIONS SHOULD DO ONE THING. THEY SHOULD DO IT WELL. THEY SHOULD DO IT ONLY.
Save
Duplication is the primary enemy of a well-designed system. It represents additional work, additional risk, and additional unnecessary complexity.
Save
Clean code is simple and direct. Clean code reads like well-written prose. Clean code never obscures the designer’s intent but rather is full of crisp abstractions and straightforward lines of control.- Grady Booch author of ObjectOriented Analysis and Design withApplications
Save
SRP is one of the more important concept in OO design. It’s also one of the simpler concepts to understand and adhere to. Yet oddly, SRP is often the most abused class design principle.
Save
A long descriptive name is better than a long descriptive comment.
Save
I like my code to be elegant and efficient. The logic should be straightforward to make it hardfor bugs to hide, the dependencies minimal to ease maintenance, error handling complete according to an articulated strategy, and performanceclose to optimal so as not to temptpeople to make the code messy with unprincipled optimizations. Clean code does one thing well.-Bjarne Stroustrup, inventor of C++and author of The C++ ProgrammingLanguage
Save

Find Another Book

Search by title or author to explore highlights from other books.

Try it with your highlights

Create your account, add your highlights and see how Screvi can change the way you read.

Try It With Your Highlights14-day free trial. No credit card required.