Katas for Practice

Background

The term Coding Kata is attributed to Dave Thomas of Pragmatic Programmers fame, and named after the japanese martial arts term which refers to a

‘detailed choreographed pattern of martial arts movements made to be practised alone or in a group’.

In development terms it’s a small coding exercise that is supposed to sharpen your skills through repetition (reptition is a good way to learn) and focus. The focus of the practice is for the student to decide, it could include any of the following which are examples.

Overall approach

  1. An important point is having a focus for the exercise. See section below
  2. Applying what you do intentionally and mindfully. I find trying to write notes or commit comments helps me form my thoughts, and name patterns or practices that I’m explicitly using, e.g. the code smell I see, or the refactoring I might be using.
  3. Timebox your efforts, use something like a pomodoro timer to break the kata into focussed chunks.
  4. Little and often - one pomodoro per day?
  5. Remember this is for you, so approach it to maximise your learning. Things you are getting stuck on, change gear or approach. Stop the line, the rules of ‘normal’ work don’t apply here (unless that’s your focus and intent).

Focus

The broad categories might well be overlapping - that is the nature of the (software development) beast!

  • Language & Environment skills
    • Using a new language and learn the features, or a new feature
    • Using a part of a language eco-system, e.g. new build process or testing library
    • Implementing using a different programming paradigm - e.g. Functional implementation vs. Object Oriented
    • Maybe learning a new IDE, or how to use better (shortcuts)
  • Analysis & Design Skills
    • Understanding requirements and features and how to express those as tests
    • Trying various types of analysis approach
      • Coding via diving right in
      • Trying a bit more upfront design
    • Learning TDD
    • Applying different design rules and patterns e.g.

Examples

Available in many places e.g. but can always adapt your own from articles or problems you need to solve

  • https://codingdojo.org
  • http://agilekatas.co.uk/katas
  • Blog post examples which is not a kata can be converted but has a set of requirements to be implemented e.g. 13 Ways to look at a Turtle
  • Book examples - e.g. Kent Beck TDD book

My Efforts

I will commit any katas I do to GitHub