In my opinion, if you strive for mastery as a software developer, then you should have deliberate practice sessions often. Every day, ideally. Deliberate practice is doing small exercises in areas of weakness to iteratively expand your skillset. Think about it. What do musicians, athletes, writers, actors, scientists, etc. all have in common? They have a discipline of frequent deliberate practice.
In the book Outliers: The Story of Success by Malcolm Gladwell, he explains how research bears out the effectiveness of deliberate practice:
The emerging picture from such studies is that 10,000 hours of practice is required to achieve the level of mastery associated with being a world-class expert–in anything. In study after study of composers, basketball players, fiction writers, ice skaters, concert pianists, chess players, master criminals and what have you, the number comes up again and again . . . It seems it takes the brain this long to assimilate all that it needs to know to achieve true mastery.
Dave Thomas explains that the reason why he and his cohorts created the idea of the code kata was very similar:
At the same time, Andy and I had been discussing a set of music tapes he had. Originally designed to help musicians practice scales and arpeggios, these had been so popular that they now encompassed a whole spectrum of practice techniques. We were bemoaning the fact that it seemed unlikely that we’d be able to get developers to do the same: to buy some aid to help them practice programming. We just felt that practicing was not something that programmers did.
There are even code kata “performances” now, like this performance of a top-down design FizzBuzz kata:
Since writing code is something that can be practiced, it doesn’t make sense not to practice coding, and do it often. Without practice, what kind of developer do you think you are? A frustrated one, maybe? A Google it and copy-paste coder, perhaps? Even a chip away and finally get it to work kind of coder. Any of these options is not really satisfactory is it?
Wouldn’t we all rather have the poetic experience that Fred Brooks describes in The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition (2nd Edition)?
Why is programming fun? What delights may its practicioner expect as his reward? . . . The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures . . .
Yet the program construct, unlike the poet’s words, is real in the sense that it moves and works, producing visible outputs separate from the construct itself. It prints results, draws pictures, produces sounds, moves arms . . .
Programming then is fun because it gratifies creative longings built deep within us and delights sensibilities we have in common with all men.