

Buy anything from 5,000+ international stores. One checkout price. No surprise fees. Join 2M+ shoppers on Desertcart.
Desertcart purchases this item on your behalf and handles shipping, customs, and support to Slovakia.
๐ Code Smart, Not Hard!
Clean Code: A Handbook of Agile Software Craftsmanship is an essential guide for software developers seeking to improve their coding practices. This book emphasizes the importance of writing clean, maintainable code and provides practical techniques to enhance software quality and team collaboration.




















| Best Sellers Rank | #42,021 in Books ( See Top 100 in Books ) #4 in Software Testing #5 in Software Design & Engineering #18 in Software Development (Books) |
| Customer Reviews | 4.7 out of 5 stars 6,759 Reviews |
P**N
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.
A**I
Learning to leave the code cleaner than before
As part of our learning activities, we learn quite a few programming languages. We also learn designs, patterns, good coding practices, and many more. We don't usually spend time to learn how to write a good, readable code. The relevance of this book is enormous. Not just the programmers should read it, the education providers should also read it. In fact, the education providers should plan to include this in their curriculum associated with every programming languages. I started reading this book and finished it in almost three consecutive sittings. That way, the book is well structured, and the topics are well sequenced. The author cautioned at the beginning of the book that it is not for the armchair readers. The reader should spend adequate effort to read through the code examples, think through those, and try out some of those through self scribbling. This is indeed necessary for the coders. This is also necessary for the instructors of coding, or programming languages. I chose to skim through the examples with just enough thinking while paying attention to every detail of the English text. Such speed reading worked for me too. Such reading technique should work for all who are not into direct coding today, but was a programmer once upon a time, and spends a lot of time in conversing with the programmers nowadays. Coming back to the content of the book - this was quite informative and thought provoking. I read it fully and tried to jot down my takeaways from this book reading. I have got six of them. I learned the general rules for commenting, and summarized those in four points. I learned the general rules for code formatting, and summarized those in four points. I learned the general practice of code size - for a significant system, for a code file, for a typical function. I learned the general rules of organizing concepts and variables, and summarized those in five points. In fact, the definition of concepts was itself was a new learning for me. I learned the three laws of test driven development, rather I re-learned those once more while reading this book. Finally, I jotted down the final takeaway - leave the code cleaner than what you had started with. The book is full of good references, in fact at the end of every chapter. I tried to summarize the list of further readings, and I got another five book titles listed in my to-read list. I read it on my Kindle device, and on my desktop using Amazon Cloud Reader - the formatting was good. As coders, we all have the responsibility to leave the code cleaner than what we start with. As code reviewers, we all have the responsibility to comment on the cleanliness of the codes. As the supervisor or manager of coders, we all have the responsibility to communicate the importance of clean coding and to encourage coders towards clean coding. I will recommend to all these group of people to read this book, and practice the clean coding techniques described here. Good work indeed!
O**H
Mastering the Craft of Coding
What is clean code you might ask? One of the definitions that most resonated with me is that of Grady Booch, author of Object Oriented Analysis and Design with Applications: "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." The main premise of the book, as stated by the author, is: "learning code is hard work. It requires more than just the knowledge of principles and patterns. You must sweat over it. You must practice it yourself, and watch yourself fail. You must watch others practice it and fail. You must see them stumble and retrace their steps. You must see them agonize over decisions and see the price they pay for making those decisions the wrong way." The book is made up of three sections: The first one outlines the "principles, patterns, and practices of writing clean code". This includes topics such as naming, functions, comments, formatting etc. The second one, includes several working examples of code cleanup using the tools from the first section. The last section, includes a number of heuristics and smells that help identify the need for cleaning code. These smells are divided by area, such as environment, names, comments etc. What sets this book apart is the applicability, practicality and breadth of the concepts discussed. The last section of the book is of particular relevance as a starting point for identifying weaknesses or deficiencies in code. These then serve as a testing ground for applying the concepts introduced in the book. What the author stresses throughout his work, is the need to continuous practice and to clean the code in an iterative manner. A recommended read for anyone involved with the software development lifecycle regardless of experience. From a critical standpoint, the choice of some of the case study code bases was at times questionable given its abstraction. This made them hard to follow at times.
R**X
The way the craft ought to be...
For the past few years I began to doubt whether my understanding of the craft was even correct anymore. So many code examples in so called expert books are untestable procedural junk I couldn't imagine what had happened. Design patterns and unit testing seem to have lost their place in the world. Servlet and JSP books have always been crap that way but now books on SOA and the like technologies are that kind of junk code. It was refreshing to find a book that emphasized the craft of coding - tests, reusability, comments, logging, decoupling, dependency injection, small methods, design patterns and so on. These aren't rocket science and they should be second nature to developers by now. I breathed a sigh of relief when I read this book. Having said that there are a few problems with the book. The author mixes programming paradigm terms too promiscuously. For example, he makes extensive use of Java code and continuously refers to "functions" and "modules". In a book about clean code that should be cleaned up. The author shows a misunderstanding of JavaBeans and really should rewrite his somewhat snarky comments. His example of a JavaBean, for example, shows a list of Strings being passed in on the constructor and the class has no setters. A JavaBean by definition must have a no-arg constructor. His example had no setters (which is OK for non-mutatable fields). If that was the intent, however, the fields should have been final. Did he mean POJO? He puts this in a chapter on DTOs wherein he talks about data structures. I don't know how many times the fact that I was using a getter/setter saved me grief when compared to using an exposed field. Changing the internal field type based on some new requirement is a good example of how it can help. While the setter may initially look like little more than a pass through method for the "OO purists" -- bah, humbug -- it can end up saving rework of a large number of classes. It allows for overloading the setter for handling new types if the requirements change. If error conditions are determined that can be detected at the setter or getter level, the fact that one has the data structure wrapped has just saved a lot of headache. The distinction made between data structure and object in this sense is specious. These JavaBeans are generally little more than protective covers for the data and do little more than set/get the data. That all appears superfluous until it bites you. The very fact that they permit further modification to meet on-going challenges during coding shows why they are used instead of hanging fields out publicly and why they are more than just data structures in drag. Perhaps he should also look at the event properties mechanism that is available for use with JavaBeans as well. There certainly are valid criticisms of JavaBeans, unfortunately the book misses them by a long way.
J**Y
Top 10 Books on SW Development - A Must Read
I first met Bob Martin 15 years ago by reading his brilliantly lucid _Designing Object Oriented C++ Applications Using The Booch Method_. He was kind enough to help me sort out my own struggles with the writings of the "Three Amigos" and I've been something of a fan ever since. He followed with a number of excellent books; took the lead first on Patterns and then on Agile development; but now he has reached beyond his dedicated audience of serious software architecture geeks, with this extraordinary work on writing code well. This book ranks on any shelf that has either Code Complete by Steve McConne or Refactoring by Martin Fowler; both classics (though loyalty and enjoyment causes me to add Why Software Sucks by David Platt as belonging on that shelf as well). It is true that seasoned developers will find that they "already know" much of what is in the early portion of the book -- but my experience is that Martin has a unique ability to crystalize even common wisdom in a way that gives accepted practice new impetus and that expands my understanding of the implications of tenets I hold to but don't always fully implement. Bob Martin is known to many of us as "Uncle Bob," and with good reason; his writing is avuncular in the finest sense of being solid advice offered in good cheer and without condescension. All of that said, this is not a light weight book; while offering up the fundamental principles that separate yeoman programmers from the truly expert, he goes on to teach more (and more effectively) about test driven development in one chapter than most authors accomplish in a book. He does the same for refactoring and, I would argue, on the way he offers a brilliant introduction to Agile programming. While we're at it, let's note that the chapters on naming and on comments would serve well as a standard for any software development group and should certainly be required reading for all new developers. In short, this book is recommended without reservation to those who are not yet convinced they know all that can be known about creating great software. I own both the electronic and the hardcover version, and it was money very well spent.
N**N
Thank You
Very nice book. No smell. Worth it.
S**I
Java
I read the book Clean Code and really liked it. I learned how method and class names should be written, and Iโve started applying those principles in practice. Itโs truly one of the most outstanding books, and every developer should read it.
T**N
A Quick and Informative Read on Crafting Code
"Clean Code" informs developers how they can write code that is more readable and maintainable. The first section of the book covers identifying confusing code and rewriting it for topics such as variables, classes, and concurrency algorithms. These chapters contain snippets of code before and after some thought was taken to make the code's intent clear. Although the examples are all in Java, the principles could be applied to most languages. The second section contains case studies of taking source code and applying the ideas from the first section to contrast how much code can be more readable and maintainable. It was difficult to flip back and forth between pages to follow the differences, but the case studies succeed in showing iterative improvement in the source code. The final section is a short summary identifying when code might need re-factoring to improve readability. I believe "Clean Code" does a great job showing how code quality improves when someone writes or rewrites code with the will to make it better. Before reading this book, I applied some of the ideas from Robert Martin and the other authors, but after reading the book, I learned a lot how to write better code that I apply to my programming today. Just as Don't Make Me Think: A Common Sense Approach to Web Usability, 2nd Edition shows how poor web usability can confuse users and how to address it, "Code Clean" shows how poor code readability can confuse developers and how to address it.
A**.
Hat mir persรถnlich sehr gut gefallen
Ein Muss fรผr jeden, der besser programmieren will โ nicht nur fรผr Anfรคnger โClean Codeโ hat mir persรถnlich sehr gut gefallen und ich wรผrde es jedem empfehlen, der sich ernsthaft mit Softwareentwicklung beschรคftigt โ egal ob Anfรคnger oder erfahrener Entwickler. Als Ergรคnzung beim Programmieren lernen: Gerade wenn man neu ins Programmieren einsteigt, ist das Buch eine perfekte Ergรคnzung, weil es nicht nur zeigt, was man programmieren soll, sondern wie man es sauber und verstรคndlich macht. Es geht weit รผber Syntax und Sprache hinaus und behandelt die Prinzipien guten Codes โ etwas, das in vielen Kursen oft zu kurz kommt. Auch fรผr Fortgeschrittene absolut lesenswert: Auch wenn man schon programmieren kann, lohnt sich die Lektรผre. Das Buch hilft, schlechte Angewohnheiten zu erkennen und zu reflektieren, die sich im Laufe der Zeit eingeschlichen haben. Es geht dabei nicht um theoretische Regeln, sondern um praktische, nachvollziehbare Beispiele und konkrete Tipps, die man direkt umsetzen kann. Fazit: โClean Codeโ sollte jeder Programmierer kennen und gelesen haben. Es hat mir geholfen, meinen Code strukturierter, lesbarer und verstรคndlicher zu schreiben โ was nicht nur mir, sondern auch meinen Kollegen zugutekommt. Absolute Empfehlung fรผr alle, die sauberen, wartbaren Code schreiben wollen โ ein echter Klassiker der Softwareentwicklung.
C**A
Excelente libro
Excelente libro
S**M
Does what it says on the tin
Every so often, a book comes along that codifies best practice in a way that manages to illuminate the path from where things are right now, to a better place that we'd rather be -- things like Fowler et al. Refactoring: Improving the Design of Existing Code (Object Technology Series) or the Gang of Four Design patterns : elements of reusable object-oriented software . This is one of those books. And if much of the material is the sort that seems obvious in hindsight -- well, that is the mark of a well written book, to make the concepts that clear. Taking a series of real world examples -- open source projects with significant user bases, including FitNesse and JUnit -- a series of worked examples take us from good, or at least adequate, code, to a form which is better factored, and easier to read, with the steps along the way clearly marked. Yes, even some of Kent Beck's code is put under the microscope, and carefully polished that extra stage or two more. The reader is cautioned that, without working long hours to follow these examples, this will be just another of those feel-good books. I don't quite agree -- spending just a little time to follow the transformations, and then reflecting on one's own outpourings should be enough to make this a feel-bad book. All the sins from obscurely named variables to sprawling functions that gaily mix abstraction levels, we've all done them (especially programming in FORTRAN on minicomputers with slow stacks and a rule of thumb that 1 call ~ 40 loc in terms of performance). The maxim to take from the book is based on Baden-Powell's "Try and leave this world a little better than you found it", and owes to the same school of thought as "whenever you are in the garden, pull at least one weed". The meat of the book is in distinguishing what are the weeds from the intended crop. So read it, understand the examples, and then refer to it often -- like the other titles mentioned, it is a reference work, and should join them as among the most thumbed on your bookshelf.
U**G
must read
.
G**E
This book is worth it for any programming language.
This is a great book. I have found the concepts informative and helpful. I'm glad I decided to get it. As an aid, I listened to the audio book version while I followed along reading it. This made taking notes a dream. I am now on my way to leveling up my programming skills.
Trustpilot
2 weeks ago
3 weeks ago