Code koans and katas.
I have started learning a new programming language and I have been encouraged to use koans and katas.
Those words might sound unfamiliar to you and also it might seem that they have a complicated meaning and they are difficult to implement but, the fact is that those words have very simple meanings, they come from the Japanese language and are commonly used in martial arts.
Koans and katas are used to refer to two teaching methodologies, in which the student develop, improve and master her/his martial art techniques by focusing on practicing.
Over the years people realised that those methodologies were very effective and that they could be implemented in other areas, not only in martial arts, to learn a new skill or a new language.
In the software development, developers started to use koans and katas and to share the outcome of those practices via blog and conferences. The successful results and stories that come out of those practices encouraged more and more developers to use koans and katas to master their technics.
Now, those methodologies are being recommended from experienced developers to newbies to help mastering software skills, focusing on the practice, encouraging to spend more time practicing.
Not being very experienced yet but having used koans to learn ruby, I could say it’s a good start!
But, what is a koan?
A koan is a short lesson that will help you to expand your knowledge of a language, usually syntax, and it will eventually help you to improve your technique by looking beyond the obvious and thinking through.
The goal of a koan is not the answer, but thinking about the question.
Some good examples are:
I have learned most of the ruby syntax doing koans, although after some practice, It‘s good to move on into katas!
A kata is a similar idea, but more complex exercises where you will need to think them through and resolve them in order to get familiar with the concepts behind them.
The goal of a kata is to make you feel comfortable making mistakes and to have the ability to implement feedback.
Examples of a kata are the bowling game, fizzbuzz and coin changer. Short exercises where you put into practice the syntax you have acquired doing the koans.
You can go even further and try to do them in a limited time! You will need a bit of practice to be able to complete then in under 10 min, for example, but that is what katas are meant for!
There are other concepts from the martial arts that have also been translated to software, maybe after practising by yourself it’s a good idea to join a dojo!