Coding Dojo

Edit on Gitlab

AvoidDojoFizzleOut

Some people experience their dojos fizzle out and people stop coming after a few times. We don’t think this is because people find the dojo unhelpful or that they don’t need it. Like any community there needs to be a core of more committed people who turn up to every meeting.

The ParisDojo made a rule that if a meeting was arranged, and noone came, then that was the last meeting. period. The idea was to foster a sense that it was everyone’s responsibility to keep it going. Self organization.

BabySteps

The next step to take should always be as small as possible.

  • Yes, as small as possible.

If we proceed in very small steps, chances are that we can keep the next step trivial. BabySteps combined with RhythmOfTestFirst really boosts productivity.

ClassUnderTest

When writing unit tests your tests should focus on one unit, typically a class, only. This unit is usually refered to as Unit Under Test, UUT, so when talking about object oriented testing CUT, Class Under Test, is a notion to be aware of.

CodingDojo

If I want to learn Judo, I will enroll at the nearest dojo, and show up for one hour every week for the next two years, at the end of which I may opt for a more assiduous course of study to progress in the art. Years of further training might be rewarded with a black belt, which is merely the sign of ascent to a different stage of learning. No master ever stops learning. If I want to learn object programming… my employer will pack me off to a three-day Java course picked from this year’s issue of a big training firm’s catalog. Nuts to that – acquiring coding skills is not an instant gratification process. – LaurentBossavit

CodingDojoBackground

CodingDojoPrinciples

The First Rule

One important rule about the Dojo is : At the Dojo one can’t discuss a form without code, and one can’t show code without tests. It is a design training place, where it is acknowledged that “the code is the design” and that code without tests simply doesn’t exist.

Finding a Master

The master can’t be a master of every forms. I feel quite at ease with recursive functions and list processing e.g. but I think I don’t know how to create even a simple web app. Fortunately, while it’s the first time they really deal with “tail-recursion” some practionners here have done professional web apps for years !

CodingDojos

Check the locations of the dojos at: http://maps.google.com/maps/ms?ie=UTF&msa=0&msid=116400871369678060090.000453a8d6ee3a6d3b8fe .

Please update or add Dojo in the map if not there and fill out the list:

North America

Europe

South America

Australasia

Asia

CyberDojo

Write Your Code and Tests in a Browser!

A while ago I ( JonJagger ) attended several coding dojos. I enjoyed them but noticed it often took a long time to install the necessary compilers onto some of the laptops. It occurred to me that it should be possible to run a code-dojo entirely within a browser - write your code and tests inside a simple web-based editor, submit everything to the server whenever you like, the server would run your tests for you and return the outcome - green if they all passed, red if some failed, yellow if there was a syntax error. As I thought about it I realized that this format also offered several extra possibilities. For example, if someone had to leave early and take their laptop with them, another laptop could instantly substitute for it. So I’ve written a server! It’s called CyberDojo .

DeliberatePractice

When Dave Thomas introduced the idea of code katas it was in the context that in order to get better at something, you need to practice. Raw talent only gets you so far. Various theories of learning (particularly those proposed by Dr K. Anders Ericsson) suggest that DeliberatePractice over a long period of time is at the heart of attaining expertise.

DeliberatePractice is not the same as experience gained while doing your job. It is when you actually seek out experiences that will stretch your skills just the right amount, and give you feedback that enables you to learn. I think that it takes a great deal of self discipline to sit down by yourself and try to do a code Kata, and it can be difficult to get good quality feedback without someone else present or at least available to review your code afterwards.

DeLucasLaw

Jeff De Luca coined this law. It says

managing software developers is 20% technology and 80% sociology.

DojoAttendee

A DojoAttendee is someone who turns up to a dojo meeting. They should come with the intention of both learning something and contributing to the learning of the group. This may involve

  • helping the group to decide what to do at the meeting
  • introducing a totally new Kata exercise to be solved by the group.
  • solving a Kata infront of the group ( PreparedKata )
  • stepping up to the keyboard and contributing part of the solution to a RandoriKata
  • pointing out smells, code duplication, possible refactorings etc to whoever is typing (on a green bar)
  • asking for explanation and clarification from whoever has the keyboard.
  • contributing to the retrospective.

DojoBook

