(This is part 1 of 3 in my series of thoughts on The Clean Coder, part 2 can be found here, and part 3 can be found here)
After having read The Clean Coder by Robert C. Martin (Uncle Bob) I have enough stuff to fill out a couple of blog posts.
This is a repost from my old blog thecompilerdoesntcare.com and was originally posted in 2017.
The book has the subtitle “A Code of Conduct for Professional Programmers” – meaning that there is actually not much technical stuff in this book, but it focuses on the softer skills that developers need to have. The part of the job that isn’t actual software development.
I see the book as consisting of three parts.
- Professionalism: The responsibility of the developer to always act professionally, and what that actually means.
- Development skills: The discipline of producing well crafted software, and the habits and responsibilities you have to always keep improving.
- Teams: How it is the responsibility of the professional developer to be able to work effectively on a team, how to collaborate well, and the role mentoring plays in the profession of software development.
In this post I will focus on the first part – Professionalism.
Responsibility of The Professional
The first point Uncle Bob makes, is that a Professional takes responsibility for his actions. He takes his mistakes seriously, and for that reason he must hold himself to a high standard. As high a standard as a surgeon or a structural engineer. He must strive to perfection, and live by the mindset that QA should find nothing wrong with the code he produces.
All software produced by The Professional, should be automatically tested, so that he knows that the software works as intended. The only job QA should need to do is try and break the software in ways The Professional have not thought of, not find errors.
The Professional needs to develop his skills as technology advances and newer and better ways of doing things becomes available. Just like you wouldn’t want a doctor operating on you if he haven’t learned anything new in the last 20 years, you wouldn’t want to use a piece of software that was created using 20 year old methods.
The Professional never stops learning, and he always finds way to improve his knowledge and skills.
The Professional practices. He spends, at least a portion, of his own time to better himself. It is not the responsibility of his employer to train him, it is solely his own. A musician is not paid to practice, he is paid to perform. No one wants to buy a ticket to see a professional musician practice – they expect that he has spent the required time practicing so that he can put on a great show for the audience. In the same way, the employer pays The Professional to perform when he is at work, and to practice enough in his own time to be able to do that.
It is also the professional’s responsibility to have domain knowledge of the field he is working in. If he is in banking, he should at least know the basics of how banking works. If he works on a webshop, he should know something about the products sold in the shop, something about how the business works, and something about the customers using the webshop.
It is his responsibility to work with the customer to provide them with a solution that actually solves the problems the customer has – and to solve a problem, one must first understand it.
“No” is a complete sentence
Taking responsibility also means telling the truth, even if it is inconvenient. That means that he is able to give a firm ‘no’ and stick to it, if he knows that he is being asked to do something that is impossible.
Uncle Bob has several examples of where a developer is behaving unprofessionally, by agreeing to ‘try’ to make a deadline, even when he knows it is impossible.
Even though it might get him out of a difficult conversation, he is just postponing the issue and ending up putting himself in a bad light for not living up to his promise (“I’ll try” is a promise!). Not only that, but it also hurts the developer’s team, the company he works for and ultimately the customer because plans are made based on his promises, that will have to be changed when he is inevitably unable to deliver on time.
The solution to this, according to Uncle Bob, is to stand firm and try to work out why the deadline is what it is, and find out if what is actually needed is a subset of the task. By working together and finding an achievable goal, everyone will get the maximum value possible out of the situation and plans will be made that can be kept.
That is professional behavior.
My ultimate goal, as I have mentioned here before, is to one day be able to call my self a Craftsman. A master developer. A true professional. In The Clean Coder, Uncle Bob describes some of the values he thinks a Professional Software Developer should have. It has been very inspirational, and have given me a way to think about how to behave at work, and how to constantly improve my skills outside of work. Some of these things I have naturally done without really thinking of the reasons, and other things I will start doing because of the reasons he gives in his book.
This was the first of a three posts about The Clean Coder by Robert C. Martin – stay tuned for part two.