Coding Dojo Applied

35
Coding Dojo Applied Vladimir Tarasow

description

It's about styles of Coding Dojos and the experience on organizing a Randory-style Coding Dojo.

Transcript of Coding Dojo Applied

Page 1: Coding Dojo Applied

Coding Dojo AppliedVladimir Tarasow

Page 2: Coding Dojo Applied

What is Coding Dojo?

A Coding Dojo is a meeting where a bunch of coders get togetherto work on a programming challenge.

It is a gatheringof programmers who come togetherto have fun and learn while coding.

Page 3: Coding Dojo Applied

Formats of Coding Dojos

Formats:● Randori● Prepared Kata● Working in Pairs● Invent your own style!

Page 4: Coding Dojo Applied

Randori

In brief:● The facilitator introduces the programming kata to solve.● The facilitator invites a partner to join him at the keyboard. The

facilitator writes a first test, makes sure it runs red and invites someone else from the group to take his place.

● Each pair works on the problem for 5-10 minutes, the facilitator then makes sure that one person in the pair is switched out with someone in the audience.

● After about 45-60 minutes of working on the problem, call a break and review what’s happened.

● After the review, the group can work on another kata, try the same problem again or use another exercise form.

Page 5: Coding Dojo Applied

Prepared Kata

In brief:● The other name — Parisian● Focuses on coding in front of others, most often something from

scratch, in a very short amount of time (1 to 1.5 hours).● A presenter shows how to solve the challenge from scratch, using

TDD and BabySteps.● While the presenter creates their code he is constantly speaking to

the audience letting them know exactly what they are doing and why.

● Any member of the audience is allowed to interrupt the presenter and ask them why they are coding in a certain pattern.

Page 6: Coding Dojo Applied

Working in Pairs

In brief:● The group forms pairs of programmers.● Pairs can choose their own programming language and

environment to craft a solution in.● All the pairs work in the fashion the group has agreed to work for

30-60 minutes or more.● After the coding session the pairs perform a short presentation on

their code base, showing the progress and design they have made.● Re-mixing of pairs or of pair's members can be applied so every

person will work with other pair's code or programming language.

Page 7: Coding Dojo Applied

How to Cook Randori-style Dojo?

Page 8: Coding Dojo Applied

Roles

We suggest to use following roles:● Pair● Sensei● Moderator

Page 9: Coding Dojo Applied

Pair

Pair of two working and talking at the PC in order to complete the Kata.

Pair consists of a person who produces the code — pilot, and a person who talks — navigator.

Page 10: Coding Dojo Applied

Pair

Responsibilities:● The pilot produces code.● The navigator helps the pilot to understand what has been done

during previous iterations and what the pair should do now.● The navigator tells what the pair should do now.

Page 11: Coding Dojo Applied

Sensei

A person who interferes and facilitates the Kata by helping with advice when the pair is stuck or arguing without any progress in code. Must not speak in any other case.

Responsible to facilitate attendees to produce code according to Working Agreements (WA) and the goal of the Kata.

Page 12: Coding Dojo Applied

Sensei

Responsibilities:● Introduces a programming language, framework or IDE before the

beginning.● Introduces a Kata.● Performs in the first iteration as a navigator.● Working code by the end of the iteration.● Some progress on fulfilling the Kata during the iteration.● ‘Green’ tests by the end of the iteration, otherwise the next

iteration begins from making tests ‘green’.● Tests are written during the iteration.● Tests are good and don’t repeat the code itself just to pass.● No long discussions without the code.

Page 13: Coding Dojo Applied

Moderator

Responsibilities:● Helps attendees to form Working Agreements.● Facilitates attendees to obey the principles. ● Controls the time-boxing.● Can make a break in case he or she observes some kind of

misunderstanding or discomfort and ask questions in order to find out and remove any impediments.

● Conducts the retrospective.

Page 14: Coding Dojo Applied

Principles

Let's talk about the following things:● Working on Kata● Timeboxing● Switching● Respect

Page 15: Coding Dojo Applied

The Main Rule

At the Dojoone can't discuss a form without code,and one can't show code without tests.

Page 16: Coding Dojo Applied

Working on Kata

At the Dojo one can't discuss a form without code, and one can't show code without tests.

So the person which is not on the stage can give an idea, but can not fall into discussion with the pair.

If he or she wants to implement the idea mentioned, he or she can enter the pair at the next iteration.

Page 17: Coding Dojo Applied

Timeboxing

Pair works during a fixed period of time.

It can be any period of time which attendees have agreed to use. It can vary between 5 and 15 minutes.

The 10 min period seems to be optimal, because it’s enough time to briefly discuss the algorithm and to implement it.