When I first talked to LaurentBossavit about the ParisDojo , he had an idea about writing a book about it that would help people to set up a regular dojo. The book would be small, light and easy to read, pragmatic and helpful. I am attracted by the idea of having something in print that would be relatively static and authoratative, as a complement to the more interactive material this wiki. To start with, I was just thinking of contributing some material to this website and get some feedback.

DojoModerator

The DojoModerator is not a MasterProgrammer or CodingSensei . They are also there to teach and learn, just like any other DojoAttendee . The DojoModerator aims to enable group learning to occur, by promoting idea exchange, and curtailing unproductive discussions and activities.

  • If the pair at the keyboard are not saying anything, ask them to explain what they are trying to do.
  • Identify side track discussions and ask them to be shelved/parked. Perhaps take them up at a future meeting or at the pub afterwards.
  • Stop the “expert” who thinks they can solve the whole kata in 2 minutes from taking the keyboard. Make them explain. Make them think. If necessary ask them to perform it as a PreparedKata at the next meeting.
  • Encourage shy and quiet people to take part, but don’t force anyone.

If the group knows each other well in other contexts, eg they work together daily, it can be easier to perform this role if you are an outsider.

DojoOrganizer

Someone needs to take care of the practical details, ie things like

  • find a room
  • get a digital projector
  • set a date for next session
  • publish retrospectives and code afterwards

It seems to work well if one person is responsible for ensuring these things are done.

It seems to me that somehow the people at the dojo need to choose good Kata exercises to work on that are at the right level for the group. This is where I envision a KataCatalogue being helpful. The group also needs to decide who should present PreparedKata solutions and when to have RandoriKata meetings. The ParisDojo is, by all reports, very self organized on these points, and we’d like to hear more about how that works please :-)

DojoRoles

DojoRoles : DojoOrganizer and DojoAttendee

I have difficulties to make a clear distinction between the roles of attendee and organizer, perhaps because in Paris we are a self-organized group since the very beginning. – PhilippeBlayo

Philippe, the FloripaDojo is getting self-organized now, so I can tell you there’s a clear distinction between the roles (i. e. organizers are involved before/after the sessions and attendee contributes only during the sessions). However, I also believe these definitions are useless since they don’t contribute with the dojo itself ;) – IvanSanchez

DojoRules

Rules the DojoModerator should explain to dojo participants at the start, which may make your meeting run more smoothly.

  • StartFromScratch - so everyone is up to speed, even if they weren’t at the last meeting
  • SpeakUpIfYoureLost - so everyone understands what the pair at the keyboard is doing.
  • OnlyCriticiseOnGreenBar - only allow design critique/refactoring advice when there is a green bar.

See also WhatIsCodingDojo

ExtremeProgramming

TODO

KataCatalogue

This page is intended as a list of Kata exercises that people have tried at their Dojo meetings, which links to more detailed descriptions of each Kata.

Algorithmic

Game Modeling

Math Oriented

String manipulation

Specific Technologies

Refactoring legacy code & Design Principles

Design Principles

KataTemplate

This page should serve as a template explaining the format to use when describing the Kata exercises in the KataCatalogue .

About this Kata

Difficulty: (easy/medium/hard)

Good for teaching: (something from the list on LessonsLearned )

Related Katas: (ones to do before or after this one, similar ones)

Here you can mention the origins of the Kata, and perhaps people of note who have performed it.

Problem Description

This section should give a summary of the problem to be solved, in such a way as to intrigue the reader and attract them to attempt it. All the facts necessary to complete the Kata should be included.

KataWorkshop

Following the success of a similar workshop at XP2009, I would like to announce the programme for a workshop at XP2010.

“Test Driven Development: Performing Art”

(Workshop organizer is EmilyBache )


who which Kata language/tools DaniloSato & HugoCorbucci KataSudokuVerifier Smalltalk Johannes Brodwall & Ivar Nilsen the Java EE spike kata Java EE Marcus Ahnve & Jimmy Larsson KataTennis Ruby & RSpec ThomasNilsson & Andreas KataTexasHoldEm C++


Test Driven Development is a skill that needs time and practice to master. The aim of these PreparedKata is to demonstrate excellence in the use of Test Driven Development, and to result in some high quality code. This will be for the benefit of the many programmers attending the conference, who can come along and witness high quality code being written using TDD, and get a chance to ask questions and provide feedback. It will also benefit the performers who will be exposed to useful feedback from a discerning audience, and have the chance to show off their considerable skills.

