Search  for anything...

Clean Code: A Handbook of Agile Software Craftsmanship

  • Based on 5,583 reviews
Condition: New
Checking for product changes
$40.00 Why this price?
Save $9.99 was $49.99

Buy Now, Pay Later


As low as $10 / mo
  • – 4-month term
  • – No impact on credit
  • – Instant approval decision
  • – Secure and straightforward checkout

Ready to go? Add this product to your cart and select a plan during checkout. Payment plans are offered through our trusted finance partners Klarna, PayTomorrow, Affirm, Apple Pay, and PayPal. No-credit-needed leasing options through Acima may also be available at checkout.

Learn more about financing & leasing here.

Selected Option

Free shipping on this product

This item is eligible for return within 30 days of receipt

To qualify for a full refund, items must be returned in their original, unused condition. If an item is returned in a used, damaged, or materially different state, you may be granted a partial refund.

To initiate a return, please visit our Returns Center.

View our full returns policy here.


Availability: In Stock.
Fulfilled by Amazon

Arrives Wednesday, May 22
Order within 5 hours and 49 minutes
Available payment plans shown during checkout

Format: Paperback


Description

Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way. Noted software expert Robert C. Martin, presents a revolutionary paradigm with Clean Code: A Handbook of Agile Software Craftsmanship. Martin, who has helped bring agile principles from a practitioner’s point of view to tens of thousands of programmers, has teamed up with his colleagues from Object Mentor to distill their best agile practice of cleaning code “on the fly” into a book that will instill within you the values of software craftsman, and make you a better programmer―but only if you work at it. What kind of work will you be doing? You’ll be reading code―lots of code. And you will be challenged to think about what’s right about that code, and what’s wrong with it. More importantly you will be challenged to reassess your professional values and your commitment to your craft. Clean Codeis divided into three parts. The first describes the principles, patterns, and practices of writing clean code. The second part consists of several case studies of increasing complexity. Each case study is an exercise in cleaning up code―of transforming a code base that has some problems into one that is sound and efficient. The third part is the payoff: a single chapter containing a list of heuristics and “smells” gathered while creating the case studies. The result is a knowledge base that describes the way we think when we write, read, and clean code. Readers will come away from this book understanding How to tell the difference between good and bad code How to write good code and how to transform bad code into good code How to create good names, good functions, good objects, and good classes How to format code for maximum readability How to implement complete error handling without obscuring code logic How to unit test and practice test-driven development What “smells” and heuristics can help you identify bad codeThis book is a must for any developer, software engineer, project manager, team lead, or systems analyst with an interest in producing better code. Read more


Publisher ‏ : ‎ Pearson; 1st edition (August 1, 2008)


Language ‏ : ‎ English


Paperback ‏ : ‎ 464 pages


ISBN-10 ‏ : ‎ 4


ISBN-13 ‏ : ‎ 84


Item Weight ‏ : ‎ 1.76 pounds


Dimensions ‏ : ‎ 7 x 1.1 x 9.2 inches


Best Sellers Rank: #4,121 in Books (See Top 100 in Books) #1 in Software Design & Engineering #2 in Software Testing #3 in Software Development (Books)


#1 in Software Design & Engineering:


Frequently asked questions

If you place your order now, the estimated arrival date for this product is: Wednesday, May 22

Yes, absolutely! You may return this product for a full refund within 30 days of receiving it.

To initiate a return, please visit our Returns Center.

View our full returns policy here.

  • Klarna Financing
  • Affirm Pay in 4
  • Affirm Financing
  • PayTomorrow Financing
  • Apple Pay Later
Leasing options through Acima may also be available during checkout.

Learn more about financing & leasing here.

Top Amazon Reviews


  • Knowledge in This Tome is the Demarcation Between Programmers and Engineers
There are one or two chapters that don't apply if you're not programming in Java, but the vast majority of what you read here can be transformative when put into practice. Don't let the book's age fool you. These issues are as relevant as ever. Have you heard of SOLID? You'll learn about it here. Code smells? Learn how to avoid them here. Need code that is readable, maintainable, and usable, but seems like an impossibility? You'll get there by applying what you learn here. This isn't a book you read once and put down. You should get to know what's in it by reading and re-reading. ... show more
Reviewed in the United States on March 9, 2023 by Jeffry K. Lefevre

  • Good read
I was worried about getting a bootleg version but luckily I got the real deal.
Reviewed in the United States on April 13, 2023 by Amy

  • Must read for all software engineers levels
I have been in the software industry for four years but I think I need to read this book to write high quality and maintainable code. I recommend everyone to read it 👍
Reviewed in the United States on March 29, 2023 by Nawaf alsharqi

  • good resource for keeping the codes simple and clean
This book is an excellent resource for keeping the codes simple and clean.
Reviewed in the United States on April 1, 2023 by esi

  • Great if you are newer
I recently read Clean Code: A Handbook of Agile Software Craftsmanship and while I did enjoy it, I will say that some of the topics covered seemed like common sense to me. However, I have been coding for a while now and have had some great instructors, so it's possible that my prior knowledge and experience contributed to this. That being said, if you are new to coding or are looking to improve your software craftsmanship, I would highly recommend this book. It covers a wide range of topics in a clear and concise manner and provides valuable insights and best practices for writing clean, effective code. Overall, I think Clean Code is a great resource for anyone looking to elevate their coding skills. ... show more
Reviewed in the United States on January 9, 2023 by dreedski

  • Java focus
