Friday 15 July 2011

Software Developer != Zen Warrior

Over the last few of years we’ve seen the terms katas, dōjō’s and koans enter the vocabulary of software developers, if you spend some time looking into these terms and how they are used in relation to software you’ll find people drawing comparisons between software development and martial arts and I’m telling you here and now that just because you practice software katas in coding dōjō’s and can solve a software koan you are not some sort of software Zen warrior, you are not Neo in the matrix, you’re a software developer. Fact.

These terms kata, dōjō and koan are loaded with semantic meanings which most developers know nothing about, they are just a “cool” term to use to represent something which could otherwise be seen as boring and unlikely that a lot of developers would actually look at, lets be honest they represent exercises, coding with other developers and guided learning, nothing more.
The big issue for me with these terms is that if, like me, you have practiced a Japanese martial art that has Kata’s or taken the time to read and perhaps study Zen Buddhism then the way these terms are used in software development are just plain wrong.
In this post I’m going to elaborate on try to show that the problem is with these terms, why they shouldn’t be used and propose alternatives that better fit with the intent behind the actual activity.

Kata

Problem

Lets take a step back here and look at what a Kata is in martial arts:
“detailed choreographed patterns of movements practised either solo or in pairs” Wikipedia
So a kata is a set of movements/techniques that are always practiced together, their primary use in many martial arts is around grading (moving to the next belt), you don’t need to understand what the movements are just that you need to be able to prove you can execute the movements/techniques correctly and in the right order. Katas are most frequently associated with Japanese martial arts particularly Karate, other martial arts such as Wing Chun have forms but these are slightly different to katas in that they are usually seen as a “library” of techniques for you to practice rather than a choreographed pattern. 
It is fairly easy to draw parallels between the software kata’s and Karate katas in that whilst a developer may perform a kata they are effectively repeating techniques that in themselves may have some value but the entire “routine” is frequently a made up situation which has no applicability in your day to day job e.g. Calculator Kata – great way to exercise TDD but how often are you asked to build a calculator application?

Solution

Back with the martial arts If you look at a martial art like Muay Thai or look to Mixed Martial Art practitioners they don’t have katas at all, they focus on techniques and how to use them to best effect not wasting time on a choreographed set of movements which offer no practical advantage.  The various techniques are combined together in a drill, these drills are not usually standardised or repeated they are created to be used at that moment in training but often would be equally applicable in the ring or for self defence so have value in a wider context.
Instead of software developers using katas I propose we should be looking more to create our equivalent of the drills, creating software that mimics actual development that you may undertake in your day job, but without the restrictions your job places on you i.e. use whatever technology or techniques you want.  Instead of building calculators or Fibonacci number generators create a web site that reads and writes to a database, build a RESTful web service, etc actually exercise and improve the skills you do need for your current, or even future, job. An example of this is a recent post by Chris Oliver about 10 Ideas for Beginner Web Developers which is exactly the sort of thing I think we should focus on.

Dōjō

Problem

If you thought kata was misused you haven’t heard the half of it, a dōjō is defined as:
“Japanese term which literally means ‘place of the way’” Wikipedia
A dōjō is at its most basic a training hall, a place you go to train but fundamentally it is somewhere that supposed to be special and only used for the purpose that it was intended i.e. practicing martial arts. I think that you’ll agree this is a pretty clear cut definition of what a dōjō is, whether we adhere to that in the western world is a different story altogether.
When we look at dōjō in the sense of software it is probably best defined as “bunch of coders get together to work on a programming challenge” and if you look at how its defined here you’ll see that it focus’ on katas.  I have 2 problems with the coding dōjō as they stand:
  1. It doesn’t relate to a training hall, meeting room, or any physical place set aside for the purpose of “training”
  2. Its perpetuating katas!

Solution