LessonsLearned

Many people around the world have been running coding dojos for several years now. This page is a collection of some of the lessons these people have learnt from their experiences.

These lessons use an approximation of the criteria listed in the book “Lessons learned in Software testing” (Kaner, Bach, Pettichord). A lesson should be:

  • useful or provide insight
  • based on actual experience
  • pass the 90-minute-thinking-alone-test, ie a lesson is not worth including if almost anyone who thought about coding dojos for 90 minutes of undisturbed time could come up with it. (we’re a bit relaxed about this rule. Perhaps 10 minutes is enough)

General Lessons

For meetings with a RandoriKata

  • AvoidDesignThrash - next pair deletes previous pair’s design. Not good.
  • Have a pc keyboard available if you’re using a mac.
  • Install all needed natural language key mappings beforehand.
  • At least one person present should be expert with the chosen programming language and tools (save time looking up stuff)

Practicalities

  • Get someone to fund the venue and ideally food at the meetings. Eg a company sponsor, university, computer society.
  • Meet regularly, at the same venue, same day of week. Not the weekend.
  • Meet weekly, biweekly, or monthly.
  • Most dojos seem to have 4 - 15 DojoAttendee s.
  • LetItBeWorkTimeOrNot - meet late afternoon so people can either count the time as work or not as they choose

Being the DojoOrganizer

  • AvoidDojoFizzleOut - Some people experience their dojos fizzle out and people stop coming after a few times.
  • KataSwitchFrequency - do a new Kata every meeting, or repeat the same one until you get bored
  • experiment with different DojoMeetingFormats

What are we trying to learn?

Have an overarching aim for what you are trying to learn. You can learn things like this at a dojo:

MicroPairing

This is a variant of PingPong that works well with TimeBox . The idea is that you switch pairs using TimeBox . But as long as a pair is within its timebox you pass the keyboard each time one of the following things happen:

  • Driver writes a failing test.
  • Driver makes a failing test pass.
  • Driver refactors something (non trivial). Use common sense so you don’t switch if the refactoring does not add value. You also want both persons in the pair do some refactoring rather than having one of them doing it all if it is several refactorings taking place.
  • Driver writes a passing test. You typically don’t see this but sometimes it might make some sense to add a new test that passes immediatly (because you accidently implemented too much before maybe). But try to avoid this.

Using this schema to switch driver made the TimeBox pairing more fun and involving for the persons pairing than if PingPong was used in the TimeBox (i.e. only switching after failing tests).

MyFirstDojo

Pragmatic suggestions for how you host a coding dojo event.

See the following 5 min how to video to run your first coding dojo (or what you can expect if going to a dojo): http://www.youtube.com/watch?v=gav9fLVkZQc

NTests

A mechanism for switching the pair at the keyboard when doing a RandoriKata

  • The pair write and implement N tests, where N is usually between 1 and 3.
  • The person who has been at the keyboard longest sits down in the audience and another person takes their place.

Does this actually work? I havn’t tried it myself but I heard someone describing it. I think they said that it makes people tend to write too big tests and not take BabySteps so they can stay at the keyboard longer. Can anyone comment? – EmilyBache

PingPong

A mechanism for switching the pair at the keyboard when doing a RandoriKata

  • The driver writes the first test and then hands the keyboard to the copilot
  • the new driver makes the test pass and does necessary refactoring. They then write the next test and pass the keyboard back.
  • The original driver now implements code to make the test pass, and refactors.
  • a new pair steps up to the keyboard and the current pair sit down in the audience.

PreparedKata

Someone has done some preparation before the meeting and comes ready to present a full solution to the Kata in question.

  • Set a time limit
  • start from scratch
  • use TDD and BabySteps
  • Each step must be explained so everyone present can follow.
  • People should interrupt only if they don’t understand what is going on.

RandoriKata

By some means the group decides on a Kata to work on, perhaps the DojoOrganizer suggests one. No-one need have prepared anything much before the meeting.

  • Some mechanism for regular switching of the driver and copilot is chosen (eg TimeBox , PingPong , MicroPairing , NTests , ShoutLouder )
  • Two people step up to the keyboard and begin solving the Kata in hand
  • start from scratch
  • use TDD and BabySteps
  • remember to switch the pair at the keyboard according to the mechanism chosen
  • Everyone present is expected to follow what is going on, and make helpful suggestions.
  • The pair at the keyboard should explain what they are doing so everyone can follow.
  • The audience should give advice/suggest refactorings primarily on a [GreenBar (@c2)] . At other times the pair at the keyboard may ask not to be interrupted.