Good book but certain advice applies only to Java and isn’t applicable
Reviewed in the United States on February 18, 2023 by Colby Mainard

  • Excellent for the whole team
As CTO of a software company I co-founded, I'm not only looking for books that help me improve individually, but also books that the whole development team – from developers to architects – may find useful. Robert C. Martin’s Clean Code does both, and, like the good code described therein, it’s well written, clear, and easy to read. Martin includes many helpful examples and his suggestions are applicable to any programming language. Ideally, each developer takes charge of their own education and is constantly improving their skillset, an aspect that Martin covers in The Clean Coder. I view it as an important part of my job to help my team improve. To do so, I distill a lot of written material down to actionable components and provide that to my development team. Concepts from Clean Code have become very helpful guides for them. Below are a few of my favorite takeaways. The first is what Martin calls The Boy Scout Rule: “Leave the campground a little cleaner than you found it.” It’s a great concept, not only because it's simple to follow, but also because it has broad applicability and can be used on any project. Essentially, when a team member works on a piece of code, they should aim to improve it somehow by the time their task is finished. A few examples of this among many are: fixing an unclear variable name, breaking up a large function into smaller functions, or cleaning up a conditional for improved clarity. With everyone on the team doing this, the code improves over time and everyone feels responsible for the code whether they wrote it personally or not. Even if something can’t be addressed immediately, developers are encouraged to log the issues they see. Another of my favorite takeaways is the Three Laws of TDD, a concept I was able to quickly roll out to the team as a framework to follow for how TDD should be conducted on a project. This virtually ensures that all of your product code has test coverage. It also helps make most of your code SOLID (https://en.wikipedia.org/wiki/SOLID_%28object-oriented_design%29), since code that is built in this fashion is structured with SOLID concepts in mind. This is a must for effective testing. Finally, the topics of proper identifier names and commenting really resonated with me and my team. In our company, we tend to “adopt” existing codebases – projects that have already been started by other developers whose code is of widely varying quality. If we're lucky, it's structured well and demonstrates best practices and approaches in how it's constructed. Unfortunately, the code is sloppy at times and requires some TLC to get it in shape. A part of that process is understanding what the existing application does. As Clean Code correctly outlines, many comments are superfluous or even plain wrong and misleading. As a team, we don’t blindly trust the accuracy of existing comments and instead go right to the application’s code to determine what it does. This is where proper naming comes into play. With good names, the code reads like comments or as a narrative of what the application does, nullifying most needs for additional commenting. Simply put, the code comments itself. We also use refactoring tools to improve names and clean up comments as we go. Of course, by doing so, we’re also applying the Boy Scout Rule. Overall, Clean Code is a wonderful book with much useful and immediately-applicable information for developers of all levels. If you're looking for a book that will help make you a better developer, this will. ... show more
Reviewed in the United States on December 29, 2015 by Peter J. Hanson

  • Understand rules well before breaking them
TL;DR: even if it is not 100% correct -- few are -- do read this book. It's a really good one. I've been in the industry for 22+ years, but just started to reread this book. I consider it to be one of the top books _any_ software engineer, developer etc. should definitely read. Now, I disagree with some of things strongly. Uncle Bob is quite biased towards OOP, and in general issues presented are more complex and I'd claim that the only rule in software engineering is "it depends". In general my biggest complaint is that almost all of the rules I see anyone present come with a cost, with Clean Code it sounds like they are free. Eg. I really, really like simple, short functions/methods that do only one thing, but there is a cost of adding extra levels of abstraction. Even though I do prefer that over hundreds of thousands of lines of code in one method, it doesn't come as free (even though benefits far outweighs costs, given proper execution). The other example, just to mention an example, is on naming variables. In general I agree that long, good names are much better than short cryptic ones, but for short expressions like one-line transformations are often _easier_ to read if variables are short, and their scope is limited to that one line. As an example, any experienced Python developer would immediately recognize `squares = [ n**2 for n in numbers if even(n) and n > 10]` while using longer names would just make general form (where var names don't matter). Many guides nowadays describe this principle as "variable name length should be in relation to scope of the variable" which is a good rule, though I believe even that has exceptions. But having said that, I'd claim things would be in much, much better condition in software industry if people read this book. And definitely he has much more impressive track record than me, so I'm ready to accept that while I disagree with some of the things, I could very well be wrong (and still blind to it). SOLID principles are really good to understand, and the first one of those applies to _everything_, even if you use functional programming paradigm. Same goes for comments; comments are eventual lies, and developer should restrict IMO those to explaining _why_, not _what_. I read the book first time when I had been 5+ years in the industry or so, and it definitely made me a better developer. And while I now see rationale behind the rules in the book a bit lacking given complexity and variance in common problems developers face (mainly every solution has a cost), I still consider the book one of the best ones. Just get it and read it. ... show more
Reviewed in the United States on December 16, 2019 by Edvard Majakari

Can't find a product?

Find it on Amazon first, then paste the link below.