· object-mentor clean-code uncle-bob books book-review

Clean Code: Book Review

The Book

Clean Code by Robert 'Uncle Bob' Martin

The Review

I first heard of Uncle Bob a couple of years ago in a conversation with Obie Fernandez and having previously read his Agile Principles, Patterns and Practices in C# book, when my colleague Alexandre Martins came back from JAOO Sydney raving about a talk on ‘Clean Code’ he’d seen I knew I had to buy this book when it came out.

In a good trend which I’ve noticed in a lot of Martin Fowler books, Uncle Bob lays out in the opening chapter how he thinks the book can best be read. Uncle Bob suggested that it was necessary to really immerse yourself in the code presented to get the most value from the book, I think I got a lot more from reading the book this way rather than just skim reading as I often tend to do.

What I learned

In summary

This is the best book I’ve ever read about writing good code. On multiple occasions I found myself wishing I could be on the same team as Uncle Bob to watch him carry out code improvements for real.

The key ideas that stand out for me are keeping your code simple and expressive - the code should do pretty much what you’d expect it to do so that when you (or anyone else) come back to read this can be done quickly and easily.

I would recommend reading this book before reading Agile Principles, Patterns and Practices as I found the examples used in this book to explain OO principles much easier to follow. You can then go into more detail on the theory in the other book.

I read this book while I was on holiday and not really looking at any real code. I think reading the book while working on a project would probably be even more valuable. I will certainly be referencing it frequently when I get back to the code.

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket