Perfection in any craft comes from long hours of practice, and exploration of the solution space. Programming is both an art and a science. We learn the theory in college and by reading books, but to enhance programming skills to the level of mastery we need to practice.

“But in the software industry we take developers trained in the theory and throw them straight in to the deep-end, working on a project. It’s like taking a group of fit kids and telling them that they have four quarters to beat the Redskins (hey, we manage by objectives, right?). In software we do our practicing on the job, and that’s why we make mistakes on the job. We need to find ways of splitting the practice from the profession. We need practice sessions. “ - Dave Thomas


A coding dojo is an exercise that brings the element of practice to programming. It is usually conducted for a group of 8 – 16 people in a room with computer and a projector. Participants are welcome to bring their laptops during the session, if they wish to. In each session the participants work on a specific problem statement and make it the base for their learnings. Each session starts with the coach explaining the problem, followed by a quick design discussion. Once everyone has understood the requirements and the design, the first pair comes at the front and starts programming. The rest of the developers act as a participative audience. They watch the solution unfold on the projector screen and also point alternate paths, mistakes, or suggestions to the coding pair. Each pair programs for 20 minutes in a round robin manner.

The coach acts as a facilitator, pointing out mistakes, better programming approaches and also utilizes opportunities to transfer technical knowledge. For instance, if the participants are writing IO related code, the coach may talk about the difference in InputStream and Reader hierarchies in Java, and why they use the decorator design pattern. Learning happens informally but very effectively because explanations are within the context of code. The final ½ hour is reserved for discussing the main learning. Dojo's can also be conducted with a specific goal – like refactoring to design patterns.

Duration and benefits:

Dojo sessions can be of a duration of 4 – 6 hours depending on the number of participants and the problem statement. After each session the participants will have:

• Improved programming skills
• Improved design skills
• Understood approaches to problem solving and the implications of various design decisions
• Gained an enhanced understanding of the technology and API's used while solving the problem.

• Computer, projector, language runtime and editor (JDK 1.4+ and Eclipse/Netbeans)

Frequently Asked Questions About Coding Dojo's

Q1. What is a coding dojo?
A1. A dojo is a exercise that brings the element of practice to programming. It lets developers explore various solutions and approaches to a problem without time pressures. Just like musicians and sportsmen practice to improve their skills, these exercises help raise the bar of a programmer's skills.

Q2. How is a dojo conducted?
A2. The dojo begins with the facilitator/coach explaining the problem statement to the group, followed with a quick design discussion. Once everyone has understood the problem, the first pair starts programming while the others watch on the projector screen. The audience should be a participative audience and not a passive one. They should point out alternate solution paths and mistakes. Everyone should contribute their knowledge. After 20 minutes the first pair returns to the audience and the next pair continues programming from where they left of... and so on. It is the responsibility of the programming pair to ensure that everyone in the audience understands what they are doing. If someone has a doubt, they can stop the pair and request them to clarify what they are doing. While the participants solve the problem, the coach continuously transfers relevant knowledge to the team by way of suggestions and inputs on the underlying technology and API.

Q3. Are there other learning opportunities for the participants besides "raising the bar of programming skills"?
A3. A lot of "technology learning" can also happen as a side effect. When I conduct dojos for clients, I take every opportunity to transfer technology specific knowledge every time an opportunity arises. For example, once we needed to use some IO classes, and I spoke to the group about the IO and Reader hierarchies and about the Decorator design pattern. Another time we needed to implement a callback, and I took the opportunity and explained anonymous inner classes and callbacks. Several learning opportunities will arise, but they will usually depend on the the context of each exercise.

Q4. What kind of equipment do we need to conduct a dojo?
A4. A computer loaded with necessary software and a projector.

Q5. What software needs to be loaded on the computer?
A5. Assuming you will be working in Java: JDK(1.4+ is a good idea), an IDE (Eclipse, NetBeans...), JavaDocs for the JDK classes, and any other tools, libraries that are specific to the exercise. If the dojo is being done for a language other than Java, you will need appropriate infrastructure for that language. The infrastructure may include the language runtime, an IDE and any other software that is necessary.

Q6. How many participants can attend a dojo?
A6. Between 4 - 16. Try not to exceed 16.

Q7. How long is a typical coding dojo?
A7. It depends on the exercise. In my opinion, for ant meaningful learning to happen you need about 4 - 6 hours.

Q8. Can I take a large exercise and break it into multiple dojo sessions.
A8. Well, it can be done, but I will not recommend it, because participants may have to spend time remembering what they did in the last session. The context switch hampers efficiency in most cases.

Q9. Can a dojo be conducted without a coach/facilitator?
A9. Yes, but that will work well only with a group of experienced developers.

Q10. What are the skill levels needed to participate in a dojo?
A10. Fresh developers to very experienced programmers can all benefit from a dojo. Software development is an art which always has scope for improvement. However I will suggest that participants should have academic exposure to the programming language in which the dojo will be

Q11. What kind of a mix of people (from a skills perspective) is best for an effective dojo?
A11. Having a group of similarly skilled people usually works out better. Even though this can be subjective, a good guideline is to group people with the following experience ranges together: 6 months - 12 months, 12 months - 36 months, 36+ months. Again, this is very subjective, and your mileage may vary.

Q12. Can dojos be used to explore refactorings?
A12. Yes, infact they can be used very effectively to understand refactoring principles. In this case the dojo starts with smelly code that needs refactoring, and the exercise is to refactor the code while discussing pros and cons of each refactoring.

Q13. Can dojos be used for anything else?
Q13. Dojos can be used as a learning tool to understand any concept that needs hands-on practice and an exchange of ideas. Design patterns, test first development, pair programming, specific API's and probably many other skills can be learned very effectively with dojos.

Q14. Are there any links to resources and example exercises?
A14. You must check out Dave Thomas' excellent page.

Q15. Do you conduct dojos?
A15. Yes I do. I conduct open as well as inhouse dojos in Pune, India. If you are located elsewhere, I may be able to conduct it in your city. However if I am unable to make it, I will be glad to share my experiences and help you conduct the dojos yourself. You can mail me at - info (at) adaptivesoftware (dot) biz

Q16. What kind of benefits are experienced by participants in a dojo?
A16. Each dojo has certain learning objectives. After almost all dojos, participants will have improved their programming and design skills. They will understand good programming practices, like when and how to throw and catch exceptions, how to create log files, good naming convention. They will also learn the importance of loose coupling, high cohesion, pros and cons of inheritance and composition, and other design best practices. They will learn all these in a practical hands on manner, which is known to facilitate deep learning. Besides these benefits each dojo presents unique learning opportunities depending on the exercise. These opportunities can range from better understand Java class libraries like to IO. collections library to understanding design patterns, and language features.

Q17. Are Dojo's to be done as independent sessions or in a series?
A17. Dojos are always done as independent sessions. Each dojo is a unique problem which must be completed on that day itself. In very rare (customized) cases a dojo may extend beyond a day because the problem is large. In such cases it is best to have the next dojo within 1 week or less. A dojo should ideally be one day long, and at most two days long. It should not exceed two days, since participants might lose the flow of programming. This might also result in time being wasted in bringing participants up to date in what was done in the previous session.

Q18. What kind of preparation do the participants have to do before attending Dojo's ?
A18. Participants should be familiar with Java, the IDE (Eclipse, Netbeans...) that will be used, and object oriented principles. If the dojo is for another language, then the participants will have to familiar with that technology.

Q19. Can it be used to run competitions and identify the best programmers ?
A19. Since a dojo is a cooperative process, it will be difficult to run competitions to identify the best programmer within a team. However we may have competing teams (of 4 people).

Q20. Can it be used to find gaps in programming skills of participants ?
A21. Yes, when the participants are programming during the dojo, the gaps in the participants programming skills usually do become apparent.  However again since this is a group activity and is focused towards development of programming skills, it should be used to help participants improve
their programming skills rather than for judging them.

Room Arrangement:

The following diagrams illustrate possible room arrangement for conducting dojo sessions.

Fig 1: Arrangement for a conference room

Fig 2: Arrangement for a classroom

You may use the contents of this document as long as you attribute the source to Adaptive Software Solutions.