Martial arts practitioners do katas over and over. At some point it becomes a form of art.
Can the same be done with code? Can you practice to code a certain piece of software over and over until it becomes art? Uncle Bob certainly thinks so. I started doing some katas a few months ago but a question was still nagging me : do they really help me become a better programmer? Does practice matter?
According to The Talent Code, the answer is probably yes.
The book explains how to harness your talent, how to become an expert in your field. And it seems that all world experts, no matter their field of expertise, have spent a lot of time (10 000 hours) practicing. Not just any kind of practice - you can't just play around and hope you'll learn something. There is a concept of 'deep practice'.
There are three parts to deep practicing:
- Chunk things up - slow things down, do a simple part of the whole
- Repeat - a lot
- Learn to feel what you are doing
I think that's what I've been unconsciously doing with katas. I wrote the same application every time. But every time I was improving, basing the next iteration on past experience. I was using more keyboard shortcuts, less code, better idioms to express myself. I was learning from my mistakes and becoming more efficient.
I believe that katas help me to 'deep practice'. It forces me to reflect on what I've done and learn from my mistakes. In the end I believe it helps me to improve.
That's good enough for me to keep doing it.
No comments:
Post a Comment