Running The
By: Will Webster
Tags: Deliberate Practice, Programming, Extreme Programming, Agile Methodology, Dojo

Shortly after moving to Perth I decided to set up a local Code Dojo. It is a great way to improve as a programmer, learn, share with others and be part of a community (which gives you a warm fuzzy feeling).

Previously I had been a member of the London Code Dojo and had ran dojos as a way of training TDD and programming practices for clients. In this post I will share my experiences in attending code dojos and some tips on how to run your own.

Code Dojos are targeted at professional programmers and college / university graduates. This is unlike the ‘CoderDojo’ initiatives, which have gained in popularity and aims to teach youngsters to code. It is great to see this development on the concept being used by a non-profit group set up to help the next generation. This is certainly something I have enjoyed participating in with my own daughter.

DEFINITION OF A CODE DOJO

A Coding Dojo is a meeting where a bunch of coders get together to work on a programming challenge. They are there to have fun and to engage in Deliberate Practice in order to improve their skills.

WHAT HAVE I PERSONALLY GOT OUT OF ATTENDING DOJOS?

I like seeing the way others approach a problem. Pairing up with new; like-minded developers and seeing how they work. At the different Code Dojos I attended I gained exposure to different programming languages and tool sets. Often participants are more than happy to show people their ways of working share tips from their domain. As a professional programmer you can refine your skills and get a chance to mentor others.

You can practice the katas used in Code Dojos on your own, but I recommend finding your local Dojo (or starting one) and getting involved.

THE PERTH DOJO

The Perth Code Dojo was started in 2014 and focused on software craftsmanship and XP practises (TDD, Pairing and a little bit of refactoring). The process of setting up the dojo was fairly straight forward, although it does take some time commitment and put me out of my comfort zone a couple of times, which in itself was a form of deliberate practise. I had to promote and seek sponsorship and learn to speak as an authority on programming practises in-front of a crowd of strangers (most of whom where decent programmers). I gained some great experience in logistics for running events, speaking in public, group facilitation and got to know some of the best developers in town, as well as improve my own programming skills — what’s not to like!

SOME TIPS RUNNING A CODE DOJO

SAFEY

As the facilitator of a dojo you must foster a safe environment so people feel comfortable to ask questions and reach out for help. Make it clear that the purpose of the dojo is to provide a place to learn away from the usual business pressures of delivery. When sharing code amongst the group be watchful of people being too critical, especially if it is not constructive, and applaud and appreciate everyone’s attempt at solving a problem. Remember we were all new to programming once and any good programmer will always have an open mind and a lot to learn. No one likes a know it all!

If need be, take individuals aside and ask them to be a bit more forgiving and concentrate more on helping others in the correct manner.

THE HOST

You do need to have a good understanding of TDD and general programming practise. But you do not need to be the best programmer in the room to host a successful dojo. I found it a great way to improve my own skills by facilitating and taking part.

I recommend you do the kata yourself beforehand, so you can experience the challenge and provide people with guidance. By doing the kata in your own time you can also push yourself a little further as you are not time constrained. This means you can try out new languages or techniques. You also have more time for research and reviewing your own approach with what others may have done online.

DO NOT ASSUME PEOPLES SKILL SET

Skilled programmers often do not like admitting they are stuck or do not understand something. I recommend being a little obtrusive at times, ask to see peoples code and especially unit tests; if practicing TDD. I have found that sometimes the most vocal members of a dojo might be missing a crucial point and this can lead them to not gaining as much as they otherwise would from the exercise. A vocal person such as this can also lead their pairing partner down the wrong path and instil the wrong types of practices. Do not be afraid to challenge people in the right way. The key is being respectful and making sure your intention comes across correctly — you are there to help and not criticise.

WALK THE ROOM

A good way to do this is to visit each pair shortly after the kata has begun and ask to see their tests. Ask questions such as;

Did you write your test first? — Programmers who are not used to TDD can find writing the test first very difficult and jump straight into the code

Is that the simplest test you can write? — Learning to break down the problem is crucial to good TDD flow. People may need guidance.

Is that test too simple? What is verifying? — Often even programmers with a good understanding of TDD can find themselves writing tests that verify a null is returned. I have been guilty of this myself in the past, but it is not a good starter test as it doesn’t actually verify anything apart from a method exists with the name you have chosen.

THERE ARE PLENTY OF KATAS OUT THERE

You do not have to reinvent the wheel when running our own dojo. It can be nice to dream up your own katas and also give back new ideas to the community but there are plenty of pre-existing out there that you choose from. This keeps the down complexity as an organiser.

Some great resources include:

Dave Thomas’s Code Kata Website — codekata.com

TDD Kata by Garora on Github — github.com/garora/TDD-Katas

John Jagger’s Cyber Dojo is another a great source of Kata and a pretty interesting tool in itself — cyber-dojo.org

SleepyFox’s collection of London Dojo examples on Github — github.com/sleepyfox

DEAL WITH ANTI-SOCIAL ISSUES

Sexism, racism, homophobia and bullying are all toxic to any the learning environment. Nip anything like this in the bud immediately. I recommend encouraging wider participation of different demographics, as having people from a variety of backgrounds creates the right atmosphere for learning. An alpha male sausage sizzle is not conducive to great learning. Encourage people to get to know each other and swap pairs.

THE FORMAT

For the Perth Codo Dojo I took the format used at the London Code Dojo and SleepyFox kindly assisted me with some advice on setting up. The details are below;

Give people 15 minutes to arrive, grab a drink and say hello to their fellow code crafts people

Begin with a round robin asking people to introduce themselves as an ice-breaker. An interesting fact about themselves or something they got up to at the weekend. This is crucial as it helps the other members to get to know each other and by having individuals speaking early on encourages participation — much the same as it does with any workshop or retrospective.

Start with a brief intro explaining the concept of the dojo and the format for new arrivals and as a reminder to old hands. Explain the rules and ask people to be respectful of everyone’s commitment to learn and turn their phones to silent.

Provide an introduction to the chosen kata then ask people to pair up. Give them 15 minutes to discuss and set up their environment: Language of choice, IDE, test framework, etc. If there is an odd number than a group of three is fine.

Use the Pomodoro technique, with 25 minutes focused time on the kata and 5 minutes down time — I find this works great for paired programming and not just Codo Katas. Generally, three Pomodoros is a nice time to spend on a kata before people begin to lose interest or you might find some people finish simple challenges. Ideally you want the challenge to remain unfinished for all; they can always finish or polish it after.

Leave time at the end for a mini retro and sharing exercise. Ask pairs to volunteer and hook up their machine to a big screen to run through their approach. People are often willing to share and this discussion at the end is very valuable for socialising learning amongst the group.

Get some pizza — if you have some sponsorship. Sharing food is another great way to encourage a group atmosphere where learning is encouraged. And people like pizza. Plus, it is a convenient food to eat when trying to work.

Prize — a nice touch if sponsorship permits. Doesn’t have to be anything super expensive

CHECKLIST FOR THE VENUE

A big screen or projector to present the format, kata and sharing code at the end

Plenty of desk space for people to pair with adequate power points for laptops

A sign on the door and directions so people can find you!

LINKS TO GITHUB / SLIDES

My code examples can be found on GitHub

The slides can be found on SpeakerDeck and are re-usable under Creative Commons

Thanks to @sleepyfox and our sponsors — Kiandra IT, Ajilon, Robert Walters and Spacecubed