The Clean Coder is like the bible of software professionals. I read this book few years back and found it very useful as it has laid down all-time principles(things we know but forget to bring to practice) for becoming a successful professional programmer. This is specially important for the ones beginning their career, and even for the old timers it’s never too late to start good things.
The Clean Coder – Code of Conduct for Professional Programmers
As the name suggests this book gives the guidelines to become a true professional, who cares for his/her software. The sooner you realize and start following these in your career, the higher and faster your value as a professional grows.
In this blog, I will lay down the important take-away from this book.
True Professionalism is all about Taking RESPONSIBILITY.
Professionalism is a marker of responsibility and accountability. When true professionals make a mistake, they takes the onus to make the correction too, without any external intervention. Few things to keep in mind:
- Do no Harm to Function : We do harm to the software we develop by creating or inducing bugs into the system. Here’s how we can reduce this harm.
- Have complete knowledge of what is being delivered as a software professional and strive for completely bug free delivery. Bug free delivery is impossible, you would say! The idea is to make sure that we work and improve on our imperfections as we learn and grow as a professional, and try to get closer and closer to THE Perfect Delivery.
- Don’t leave anything for QA. Never release a code for QA testing with known bugs. This is not professional totally!
- Make sure the code works by testing it thoroughly before releasing for the next step. The code should be designed to be easily testable.
- Automate the QA. This will ensure we test the code 100% after any change and release it with no known bugs.
- Do no Harm to Structure :
- The code design should be flexible and easy to make changes.
- Keep making small good-to-have changes to the code to improve its structure. Do this anytime you are touching the code with anything which will make it better. This makes the code flexible. This is called “Merciless Refactoring”. If the code is flexi, these random acts of kindness will not break it.
- At the end, we always do 100% testing to be sure!
The next BIG Focus has to be KNOWLEDGE
Its just putting some time aside daily for our knowledge, growth and learning.
As per Robert C. Martin, an additional 20 hours per week(around 3 hours daily) should be invested in this learning process.
This will be the best investment of your life! This has to be in addition to the time you owe to the employer. You have to make time out of your free time for this self enhancement.
As a part of this self growth initiative, listed below are some of the steps we must take:
- Aspire to keep yourself informed with all the happenings of your field.
- Learn all the minimum basics of technology. For a software professional, that list should start with,
- Design Patterns
- Design Principles
- Software development methods and lifecycles
- Software engineering patterns and artifacts
- Software development disciplines
- Keep increasing your horizon and learning new things related or not related to your current project in hand. (This is the idea behind improving your learnability too!)
- Make use of every opportunity at hand to contribute by sharing your learning as a mentor. If not directly mentoring, starting a blog could be an equally good step to share with the community and hear back from them.
- Collaborate with like minded individuals to discuss and share your learning. Join forums, subscribe to groups.
- In parallel to your technical knowledge, understand and master the domain for which you are building the solution. Have an understanding of the complete solution instead of just being focused on your area of work.
Learning to say NO and saying it at the Right Time with the Right Attitude
If you know something can’t be done in the time being asked for, but you still end up saying ‘I will try’, that’s a crime in professionalism.
There could be two reasons for this, either you don’t have the knowledge to give the right assessment or if you have the knowledge, you don’t have the courage to speak up to your manager. Both these fail you as a professional.
For the first one, you already know what you have to do.(remember rules 1 and 2)
For the second one, you have to learn to speak up if you feel something is not right.
The more critical the project, the more important is a timely NO.
No matter if the manager is a bossy one, or a pushy one, who doesn’t agree to agree. But go the extra mile to raise a timely Flag with a firm NO.
Make sure you have done your homework to support your NO with proper reasoning for your NO to be considered.
Learning to Say ‘YES’: A true professional’s “YES” carries a lot of weight and value
Three main steps to it:
- You SAY You will Do IT
- You MEAN You will Do IT
- You actually Do IT
The biggest truth is “Your NO gains acceptance only if your YES carries value !”
A True commitment(YES) sounds like, “I will do …… by ……”(Strictly No will try …)
This sentence is clear and crisp where you are stating something you will accomplish by a clear end time. It sounds simple but will not be always possible to implement so easily but definitely possible.
Here are the rules:
- If there are dependencies on the completion of your task, you can commit to the specific tasks which bring you close to the completion of the entire task by keeping close watch on the dependencies.
- If there is work which you are not sure of whether it can be done, commit to the specific tasks which you are sure of and which brings to closer to the completion of the big goal.
- If there is work which cannot be done in any way due to unavoidable circumstances(technical feasibility for instance), it’s time to reset expectations. Raise the flag and change the expectations.
Find ways to say YES and make it possible and meaningful!
“Even though the future seems far away, it is actually beginning right now.” ~Mattie Stepanek
- The Clean Coder ~ Robert C. Martin