In ancient Japan, martial arts were not just defence
techniques, they were also a way of
life(jap. “budo”).
In this way of life they combined physical, moral and spiritual dimensions with the goal of self-improvement.
Since very young, Japanese kids would join a martial arts school, to study: karate, aikido, judo…
They learned martial arts using a technique called “Kata”.
The “Kata” technique was based in the principle of “learn by repetition”.
By practicing exercises in a repetitive maner the learner comes to a point where develops the ability to execute those exercises and movements in a natural and reflexive maner(“intuition”).
In this way of life they combined physical, moral and spiritual dimensions with the goal of self-improvement.
Since very young, Japanese kids would join a martial arts school, to study: karate, aikido, judo…
They learned martial arts using a technique called “Kata”.
The “Kata” technique was based in the principle of “learn by repetition”.
By practicing exercises in a repetitive maner the learner comes to a point where develops the ability to execute those exercises and movements in a natural and reflexive maner(“intuition”).
Today in software development the amount of trainers that recommend to use Test Driven Development Katas, is increasing. Some would even say that the TDD katas, are the only way to learn TDD. The original idea of the kata as a maner of learning software development was introduced by Dave Thomas(author of: The pragmatic Programmer: From Journey man to Master ).
Programming principles such as KISS(Keep It Simple and Stupid) or YAGNI(You Ain’t Gonna Need It ) are very common in the TDD philosophy, but the main mantra behind TDD is the RGR principle (Red, Green, Refactor).
From the theoretical point of view, the RGR principle seems often very simple to new TDD developers.
But when it comes to real life practice, in many occasions the complexity of the software can make less experienced developers to panic.
A great practice to avoid this is to practice a TDD kata once in a while.
Peter Norvost(author of the blog: Geek Noise), recommends to new TDD developers to do simple katas of 30 minutes every morning for 2 weeks.
Now I will show you an example of a very simple TDD kata and
then I will perform a demonstration.
1-An empty string returns zero
2-A single number returns the value
3-Two numbers, comma delimited, returns the sum
4-Two numbers, newline delimited, returns the sum
5-Three numbers, delimited either way, returns the sum
6-Negative numbers throw an exception
7-Numbers greater than 1000 are ignored
Note: Don't forget to set the quality to HD in the video player