Ratings50
Average rating4.2
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 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 a 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 Code is 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 This book is a must for any developer, software engineer, project manager, team lead, or systems analyst with an interest in producing better code.
Featured Series
1 released bookRobert C. Martin Series is a 18-book series first released in 2000 with contributions by Mike Cohn, Robert C. Martin, and 9 others.
Reviews with the most likes.
This is a book that one could get started on the idea of “good code” - clean, readable, elegant, simple, easy-to-test, etc. It has the usual stuff that you'd expect - good naming convention, testable code, single responsibility, short classes, short methods - but I feel like it takes them on overdose, going to extremes (IMHO) such as setting short explicit lengths, forbidding certain constructs, and what seems like refactoring for the sake of it.
I'd actually recommend other books like the Pragmatic Programmer or Code Complete; there's something about the way this book reads that irks me. I think it's more useful to highlight the attributes that clean code should have (which this book does do), then it is to declare outright what is “good” and what is “bad” (even in subjective areas like readability, comments, and formatting).
To their credit, the author(s) did state right out at the start that these are their very personal preferences, so that's all right - I'm just disagreeing on some of the more subjective areas.
Also a plus are a few actual and simple scenarios/use cases to show code clean up in action, but they aren't exactly really tricky bits of code, but rather straightforward examples - very good for developers new to the concept of clean code, but less so for developers already familiar with the basic ideas.
Read it with open mind,
I didn't agree with everything Author said,
But overall good lessons there.
The first few chapters of this book are thoughtful and compel the reader to take action with clear arguments for the benefits of improving code. The rest of the book dives into details that some readers may enjoy and others may want to skim.
Certainly a useful argument to write better code and improve code aggressively.