Skip to content

Clean Code by Robert C. Martin – Book Review

I’ve recently read “Clean Code” by Robert C. Martin and… I wish I’d read this book 10 years ago when I was starting my journey as a professional developer. Let me explain to you why I believe that every Junior Developer should read… at least part of this book.

Short info about the author,  Robert C. Martin, or Uncle Bob as some of you may know him, is an author of many books about programming. After reading Clean Code I started reading Clean Architecture so I can also review it for you, but going back to Clean Code, this is probably his most popular and well-known book.

1. Pros

Let’s start with the pros, the book is written using really simple language, so even if your English is not perfect, you should be able to understand it without any problem.

From my perspective, most of the rules described in this book are really worth following, regarding the language you are using for development. If only part of those rules would be obligatory for every software developer, a lot of projects I’ve met in my life would work better… some would work way better.

Another good thing is that the book is separated into independent chapters, each of them talking about different aspects of programming, like classes, comments, functions, variables etc. You can read them in any order, so you can start with what interests you the most.

Some of those rules are too strict in my opinion, like the max number of parameters in function, but despite this, they allow us to notice the problem of too many parameters in the functions we write. There are a lot more examples that at least help us to notice the problem.

Each chapter is separated into different types of rules you should follow or bad habits you should avoid, many of them are illustrated not only by words but also by short and simple examples written in Java. 

And here we come to the cons…

2. Cons

Just to clarify, the fact that this book was written mainly for Java Developers doesn’t mean that people programming in other other languages cannot take advantage of it. Examples are usually simple and you don’t have to know Java to understand them, but…

As I mentioned at the beginning, not everyone should read the whole book, because a significant part of it, (maybe a half of it?) is very very Java specific. If you are not a Java developer, those things will not help you at all. For example chapters about error Handling and Concurrency are so Java specific, that it’s very hard to use tips you can find there in other languages. 

Another problem is that it is easy to notice that this book is getting old, chapters like the one about formatting are no longer helpful, we have so many IDEs with auto formatting, linters and formatters, this stuff is really automated right now and this is only one example. 

Going back to age, this book was written mainly for Java developers, nearly 20 years ago, when the Object Oriented Programming paradigm was very popular… that’s a fact and a problem, because it’s not very helpful for programmers using functional languages, like clojure, elixir, some rules are not suitable even for languages which support multi-paradigm programming, mixing oop and functional.

3. Overall verdict

Ok, time for overall verdict. As I mentioned at the beginning, I wish I’d read this book 10 years ago when I got my first job as an Android Developer, programming in Java. If you are starting your professional career right now and you are programming in Java, then you should definitely read this book. If you are starting but writing in JavaScript, Python, Swift, Kotlin, or any other object oriented programming language then i believe it’s still worth to maybe borrow this book (not necessarily buy it) and read chapters about variables, comments, functions, class structures, those not Java specific, it will help you a lot to write better code, really. If you are working as a developer for more than 3 years, it will not help you a lot, because you learned those basic rules through multiple code reviews of your changes done by more experienced colleagues 😉

Ok, that’s it, I hope you enjoyed this review and it helped you, if you prefer to watch instead of reading then see my review on youtube:

Leave a Reply

Your email address will not be published. Required fields are marked *