Kata: Langston's Ant in Ruby

Kata: Langston's Ant in Ruby

Micah Martin

November 13, 2008

I’ve recorded my Langston’s Ant kata for all to see. This particular kata, with slight variations, has been in front of an audience twice before.

Once at a Software Craftsmanship group SCG meeting and again at RubyConf2007. On both occasions I asked the audience to evaluate my performance on a scale of 0-10, 0 being the worst kata you can imagine, and 10 being the best.

At the SCG, my performance was longer than the screencast because I didn’t use the instance_eval trick and wrote multiple case/when statements. It resulted in much more code as well.

Langton's Ant Kata Video
Langston's Ant Kata (Video)

Honestly, I felt the kata dragged on a bit too long which is why I shortened in subsequent performances. Despite this, the SCG audience gave me an average score of 8. At RubyConf, the kata was almost exactly like the screencast and it earned me an average score of 7.

Now coming from an audience of dedicated Ruby developers, I’m quite pleased with my score. Here’s some of the feedback I got…

  • Use of instance_eval: -1
  • First test, going from compile error to passing tests: -1
  • Refactoring on with red bar: -1 (not repeated in the screencast)
  • Non-idiomatic is_black?: -0.5 (fixed in screencast)
  • Steps are too big in between tests: -1

I find this feedback immensely valuable and thank those who took the time to provide me with it.

In martial arts, the techniques performed in kata are not always by the book. There is an aspect of art, creativity, and entertainment. At several points in my Langston’s Ant kata I intentionally decided to bend the rules to enhance artistic and entertainment values.

I leave it up to you whether I made the right compromise or not.

After watching the kata, leave a comment with your rating and any feedback you have for me. I thank you in advanced.