Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin Series)

Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin Series)
Price: $42.99 USD
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.

Author: Robert C. Martin
Publisher: Prentice Hall PTR
Customer Reviews
  • Excellent book
    Robert C. Martin is one of the most experienced developers in the world and tries to share his wisdom with the reader, and he does so in a very clear and well articulated way. He says clearly that the book is not THE answer, but rather a summary of his own opinions. <br /> <br />The book focuses on making easily maintainable code.
  • Clean Code Belongs on Every Coder's Shelf
    Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin Series) <br /> <br />First Impressions <br /> <br />I began reading this book with a couple of concerns. First, all the code examples were written in Java, and I haven't written much Java in the last couple of years. Secondly, the books seventeen chapters were written by seven different authors. In my experience, most books with this many authors are at best a collection of uneven chapters, or even worse a morass of redundancy and contradictions. In the end, neither of these concerns proved to be a problem. Instead they demonstrated the authors' point - that clean code is readable code. <br /> <br />The book's main premise is that clean code results from paying attention to the small details (details that are often overlooked in an effort to meet a deadline, or simply get the code working). This overriding theme allows for a seamless blending of each author's contribution into a cohesive readable whole. Where contradictions did occur, the authors not only acknowledged them, but successfully argued that they resulted not from conflicting ideas or approaches, but from differences in priority. Even the high quality of the editing, and typesetting silently reinforce this attention to detail and professionalism. Most computer books have several technical, typographical and grammatical errors in every chapter. I found only a single one in this book (several hundred pages in). This attention to detail silent reinforces the lessons presented in this book. <br /> <br />What's Inside <br /> <br />The book is divided into three parts. Part I (chapters 1-13) demonstrate what makes up clean code, what it looks like, and how to begin creating it (by picking better names, properly using comments, properly structuring your code etc.). By organizing this section into a series of small chapters the reader is able to begin applying these lessons from day one. <br /> <br />Part II (chapters 14-16) contains a series of case studies demonstrating how to apply the rules and guidelines from part I. These case studies show that like refactoring, cleaning code is an iterative process. One that should be undertaken at every opportunity, because all code no matter how good can be improved. <br /> <br />Part III (chapter 17) is a knowledge base. This section documents the rationale behind every change made to the code in the case studies. This final chapter shows that clean code requires both the ability to make the changes, and to know why they were needed. <br /> <br />Final Impression <br /> <br />No book alone can make you a better programmer, anymore than a screwdriver can make you a better carpenter. However, if you have the discipline to go beyond simply getting your code to work, and begin writing clean code, then this book can help you to become a better more professional programmer. If correctly applied over time, it can even serve as a bulwark against an increasingly fragile code base comprised of hacks, kludges and quick fixes. This book not only taught me how to improve my code, but demonstrated that its principals are both timeless, and language agnostic. I would recommend this book to anyone who writes code. <br /> <br /> <br />Clean Code A Handbook of Agile Software Craftsmanship <br />By Robert C. Martin <br />Published by: Prentice Hall <br />isbn: 0-13-235088-2 <br />
  • Demanding and useful
    I am a front end web developer with a couple years experience and I purchased this book to get a better idea of how to generate more readable and understandable code. And this book satisfied that need. If you are a very novice coder, that is to say that you do not yet know your syntax and are unfamiliar with OOP, you will want to wait to pick up this book. Not that all of the examples and discussion are super technical, just that are many assumptions and no explanations of these subjects. <br /> <br />One of the nice things about this book is its tone - it stays reasonably lighthearted, with a number of naive illustrations to maintain this feel. Nonetheless, it is abundantly clear that the author is fully versed and a master of code, ensuring that all the discussion is well considered and presented. <br /> <br />I do find that the author seems to go a little far in defining his ideal, tho perhaps that is the purpose of an ideal - to guide one's daily path and provide some information as you build out your projects.
Results provided by Amazon