Friday 11 March 2022

Reference Review: The Clean Coder: A Code of Conduct for Professional Programmers

The Clean Coder: A Code of Conduct for Professional Programmers is a book I first picked up when I was working in a startup. My then-employer had a shelf full of these, and I spent what I call "decompression time" browsing through the chapters. Years later, I have decided to get off my ass and write a review.


This book was written by Robert C. Martin, a character of no small fame in the software industry. At the time of publication, he had over 40 years in the industry.

The Premise

This book is a collection of Robert C. Martin's opinions on what it takes to be a professional programmer. While there are times I consider some of his views extreme, to his credit, he makes no bones about the fact that all this is a matter of opinion.

You will likely not agree with everything I say here. After all, this is deeply personal stuff. In fact, you may violently disagree with some of my attitudes and principles. That's OK - they are not intended to be absolute truths for anyone other than me. What they are is one man's approach to being a professional coder.


I am not at a hundred percent agreement on his opinions, far from it. However, I have had so many people try to give me tech career advice (which I franky never asked for) even though they -don't know shit- are woefully underqualified to do so. Reading opinions from someone who is obviously qualified, for a change, feels like a breath of fresh air.

The Aesthetics

The cover used for this book is something like some kind of exploding star. Not really being into space photography, all I can really say is "eh, it's kinda pretty", and move on.

What's more interesting visually, however, are the little cartoons at the start of each chapter. They range from slightly lame to wickedly funny.

The Experience

Martin's writing style is certainly lively and dramatic, and very often, he does come off as more than a little self-righteous. Ultimately, though, this adds to the experience. To say I was both entertained and educated, would be an understatement.

Martin drops gems liberally, from his war stories to advice on scope negotiation, time management and design practices. There were times when I had to stop reading and conduct a Google search on the terms he was using.

Due to his vast experience, however, there were times where he simply lost me, especially when he was talking about tape decks and transistors. Robert C. Martin is a programmer from a very different era and sometimes it is easy to forget that.

The Interface

There are little snippets of humor, especially where the author has sprinkled footnotes. For the most part, content is neatly organized into coherent groups.

What I Liked

The Foreword to this book, contributed by Matthew Heusser, is great. It grabs you and really sets the tone for the rest to come.

The footnotes are really precious.

I resonated deeply with Martin's advice on owning one's career, taking responsibility for your professional growth and practicing one's craft. These were my dearly-held opinions long before I ever picked up this book.

The war stories in the book. In the course of reading the author's opinions on what it takes to be a professional, it is tempting to dismiss him as a pompous jackass. However, his war stories do not paint him as a hero. In fact, for the better part of them, these stories detail all the mistakes he made, both in technical terms and in terms of attitude.

This bit is something I have been ruminating on for a while, and Martin puts it nicely.
Perhaps we didn't get into programming to work with people. Tough luck for us. Programming is all about working with people. We need to work with our business, and we need to work with each other.


Martin's little summarization of various IDEs at the later part of the book, was charming.

Generally, there are some really thought-provoking parts in the book where the author illustrates just why a programmer going it solo is a terrible idea. It brught to mind all the times I've had to do it during my career, and how blissfully unaware I was at how unprofessional all this was. This gave me a very different, sometimes disturbing, perspective.

What I Didn't

Martin's very extreme take on professionalism.
What would happen if you allowed a bug to slip through a module and it cost your company $10,000? The nonprofessional would shrug his shoulders, say "stuff happens", and start writing the next module. The professional would write his company a check for $10,000!


This strikes me as unrealistic. What if your code is responsible for the loss of a life? Are you supposed to commit seppuku? What if your code is responsible for the loss of ten lives? Commit seppuku ten times? There's a certain point where that logic breaks down.

This bit. It's a common occurring theme in the book.
And indeed, doesn't it make sense that the first responsibility, and first goal, of an aspiring professional is to use his or her powers for good?


Martin makes this big song and dance about using our "powers" for good. I have my reservations, not because I want to do evil, but because I think assigning any sort of moral value to code is pure folly. Code is just code. Code is about solving problems. Whether that problem is about aiding orphans in Africa or getting past the security in a bank, is irrelevant as far as code is concerned. (The law, however, is another story)

However, and I mean this with great sincerity and respect, Robert C. Martin has done more in his career than I likely ever will. He is probably writing from that viewpoint. His code will affect far greater things than mine will.

Conclusion

This is not a bible, and should not be treated as such. It is, however, a good source of advice for those who find themselves at a loss as to how to proceed in their career, how to handle pressure and how to navigate the various intricacies of human communication.

After a re-reading of this text, I find myself strongly motivated to read the rest of his work.

My Rating

8.5 / 10

Time to get clean,
T___T

No comments:

Post a Comment