Advanced Search
Start Your Free Trial

Overview

Other Readers Also Read...
Refactoring: Improving the Design of Existing Code

Refactoring: Improving the Design of Existing Code
by Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts

Agile Principles, Patterns, and Practices in C#

Agile Principles, Patterns, and Practices in C#
by Martin C. Robert; Martin Micah

This is the Safari online edition of the printed book.

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.

Amazon.com® Reader Reviews (Ranked by Helpfulness)

Average Amazon.com® Rating: 4.5 out of 5 rating Based on 62 Ratings

Top 10 Books on SW Development - A Must Read - 2010-01-24
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
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.

This is a very good book with one major caveat - 2010-02-03
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I really like this book except for one thing: there isn't much new material here.

This book is a very good summation of:
- Code Complete by Steve McConnell (I recommend the second edition)
- Agile Principles, Patterns, and Practices in C# by Bob Martin
- Growing Object-Oriented Software, Guided by Tests by Steve Freeman

On the plus side, it is well-written, concise, contains a nice balance of theory and practice, and does an excellent job of communicating the principals of Agile programming.

But if you've already bought the other books you don't really need this one.

A good book, but not essential - 2010-02-02
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Over numerous chapters, and three case studies, Robert Martin covers various patterns, techniques, and practices for writing clean code. He states that one must first write dirty code, and then clean it. That nicely sums up a large part of what programming is about. Robert shows refactorings in progress, and explains how each step makes dirty code a little cleaner. This works well to educate the reader. He also discusses details of error handling, unit testing, variable and function naming, encapsulation, and many other pieces of the programming puzzle.

The final chapter lists and details various code smells and how they can be remedied - essentially the entire book boiled down into one chapter. This chapter is worth the cost of the book.

Clean Code is a useful book; it is not a necessary read to get started programming in X, but it does contain best practices and patterns, making this book good supplemental material. Experienced coders will probably know most of the material already, but the book would be worth a read for the less experienced.

Great first chapter, but stop there - 2010-01-27
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Chapter 1 presents some very interesting thoughts from some well-known software engineers on what it means for code to be "clean". Good stuff. And there's a good, quick summary of Lean's 5S's, with obvious application to code:
- seiri - sort - organization
- seiton - systematize - tidiness
- seiso - shine - cleaning
- seiketso - standardize
- shutsuke - [self-]discipline

The rest of the book isn't so good. The approach isn't bad - take code and show how to improve it - but the preferred coding style is verbose, and to my mind, often considerably less maintainable than the original code.

Too many dogmas and too much Java - 2010-01-26
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I got a feeling that author filled his book with set of blank rules and dogmas that left light feeling that book is written by someone who is immature and has little real-life development experience. If he did not use so much Java in book and at least made an attempt to look at same set of problems as implemented in couple of different programming languages maybe he wouldn't be so absolute in his opinions.
This book somehow reminds me McConnell's "Code Complete" (which I greatly admire) but with lot of snobby "Agilista" maximalism.

Browse Similar Topics

Top Level Categories:
Software Engineering

Sub-Categories:
Software Engineering > Process
Software Engineering > Quality

Some information on this page was provided using data from Amazon.com®. View at Amazon >


About Safari Books Online • Terms of Service • Privacy Policy • Contact Us • Corporate Licenses • Help • Accessibility | See us on FacebookSee us on Linked InSee us on TwitterRSS

Copyright 2010 Safari Books Online. All rights reserved.