

🚀 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 | #29,092 in Books ( See Top 100 in Books ) #2 in Software Testing #3 in Software Design & Engineering #11 in Software Development (Books) |
| Customer Reviews | 4.7 out of 5 stars 6,725 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.
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.
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!
T**Y
Instills a mindset or way of thinking about programming
This is a critical thinkers book. It gives the reader a basis to use within their own programming style and language of choice. The code examples are written in Java and are there to show how to refactor code based on the principles and reasoning within the book. This is not a book that I take as a specific do this or else, more of a guide that explains why you should consider writing code in the way described. Essentially the lesson is to create code that is small, has a specific purpose and does that one thing. When functions or methods begin to stray into doing multiple things spin those code pieces off on their own and repeat. What I get from this book is a mindset or way of thinking about programming. To create code that is cohesive, is small, does not have unnecessary parts. When these principles are broken find a way to refactor or eliminate the additional pieces. It is not just about taking away or keeping code small but adopting a way of thinking about the design of the program and how each piece interacts with the other parts. The suggested line lengths of functions mentioned and other very specific examples is more where your critical thinking comes into play. I do not program in Java so many of the language specific scenarios do not apply to me. in some languages you just can't have or do some of the things suggested. Though as a general rule of thumb I find the examples helpful and when I mean general rule of thumb I do not mean a specific line count or size but a simplistic do as little as possible to achieve the goal. Simplify. Simplify. Simplify. I purchased and received the 16th printing of this book, published February 2016. There are no weird formatting or printing issues with the book as others have mentioned. If you have the ability to reason and think critically, being able to adapt examples and suggestions to your own style and language then I highly recommend this book. The contents are NOT common sense and do not come naturally to the uninitiated. The book does take you by the hand in a certain way leading you from the process of just make the program work to thinking about the logic design and function of your programs. When you are in situations where redesign is not possible the principles learned from this book will help you to refactor when possible and write new code that is better, smaller, tighter. Making you a better more valuable programmer.
R**L
Changed my way of coding
Before reading this book I used to develop ad-hoc, repeated code several times across several modules. The architecture where I currently work doesn't help in the reusability matter, there isn't a common module. But anyway, this book has shown me the real cost of dirty code and how I wasn't helping at all my sucessors and team mates and above all it has shown me how I was acting unprofessionally. The book, inside its medium constraints (display, formatting, page size, etc.) is very thorough into showing examples of bad coding and how to refactor them. It talks about some principles and practices which help into creating clean code, pherhaps others books elaborate those principles (Single Responsability for instance) in greater detail and the author gives references to those books. Of course each project has its own characteristics, it is up to developer to apply the practices according to the circumstances. You will have to think a lot to find out which patterns would achieve a cleaner code. But, at least for me, it has helped me building components that are easier to mantain and change. And when I write clean code it feels like the computer is working for me, what would first require several Ctrl+C and Ctrl+V to implement and much more keystrokes to change, now require just some refactoring (in Eclipse IDE) but also a lot of brainpower, which much better used at refactoring rather than in understanding (namely reading lots of classes, endless scrolling, remembering where is the function that you need,etc. just to understand a single method) So, in short, it is a terrific starting point to produce clean code (easier to understand, change and mantain), that will not hinder yourself or your teamates later, but it is in no way a one-size-fits-all formula, In fact there isn't such thing, at least in my opinion.
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.
D**N
Masterpiece. Must Read.
Masterpiece that every Developer, Engineering Manager, Agile Coache, Scrum Master serious about their profession should read. Nothing comparable.
A**R
SOLID
It shows some good examples
Trustpilot
Hace 2 semanas
Hace 1 día