To my mind the term dōjō is wrong, what we are trying to get across is its a gathering of developers to write some code and hopefully learn from other people, it is an event that occurs sometimes inside work but most frequently outside of work in your own time.
What is needed is a term that expresses this and it could be a phrase rather than a single word, why not use “code crunch” “code gathering” “stack” or any other term that you can think up that implies geeks getting together to cut some code and learn new (cool?) stuff.
These meet ups should also focus on actual techniques that you’ll want to use, it could be TDD one time CQRS another but the code you write/skill you exercise should always have value to you outside of the event.

Koans

Problem

Within the software world the use of koans isn’t perhaps as widespread as katas or dōjō’s but its misuse of the concept is much worse than either of the previous terms.  To perhaps understand lets look at a definition of what a Zen koan is:
“A Koan is a statement, a dialogue, a story or a question which cannot be understood or answered by logical thinking” suite101
After some searching and reading the best definition I could find about koans in software development is about the ruby koans:
“A Koan in RubyKoans is a small demonstration of a feature of Ruby with something missing. You have to fill in that missing piece in order to move on to the next Koan.” About.com Ruby
Now looking at those 2 statements it is very easy to see that they bear absolutely no likeness to each other, a Zen koan cannot be solved with logical thinking whereas the RubyKoan is all about logical thinking and learning.

Solution

In my humble opinion we should stop using the word koan entirely in the software world, lets think about what we are trying to do ,which is effectively guided learning, and again find a word or phrase that better represents what we are trying to achieve.
You could use a term such as “bread crumbs”, not as cool as koan but has the connation of following a path and reaching a target or you could have a “trail” with way points you need to pass through, both of these would serve us as far better metaphors than a koan.

Summary

Hopefully I’ve proved what I said originally in that we as software developers should not be using the terms kata, dōjō, or koan and even shown that the way katas as are being currently practiced are in my opinion not the best way for us as individuals or groups to improve our skills.
As the title of this post says software developers != Zen warriors, lets create our own “cool” vocabulary around these activities to encourage our fellow developers to do them as well, rather than subjugating other terms whose meaning is already well defined and completely different to what we are using them for.
Instead of practicing katas and holding dōjō’s lets all start creating our own drills and holding “code crunches”, rather than working through koans to achieve enlightenment we could follow a trail to help us reach our destination.
One last option is that we could throw out all these terms and simply work on exercises, participate in events/gatherings and undertake some guided learning but that wouldn’t be cool now would it?

3 comments:

  1. Hi Nathan,

    Computer programming and related disciplines have been ripping off language and terms from existing contexts moreso than perhaps any other discipline. Probably due to it's relative infancy.

    Such borrowed terms generally do a reasonable job of inheriting much of the original meaning. We have trees, leaf nodes, branches, bugs, daemon, keys ... could go on forever.

    I can appreciate that the use of these terms annoys you, given that you use them in the original (and proper) context. However, if we were to follow this logic, we'd need to advocate throwing out pretty much all of our nomenclature - we have precious little that we've invented all by ourselves without borrowing from existing contexts.

    Which is exactly *why* they work so well and stick. The existing context gives it meaning.

    Just my $0.05
    Chris

    ReplyDelete
  2. Obviously I'm gutted that I can't be a Zen warrior but the more I read, the more I became convinced by what you're saying.

    I am personally a little distrustful of martial arts which means I don't have a great deal of knowledge to draw on here but it seems to me that there is a very important concept that does run parallel with development and that is discipline. The discipline to practice and understand what and why we are practicing.

    Now, equally, its important that we, as devs, see discipline as a vital aspect in its own right. Stripping away needless metaphor, analogy and external references aids this.

    Would say too that having cool names for stuff is a bit double-edged:
    "Fancy a pint?"
    "Nope, I'm off to a SuperHackCodeRetreatathon :)"
    "Yeah, ok, Dan"
    "I'll have a beer :("

    But equally:
    "Coming to the code practice session up at the business park?"
    "Sorry, I fell asleep half-way through that, what was it?"
    "Pint?"

    Perhaps we need beer-based nomenclature :)

    Dan

    ReplyDelete
  3. Thank you for posting such a useful, impressive and a wicked article./Wow.. looking good!
    Software Product Development

    ReplyDelete