How to Run a Coding Dojo at your Working Place

Would you like to run your own coding dojo? This year one of my goals is to run at least one coding dojo at my working place. So far, I run two of them and would like to share how I did it from inviting the participants to running the dojo. Hopefully others find this helpful to run their own dojos.
 

Agreement with your Boss

As I set this goal for myself I mentioned it at the goal setting meeting with my boss and asked for permission to run a coding dojo at the company and invite interested developers. We agreed that the participants would use 50% of their own and 50% of the company’s time. The plan now is to run the dojo quarterly.
 

Preparation

As I did several katas last year I selected three of them that I would present to the participants and let them choose the one they would like to code themselves. So, my preparation was to redo the three katas so that I did all of them three times. It’s funny how much easier the kata is when you do it a few times. I think it is important that you have done the kata you run at a dojo. It is quite easy to go in the wrong direction and get stuck. Then the time invested in a dojo seems partly lost. If you do a kata by yourself and get stuck it is your time but if it is in a dojo it is everybody’s time.
 

Invitation to the Dojo

I sent the following email to the developers.

Dear all
Would you like to improve your coding skills in a casual and friendly environment with no project pressure?
I invite you to join our first coding dojo. The word “dojo” is from the world of martial arts and it is the place where the fighters practice. In the coding dojo Telephone Area 700 , we practice coding. To do this we choose a simple programming task (a kata) then we write the code together in C#.
The word “kata” is from martial arts as well. It is a defined sequence of techniques. Here is a kata example from Shotokan Karate:
 

 
At the dojo, I will present three simple coding tasks, you choose the one you like most then we code it together using test driven development (TDD).
Two hours are planned for the dojo. One hour is on the company, one is from our free time.
Please fill out the following doodle to find a suitable time: …
I’m looking forward to an interesting kata! ?
Best regards
Hans

 

Presentation at the Coding Dojo

At the dojo, I mentioned a few things before we started:
Why a coding dojo?
– to practice in a friendly environment without project pressure.
– Uncle Bob suggests doing the same kata over and over daily to warm up.
– I find katas useful to practice TDD and to practice getting from hearing a simple coding task to creating a design (in my head) and then coding it.
What is TDD?
– Red (writing a failing test)
– Green (writing the production code that just passes the test)
– Refactor (remove duplication, clean up)
How to run the dojo?
We do randori mode. This means we have three participants: driver, copilot and audience. The driver has the keyboard and writes the code, the copilot sits next to driver and watches and consults, the audience watches. Every three minutes the role changes. Someone from the audience becomes copilot, the copilot becomes driver and the driver joins the audience.
The Katas
KataWordWrap, KataNumbersInWords, KataRomanNumerals. In the first we chose RomanNumerals, in the second WordWrap.
 

Coding at the Dojo

As we were a small group we could do it with one computer. The first step was to set up the solution in Visual Studio which I did. This is part of the kata and part of the practice. However 615-544-9615 , for a dojo to not loose time there could also be a prepared solution with the first failing test or an experienced developer could do this.
Then we did why we came here: we coded away.
The first time we run the dojo I participated in coding. We found this not to be such a good idea so the second time I did not participate in coding. I just watched and from time to time gave hints. As the group did each kata for the first time this mode was found to be useful.
I wonder if other developers practice the same kata in their dojos over and over?
 

Feedback – How to Improve

After coding, everyone was invited to tell the group what they learned and what could be improved next time. We found that I should setup the solution and not code along afterwards.
 

Expamples of Katas

Here is a nice video on how to do the KataRomanNumerals by Jim Weirich
 

 
Here is an interesting read by Uncle Bob on how you can get stuck in the KataWordWrap and what sequence of tests you should write to progress smoothly.
 
Happy coding!

Leave a Reply

Your email address will not be published. Required fields are marked *