Clean Code by Robert C. Martin
Clean Code by Robert C. Martin

Science · 2008

Clean Code review

by Robert C. Martin

Open in Superbook

The verdict

Clean Code is Robert Martin's extended argument that writing readable, maintainable code is a professional obligation, not an optional refinement.

Best for readers comfortable with technical depth. Reading time: 6h 15m.

Clean Code by Robert C. Martin
Clean Code by Robert C. Martin

Talk to Clean Code like its author wrote you back.

Get the ideas that fit your life — not generic summaries.

  • Chat with the book
  • Audiobook-style main ideas
  • Adapts to your life and goals
  • Helps you take action
Open in Superbook

What it argues

Clean Code is Robert Martin's extended argument that writing readable, maintainable code is a professional obligation, not an optional refinement. The book opens with a blunt premise: bad code is expensive, it slows teams down exponentially over time, and programmers who write it are not doing their jobs. Martin — "Uncle Bob" — spent decades consulting at companies where the codebase had become so tangled it was paralyzing development, and the book draws on those experiences throughout.

The bulk of the book is a chapter-by-chapter treatment of specific practices: meaningful naming, short functions that do one thing, clean comments (with a strong bias toward no comments, since comments often paper over unclear code), error handling without obscuring logic, formatting, and the design of objects and data structures. Martin's rules are opinionated. Functions should be small — very small, often three to five lines. Names should be pronounceable and searchable. Comments explaining what the code does are almost always a sign the code should be rewritten instead. Some of these rules have aged differently than others, but their underlying motivation — make the code readable to a human, not just executable by a machine — remains sound.

What it gets right

  1. 1.

    The primary audience for code is other humans — including your future self. Write code to be read, not just executed.

  2. 2.

    Functions should do one thing. If a function is doing more than one thing, it should be split. Very short functions are easier to name, test, and understand.

  3. 3.

    Meaningful names reduce the need for comments. If the name of a variable or function requires explanation, rename it instead of explaining it.

What it covers

Who wrote it

Robert C. Martin, widely known as "Uncle Bob," is an American software engineer and author who has been writing code professionally since the late 1960s. He is the founder of Object Mentor Inc. and a co-author of the Agile Manifesto. His other books include The Clean Coder, Clean Architecture, and Agile Software Development: Principles, Patterns, and Practices. Martin has spent decades consulting on large software projects and drawing conclusions from codebases that succeeded and failed. He is one of the most influential voices in the software craftsmanship movement.

Chat with Clean Code

Ask questions. Adapt it to your life. Get answers based on your goals.

Download on the App Store