- A Handbook of Agile Software Craftsmanship, Robert C Martin is a rare book that you can carry along in your entire IT career path. Whether you follow Agile or Waterfall process, this book is must-have for all programmers.
Some good software development companies have those talented & disciplined programmers who share their best practices on coding to their peers and also to their juniors. If you are lucky enough to work for those companies then you will have the opportunity to create good code. This book provides answers why best practices in coding are important and useful.
This book covers many interesting topics apart from writing a clean code. It takes to many levels like refactoring, TDD, Concurrency, System design and so on.
The first chapter explains “What is clean code?” from eminent people like Bjarne Stroustrup, Grady Booch, Michael Feathers and others. It is interesting to see the definition of clean code from the deeply experienced programmers. It also make me remember a funny quote I once read “The best punishment you can give to a programmer is to ask him maintain the code that he wrote a year back
Chapters two through five covers some basic things a programmer will do while he/she starts coding. It covers meaningful names, functions, comments and formatting. The author sighted lots of bad codes first and then gave the good codes format. Someone who have used checkstyle
in their favourite IDE would appreciate the practices that the author is trying to convey.
The seventh chapter on Error Handling gives a good explanation on Error Handling. Especially topics like why you should not return codes upon error, handling null values while returning and passing values to functions were very well addressed.
Chapter eleven on “Systems” gives suggestions on keeping clean at higher levels of abstraction, the System level. Technical leads and Architect can get good set of information from this chapter. It insists on separation of concerns, simplicity, usage of dependency injections, POJO’s and so on.
Chapter thirteen is on Concurrency. It addresses the need for concurrent programming; difficulties faced while programming it and give suggestions for dealing with those difficulties. It gives an essence on concurrency principles, handling synchronized methods and testing a threaded code.
People who have done code upgrade or application upgrade would find chapter sixteen very useful. The author walkthrough the process of refactoring the class SerialDate from JCommon library, finally improving the code coverage and making it a clean code.
Altogether, the illustrated examples in all chapters can make any programmer grab the concept and apply it in practice. Since this book is using Java as examples, it would have been nice if the author would have covered a chapter on automating the process of code quality check with the help Maven plugin’s like cobertura, checkstyle, findbugs, pmd and so on.
Balaji Loganathan is a Certified Scrum Master and has 8 years of experience in IT field. He is working as a Senior Consultant in Xebia IT Architects, India