Page 18: Coding Dojo Applied

Switching

The person who enters into the coding timebox begins to act as a pilot.

The person who was the pilot during the previous iteration switches his position to the navigator, the one who talks.

The first iteration begins with the Sensei in the position of the navigator.

Page 19: Coding Dojo Applied

Switching

The switching may be ordered so each of the attendees will participate, or the ordered switching can be interrupted if an attendee wants to implement his or her idea right now.

The switching principle should be defined within the Dojo’s Working Agreements.

Page 20: Coding Dojo Applied

Respect

Attendees of the Coding Dojo respect each other and their willingness to learn so that:● Ring tones of mobile phones are off; a person can answer a call,

but he or she must leave the room to answer it.● Only the pair at the PC can talk loud.● All discussions away from the PC must be made in the way not to

spoil the pair’s deep diving into the Kata.● Sensei can interfere and talk loud by his/her own decision.

Page 21: Coding Dojo Applied

Respect

Attendees of the Coding Dojo respect each other and their willingness to learn so that:● If a person wants to ask or suggest something to the pair, he or

she should raise the hand and wait for the moderator to allow him or her to talk.

● Only one person from the observers can talk at a time.● It’s the pair who must decide how to proceed after receiving an

advise or hint from an observer.

Page 22: Coding Dojo Applied

Prerequisites

In order to succeed you should think about:● Hardware● Software● Kata● Working agreements● Snacks and drinks

Page 23: Coding Dojo Applied

Hardware

Minimum setup:● PC where the Kata should be solved.● Big screen and the projector to show the same picture that is on

the PC screen.● Whiteboard or flip chart to pinpoint the Kata rules and working

agreements attendees agreed to obey.

Page 24: Coding Dojo Applied

Hardware

Recommended setup:● PC where the Kata should be solved.● 104-key keyboard so the pilot will not be distracted from coding

with unfamiliar keyboard.● Big external monitor for the PC.● Big screen and the projector to show the same picture that is on

the PC screen.● Whiteboard or flip chart to pinpoint the Kata rules and working

agreements attendees agreed to obey.● Whiteboard or flip chart for the working pair to share their

thoughts.

Additionally it’ll be great to have a Wi-Fi network and enough seats and power outlets available for all attendees.

Page 25: Coding Dojo Applied

Software

Introduction into the tools that will be used should be made beforehand, so that any attendee has a sufficient amount of knowledge to participate in the Dojo:● Programming language — links to the language reference printed

or opened in the browser on PC.● Framework — links to the framework reference printed or opened

in the browser on PC.● IDE — printed version of most used keyboard shortcuts to make

the work comfortable.

Page 26: Coding Dojo Applied

Kata

The task that should be solved during the Coding Dojo.

Must be prepared beforehand, but presented by the Sensei just before the beginning of the Dojo, but not earlier.

Page 27: Coding Dojo Applied

Working agreements

Before the start the attendees with the help of moderator have to decide what set of rules to obey during the Coding Dojo.

Page 28: Coding Dojo Applied

Working agreements

Example:● Length of the timebox.● Application of unit tests.● Application of test-first approach.● Switching: by person’s will or by some order.● Sensei can change the Kata during the Dojo by adding additional

tasks to complete, or he can not change the Kata.● Sensei can ask the pair to leave the PC before the time ends, or

he can't.● …

Page 29: Coding Dojo Applied

Snacks and drinks

Attendees are responsible to bring and share some food and drinks.

Page 30: Coding Dojo Applied

Tips & Tricks

Use them as you like:● Time-box can be visualized by a hourglass.● The moderator can allow a person to talk by using ‘The Magic

Wand’. A fairy wand suits well.● When smelly code is detected the Sensei can wear a gas mask or

signal the working pair about this fact in other way.● You can use any kind of the task as a Kata. For example, an open

issue/bug from an OSS project can be used as a Kata. However, using the classic Katas considered to be better to the audience unfamiliar with the Coding Dojo.

Page 31: Coding Dojo Applied

Tips & Tricks

Use them as you like:● In order to return to the code previously deleted or changed by

the other pair faster, the well-known version control system like Subversion or Git can be used.

● Each iteration should be committed into some VCS so the flow of fulfilling the Kata can be tracked and analyzed in the past.

● The code can be commented or a file with thoughts to be developed next can be used (ReadMe Driven Development) in order to share thoughts of the current pair to the next one.

Page 33: Coding Dojo Applied

Credits

Clipart for illustrations is taken from openclipart.org

Page 34: Coding Dojo Applied

Contacts

Vladimir Tarasow

About: http://about.me/netratE-mail: [email protected]

Page 35: Coding Dojo Applied

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this

license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/.