The most helpful favourable review

The most helpful critical review

78 of 83 people found the following review helpful

4.0 out of 5 starsBook title needs refactoring
This is a great book, and one which any developer will learn a great deal from. In most respects, it is a five-star book, but... the title is misleading. By rights it should be called "Clean Java Code".

Let me explain: I am an ActionScript developer, and bought this book to improve my code style and structure. For the most part, it has done that: the chapters...

2.0 out of 5 starsScattergun list of pet peeves
This book is best described as a list of "pet peeves" by the authors. I stress that this book is mainly written by a collection of authors - and not Robert C. Martin - because this is not stated in any promotional material and appears as an unwelcome surprise in the introduction of many chapters.

This is a great book, and one which any developer will learn a great deal from. In most respects, it is a five-star book, but... the title is misleading. By rights it should be called "Clean Java Code".

Let me explain: I am an ActionScript developer, and bought this book to improve my code style and structure. For the most part, it has done that: the chapters on naming, comments, functions and classes are absolutely superb. But then, huge swathes of the book are devoted exclusively to Java, and use some fairly complex (and, in my opinion, not very well formatted) code to convey their intention.

I don't generally have a problem with using Java-oriented books to learn more general programming concepts (Martin Fowler's "Refactoring" and O'Reilly's Head-First Design Patterns are both books I would recommend to anyone, regardless of their language-of-choice), but around 1/3rd of Bob Martin's book is virtually impenetrable to anyone who does not already have significant Java experience.

That said, I should re-iterate that this book will be hugely valuable to any programmer. I just wish that they had tried to use a little more pseudo-code and a little less real-world examples, with all of the complexities entailed, and I think a lot could have been done to make the Java code more readable for users of other languages.

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.

This book is best described as a list of "pet peeves" by the authors. I stress that this book is mainly written by a collection of authors - and not Robert C. Martin - because this is not stated in any promotional material and appears as an unwelcome surprise in the introduction of many chapters.

The first chapter pledges a lot and is very motivational - continuing the promise of the back cover "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." However, for the remainder of the book, the authors never quite get out of their individual rants and fail to provide any great insights beyond the obvious - concluding with a collection of scattergun practices that are more elegantly described in other books.

The value of the second part of the book - described as "several case studies of increasing complexity" - is not particularly evident. I found the Arg (first) and SerialDate (last) cases to be needlessly long. Everything there could be described in isolation. I had expected the second part of the book to be left as a series of short examples for the reader to work on - in the style of Java Puzzlers - but alas, it was a tour of some recent open source contributions that the author wishes to share with the reader.

The section on Concurrency was particularly shocking. The author appears completely oblivious to "Java Concurrency in Practice" by Doug Lea - discussing the 1999 predecessor by introducing it alongside a derogatory statement about maturity. Not only are the concurrency chapters skin deep, but I question why these chapters even made it into this book. Further evidence that the authors set out with no specific agenda when compiling the book, and have ended up with repetitive, sweeping generalisations that deliver only wholesale value across the board.

Clean Code is a valuable book for any programmer's bookshelf. Although a lot of the information can be found in other books on software development, particularly those covering "agile" techniques, the text brings everything into one place with a very readable and enjoyable style. I could've done with this about fifteen years ago, rather than learning many of the lessons the hard way over the years.

The book does have some minor issues though. As mentioned by a previous reviewer, it uses Java exclusively for the examples and assumes you are an experienced Java developer. Some of the examples can be heavy going for those unfamiliar with the language.

The book could also do with a bit more proof-reading. Ignoring a copyright of 2009, the words "it's" and "its" seem to have been swapped throughout the book, "an" replaces "and" in a handful of sentences, and there are even some words in the text that are completely wrong. A bit of shame considering.

This book is, believe it or not, a page turner! Yes, dear friends, you heard me. I know how boooorrriiing and dry can technical books of this sort be, but this one -- I actually read the whole of the Introduction chapter (which I do very rarely), then continued on to the first chapter, then the next, and next,... I read through the first 52 pages of the book in just a couple of hours!The book is very reader-friendly, witty, interesting, and simply great!I am now in the third year of a Software Engineering course and this book is certainly very helpful. With its help I hope to submit an extremely well readable and structured code to my final year project. I recommend this book to everyone!

