Category Archives: Programming Skills

Improving Your Programming Skills Through Kata

Programming is a complex skill, and there is usually more than one way to solve a given problem. Many self-taught programmers fall into the trap of assuming that if their program compiles and does the job they wanted it to do, then they’ve done a good job and they are good, to say, Magento programmers.
While this may be true if all you want to do is hack together scripts to make your own life easier or speed up repetitive jobs at work, when you’re producing commercial software your code must be fast, robust and error free. How can you test and improve your programming skills so that you go beyond “writing code that works” and learn to write code that is easy to read, fast and secure?

Code Katas

The Japanese use katas for almost everything. A kata is a series of steps that is repeated over and over to learn the right way to perform a task. Martial artists use kata to practice kicking, punching and blocking. Kata are also used for tea ceremonies and other things that must be done in a proper order, with a lot of attention to the details. Programming definitely lends itself to the use of kata.
Think about the kinds of problems you solve every day. How many of them involve sorting algorithms? How many of them require you to compare strings? What about parsing complex text documents or web pages?
Instead of just cobbling together solutions on the fly, try learning how to do those things using a few different libraries, algorithms or approaches. Practice each method as a Kata, until that algorithm is, essentially, hard wired into your programming and web design muscle memory.
It may seem like an odd approach, and solving trivial problems may seem menial at first –but once you can do data extraction, hashing, and trigram analysis in your sleep you’ll be glad that you made the effort to learn.