The book The Clean Coder by Robert C. Martin is about attitude, discipline, and being a professional programmer. Although it covers subjects like testing strategies, refactoring, and estimating, it is not a pure technical book. Robert explores how soft skills matter in IT, how people communicate and collaborate and develop their skills, which turns the book into a code of conduct for the professional programmer. Let’s take a look at some of the topics that are covered in this book.
Professional according to Bob means having the right attitude, being disciplined and taking action. Examples described in book are taking responsibility when the software that you delivered contains defects (up to paying for the damage), testing all software before delivery, assuring that the software remains maintainable (for a challenging view on this, see reduce software maintenance: throw bad code away) and learning and practicing new techniques. Two techniques that I would like to add are code reviews and root cause analysis. Doing software reviews and inspections can significantly improve the quality of products. Root Cause Analysis enables prevention of problems, by identifying the main causes that have lead to the problem, and to initiate actions to prevent similar problems from occurring (more about them in business reasons for doing Root Cause Analysis).
This book is very serious about what professionalism is, and what is needed to become a professional! And I agree with that, I think that skills are crucial for a team to be successful and that professionals can drive quality in software development when they collaborate in stable teams.
Professionalism doesn’t come for free. The software development profession is maturing, which gives new insights on how you can develop yourself as a professional. It requires that you invest personal time, for instance by reading books or following on-line communities such as DZone and InfoQ. Also, it would be good to learn from mistakes that you make, to prevent that you make similar mistakes in the future. You have to exercise your programming skills, for instance by participating in a coding dojo (more about this in what drives quality: coding) or by learning to improve code quality with pair programming. Even better is to teach or mentor people, you can learn a lot from helping others to develop themselves. Which also helps you to become a better team member (if you want to read more about the needs of individual team members, see teams, what’s in it for me?).
Pressure and being disciplined
The book gives hint and tips to avoid getting under pressure, for instance by being clear on you commitments, keeping your code clean, and assuring that all code is tested before delivery. But you can’t always avoid it, so sometimes you have to work under pressure. Then you have to be disciplined, and develop the software using a process that you know is the best way to do it, given the situation at hand. Bob give the example of a surgeon who will perform the surgery together with the team of specialist in the way that they have been taught and know. When they have problem or have work under time pressure they won’t start yelling and slamming and throwing instruments. Surgeons working in an undisciplined way are not allowed to operate, for obvious reasons. So why should it be different for developers?
Reading this book confirmed to me what professionalism is about. The book helps programmers to increase theirs skills as team members, enabling them to deliver quality software with agile teams. The book is full of stories and experiences from the author’s career. The examples make it easy to read, and they also appeal to the reader to take a look at his own experience, and to learn from it. And that is what a “clean coder” is all about, delivering high quality software, on time, in a professional way.
Note: An earlier version of this book review has been published on DZone as Uncle Bob’s “The Clean Coder”.