what is a kata?

Katas are very similar to games. You have a list of puzzles or user stories (depending on how written) and you get to complete them. They are also a great way to get used to the idea of TDD (test driven development) and write specifications for how something could or will work.

Katas are a great way to improve in a language or gain experience in a certain field, industry or situation.

Each problem is then described by tests, specifying how the kata will be completed.

Once the tasks are complete, you can then discovered things you like and dislike about both the way the specification has been written the way in which it has been solved.

Below is an example of katas I've been using, reviewing and improving.

Bowling Game Kata

Available: https://www.rubyplus.com/articles/301

The tutorial did not talk about what we'd be creating and then ending up with. Which is a little bit intimidating or confusing. It fails to live up to the principles of telling a story from the user's point of view (not the kata player).

What will the user of this application or software end up with? Ideally this would have said: We're going to create the basics of scoring in a game of bowling. It does not yet take into account the ideas of lanes, gutters and other principles when playing bowling. It's a simple kata.

On completing the kata I discovered my assumptions of the
implementation differed from the kata's article. For example: I disliked the roll method taking either a number or pin argument. This seemed quite unrealistic that someone rolling the bowling ball would know exactly how many pins would drop for them.

Then again, perhaps this could be allowed if the game was played by an experienced bowler.

After completing kata

I'd recommend after completing a kata to improve your own code or adapt the test to cater for different use cases of the code. Eg. after completing the Bowling Game article, I went ahead and added some test cases for if a strike? and a spare? occurs. You can find this on my github repository — http://github.com/kaichanvong/bowling-game-kata.

I also started to take into account that the BowlingGame class would also require a UserPlayer class that may interact with the game in some ways. Why UserPlayer? Because you may also have UserFan, UserManager and other types of users that. Ideally you would have a design phase or to reflect on the naming conventions and figuring out just how large you would like the BowlingGame environment and Users classes it may have.

But you can start to unfold your understanding of the task just being something you complete and forget, to learning more about yourself and a problem solver and the task you've solve and how it will change over time.

"Kata is a Japanese word (型 or 形) meaning "form". It refers to a detailed choreographed pattern of martial arts movements made to be practised alone." Found on [wikipedia](https://en.wikipedia.org/wiki/Kata external)