Clean Coders: Put a Kata in your life

One of the last books I’ve read is Clean Coder, by Robert C. Martin ;

This book is not about Coding or programming techniques; it is about the professional behaviour… So it is about you, about how you have to behave inside your professional environment; how you have to put first your professional and technical values, and how you have to put them over the table.

Also, as a “Software Craftsman” you have to take into account that from the first key you have pressed in your life, until the end of your career…you will be always learning and teaching..This is a PATH..the path of the Craftsman.

By now, I would like to comment about one of the main aspects of this path…The Practice….The practice is important, and it is very important that it stays out of your work-time…it is your responsibility as  a professional to practice as the musician practice & learn   out his concerts, or  as the surgeon practice & learn out of her surgery operations…. It is your commitment if you are considering yourself a professional.

I’d like to quote here one extract from “Clean Coders” by Robert C.Martin, about his view over practicing:

Professionals practice. True professionals work hard to keep their skills sharp and ready. It is not enough to simply do your daily job and call that practice. Doing your daily job is performance, not practice. Practice is when you specifically exercise your skills outside of the performance of your job for the sole purpose of refining and enhancing those skills. What could it possibly mean for a software developer to practice? At first thought the concept seems absurd. But stop and think for a moment. Consider how musicians master their craft. It’s not by performing. It’s by practicing. And how do they practice? Among other things, they have special exercises that they perform. Scales and etudes and runs. They do these over and over to train their fingers and their mind, and to maintain mastery of their skill.

So what could software developers do to practice? There’s a whole chapter in this book dedicated to different practice techniques, so I won’t go into much detail here. One technique I use frequently is the repetition of simple exercises such as the Bowling Game or Prime Factors. I call these exercises kata. There are many such kata to choose from.

A kata usually comes in the form of a simple programming problem to solve, such as writing the function that calculates the prime factors of an integer. The point of doing the kata is not to figure out how to solve the problem; you know how to do that already. The point of the kata is to train your fingers and your brain. I’ll do a kata or two every day, often as part of settling in to work. I might do it in Java, or in Ruby, or in Clojure, or in some other language for which I want to maintain my skills. I’ll use the kata to sharpen a particular skill, such as keeping my fingers used to hitting shortcut keys, or using certain refactorings. Think of the kata as a 10-minute warm-up exercise in the morning and a 10-minute cool-down in the evening.

You can find the Robert C.Martin bowling game Kata here (PPT). And this is my version of the original BowlingGame Kata

I think that this kata is a very good starting point for every programmer that wants to start practicing over TDD.. TDD is important, but it needs a starting point where you change your way of coding….where you start to code Tests first .. It is easy if you are habituate to it

This is the link to the Amazon page of “Clean Coder” if you want to support this blog:
The Clean Coder: A Code of Conduct for Professional Programmers (Robert C. Martin Series)

Also another good sites to practice your Katas:
(from [JasonJL BLOG] Codewars, Leetcode, Hackerrank. Online Judges Reviews)


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.