EHRD.clj Clojure Dojo

Posted on 02 Jul 2013 by Chris

Rotterdam/The Hague Clojure Meetup puts on a Dojo.

clojure ehrd-clj

This post is also on the Rotterdam/The Hague Clojure Meetup blog

For the third Rotterdam/The Hague Clojure Meetup we decided to run a Dojo. For the uninitiated a Dojo, in this context, is a structured group exercise to practice programming. Dojos come from the idea of Coding Katas, initially expressed in the book The Pragmatic Programmer. These Katas were small exercises to practice programming away from work. In 2005, Parisian Laurent Bossavit decided that doing these exercises in a group would be a nice idea and the Dojo concept was born.

There are several ways to run a Dojo, but the principal is that people work together on a problem as equals ensuring that everyone understands the solution. They generally use either Test or Behaviour Driven Development. We used the "Randori" or "Finnish" style which consists of rotating pairs working for a set amount of time on the problem before another pair takes a turn. Specifically, within the pairs, one is typing and one is working with them. After five minutes, the typist goes back to the audience, the other would become the typist and the next member of the audience would join to work with them.

Tools-wise we were using Clojure (obviously!), and using Midje to do Test-Driven Development. As an editor we used LightTable. We hooked a laptop up to the projector and had a second laptop continuously counting down 5 minute blocks. I had set up a skeleton project to enable a quick start. Before starting I gave a short talk on Midje and on how the Dojo works and during the Dojo I acted as moderator.

The problem we chose to solve was to generate Roman numerals from Western positive integers (1->I, 2->II etc). Our solution is here. Over the course of about 40 minutes we covered numbers up to 19. Not the highest work-rate, but its about the journey, not the destination. I think its fair to say that all participants enjoyed it. Everyone had two turns at the keyboard, and everyone seemed to get a lot from the exercise. The group was quite mixed, a couple of participants were mostly new to Clojure while others were more experienced.

Practical points

As a group we intend to do more Dojos in the future, and as such would like to draw out some specific things that worked well and some things that could have been better.

Things that were good

  • Using a simple editor was good - no strange key-bindings to confuse people
  • Using Midje was good - its test structure is nice, its auto-test works well and it's intuitive to use
  • Having a bare-bones project set up worked well, we could just start coding

Things that could have been better

  • We could have done with a little more time (we could have started the meeting quicker) - an hour would be a good length.
  • The moderator should have kept the audience a little quieter and more focussed on the problem (sorry!)
  • The editing set-up we had would have been better with the REPL on the same screen as the editor so we could see when tests failed and also work in the REPL as needed


The Dojo worked well despite having a wide range of experience within participants. It was fun, everyone learned something and everyone understood and had ownership of the solution. In the future there are some small procedural issues to think over, but these should be simply solvable. We're looking forward to the next one!