To work on prepared Kata online, you can use the cyber-dojo platform.

RhythmOfTestFirst

  • Write UT for Particular BabyStep
  • Run it, it should fail
  • If it is not failing - review the test it might be wrong
  • Written test should generate an interface
  • write an implementation until the test is green
  • goto the next BabyStep

RythmOfTestFirst

SetExpectations

  • Begin each meeting with an introduction to the format and intended aims of the dojo, ie go through WhatIsCodingDojo and/or DojoRules . Tell people when and how they are expected to contribute. Will it be a PreparedKata ? A RandoriKata ?
  • Explain the Kata you will be trying to solve. Perhaps show the description from the entry in the KataCatalogue . If you are not planning to StartFromScratch , go through the pre-existing code.

ShoutLouder

an (anti-pattern, is it one?) mechanism for switching the pair at the

keyboard when doing RandoriKata

  • the pair is driving, looking for a solution
  • anyone in the audience may interrupt if he knows the solution
  • the interrupter takes over driving, the driver becomes co-pilot

In my experience, this mechanism is an anti-pattern.

Mine too, I have seen this grind a dojo to a halt as people haul the design back and forth in competing directions. –MattWynne

TestDrivenDevelopment

[TestDrivenDevelopment](/TestDrivenDevelopment) is a way of working, or

a process for writing code. You work is paced in BabySteps and your progress is assured by frequently writing and running automated tests. Coding proceeds in an extremely focused and productive rhythm:

1. Write a test for a new function. The test should fail.

2. Write code until the test passes.

3. Refactor until the code is suitable for continued development

4. Goto 1.

TextTest

A tool for automated testing of code written in any language, by means

of comparing plain text output. Invented by GeoffBache .

see http://texttest.org .

TimeBox

A mechanism for switching the pair at the keyboard when doing a

RandoriKata

  • Each pair has a small (5 or 7 minutes) timebox.
  • At the end of the timebox, the driver goes back to the audience, the copilot becomes driver and one of the audience step up to be copilot.
  • You can use a kitchen timer/mobile phone that beeps to remind people when time is up.

WhatIsCodingDojo

Definition

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 DeliberatePractice in order to improve their skills.

The ParisDojo focuses on coding in front of others, most often something from scratch, in a very short amount of time (1 to 1.5 hours). They use various languages, various tools, various exercise formats. They consider the outcome of an exercise successful when it is completed within allocated time AND audience can repeat the exercise at home by themselves.

WishList

### General
  • How about the ability to actually do a code-dojo without requiring any software (except a browser) installed on the computers of players who want to do a coding-dojo? I have built a free, no-advert code-dojo server to do just this as a service to the software community. It’s called CyberDojo . Its url is http://www.cyber-dojo.com I’ve also put a screencast demonstrating me doing the KataRomanNumerals in Ruby on vimeo at http://vimeo.com/15104374 (I’m JonJagger by the way)
  • As a DojoOrganizer and DojoAttendee , I would like effective PatternsOfCodingDojos to help with the details of what typically works and what doesn’t.
  • For each kata in the catalogue, I would like to find ScreenCasts of what a good solving could be. (Yes, I am asking a lot – ColinGarrigaSalaun )
  • Change the rules for editing pages for just registered users that can edit the wiki. We have a lot of spam here.

Software support for the dojo: user stories

  • As a programmer interested in honing my skills, I want to find out if there’s a dojo in my area I could attend
  • As a DojoAttendee , I want to know where and when “my” dojo is convening
  • As a DojoOrganizer , I want to schedule and divulge next meetings
  • As a DojoOrganizer , I would like to hear about good Kata exercises that other groups have tried and a summary of the main things to be learnt from that kata. See KataCatalogue .
  • As a curious guy, I would like to see more photos and videos of the dojos happening out there.
  • As a DojoAttendee and as a programmer, I wish codes published at the end of a session could be colorized (syntax colorization) – PhilippeBlayo
  • As a dojo organizer/attendee(see DojoRoles ), I would like to have an automated process to publish codes at the end of a session – PhilippeBlayo