Experienced coders will recognise lots of good and sensible advice in this book, unfortunately, despite being a book that emphasises readability and attention to detail, poor editing and proof reading often result in statements that are misleading, incomplete or simply incorrect. This should not a problem to experienced readers who will know what was meant, but it is enough to leave the people who should benefit from this book struggling.

Not so obvious is that this is a collection of essays from different authors so can sometimes be incoherent or contradictory.

Deeply disapointing is the chapter and appendices on Concurency. The author states that this is hard and then goes out of their way to prove it, providing very little in the way of positive advice or guidelines.

I knew this was going to be an excellent book from the moment I heard Uncle Bod describing his ideas of Clean Code at his key note at an ACCU conference. I bought the book there and then, but didn't start reading it until a couple of years later. More recently I got it signed by Uncle Bob at Skillsmatter. After just a few pages it propelled itself into my top three books every programmer should read (behind Kent Beck's Test Driven Development and The Pragmatic Programmer by Andy Hunt & David Thomas) and at the end it's still there.

The chapter on comments is worth the price of the book alone. I have worked in places over the last few years, where comments have been encouraged to explain the code, rather than writing code that explains itself. Another great chapter is the one on functions and the advice to keep them small is especially good and compelling. As I look back over the table of contents now, every chapter that describes how to improve an aspect of code is an absolute mine of good advice.

The final few chapters contain a number of refactorings. One on an application from the ground up and the others on existing code written by other people. This is the only place where the book got gratuitous and I must admit I skipped most of the final refactoring.

The final chapter is a summary of the advice given in the rest of the book and something I will find myself referring to again and again.

If you've read Test Driven Development and The Pragmatic Programmer, make sure you read Clean Code next.

Code blocks in the Kindle version of this book are rendered in a variable-width font, which detracts from their readability. Since the code samples are a very important part of the book, I can't award this a high rating if they are so difficult to read. Code should always be in a fixed-width font.

Also, the occurrence of grammar errors and odd typos is frequent enough to be distracting and irritating. At one point, "startlingly" is written "star-tlingly". Errors that stick out like a sore thumb indicate that this was not proof-read.

This book contains a lot of useful information for software developers regardless of the language in which they are developing. Most of the concepts apply to the majority of object-based programming languages in use today, and in this respect the book achieves its goal.

In order to demonstrate the concepts being discussed, the authors needed to use code examples and Java is the chosen language for this book. As a C# developer I find this a fairly common occurrence in books focussing on Software Engineering in general, and it doesn't usually cause me too many problems. It's generally simple to map the Java concepts across to their equivalents in C#, and many authors keep Java specifics to a minimum to aid this.

Unfortunately, in Clean Code some of the authors lose sight of the fact that this is a Software Engineering book and not a Java development book (either that or the publishers altered the marketing of the book after it had been written). Often, when discussing general concepts, the authors mention Java specific concepts, and in many cases it's clear it wasn't even necessary to do so.

The problem is acerbated by the book title and blurb on the back cover: nowhere does it mention Java. A developer may look inside the book and see Java code, but assume that the accompanying text is general. The reliance on Java knowledge should have been stated clearly in either the title or in the marketing blurb.

Overall, the book is a useful guide to developing maintainable software and I did manage to glean some interesting information from it. But it is less useful than it could have been had some of the authors worked out a way to demonstrate the concepts in a non-language-specific manner. Using Java as an example language is fine - discussing the concepts from a Java-specific viewpoint is not.

It is the most up to date and succinct piece of writing regarding the construction of good software from the ground up as well as tackling legacy code. It's jam packed full of gems and practical advice that you can apply immediately. There is no fluff and no waffling, the examples are awesome (all in Java although I code in C#) and apply to "real world" problems that we face every day. There is no way you'll put this book down after reading it and just forget about the lessons like so many other books.