Book Review: Clean Code by Robert Martin
Clean Code is all about the code already written, about the code you write and about the code to be written. If you are fan of Robert Martin’s books and his articles then you wouldn’t have missed this one. For those not aware of Robert Martin also popularly known as Uncle Bob you must read about him and his contributions to Object Oriented Design and Software Craftsmanship in general.
What this book is about?
- Principles to guide you to write code that not only works, but is pleasant to read, easier to maintain and enhance.
- Help a developer to start transition towards being craftsman in other words start their journey to be craftsmen.
Salient feature of the book:
- The book is about code and hence you see lot of code examples for each principle described.
- The code examples are not some toy examples, but snippets picked from Open Source projects like Apache Commons, JUnit, Fitness framework.
- Also throws light on the design of the system, testing and concurrency.
- A case study which uses an Open source code base and refactors the code applying the clean code principles and using TDD.
Who should read this book:
- Any one who wants his code to be understandable and not cursed by other developers who get to work on that code.
Why should you read this book:
- Writing clean code may not give immediate benefits at all times, it is also not usually recognized by your boss ( there might be exceptions to this), but being a developer (and to be software craftsmen) its our responsibility to write code that doesn’t rot and is easily enhanceable.
- This book takes you in the right direction and there are lot of such books like Code Complete which enhance and give you different perspective.
Some suggestions while you read this book:
- There is a chapter which has listed all the code smells and possible solutions to eliminate them. Its important to read this regularly and implement them.
- The last few chapters are code intensive and you might get a bit bogged down by the volume of the code. It will serve you as good example of how to apply the principles, you can read them incrementally.
- There are lot of principles discussed and by the end of the book you would not remember all of them. So keep revising and implementing them.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)