cyber-dojo thank yous



overview of how cyber-dojo uses git

directory structure

cyber-dojo does not use a database. Instead each dojo lives in a folder based on its id. Your id appears to only be 6 characters long, but really it is 10 characters long - look at the page's URL in the browser's address bar.
For example the practice session with id 82B583C347 lives at folder
cyber-dojo/katas/82/B583C347
Each started animal has a sub-folder underneath this, eg
cyber-dojo/katas/82/B583C347/wolf
Each started animal has a sandbox sub-folder where its files are held, eg
cyber-dojo/katas/82/B583C347/wolf/sandbox


git repositories

Each started animal has its own git respository, eg
cyber-dojo/katas/82/B583C347/wolf/.git
The starting files (as loaded from the cyber-dojo/katas/82/B583C347/wolf/manifest.json file) form tag 0 (zero). Each [test] event causes a new git commit and git tag, with a message and tag which is simply its number. For example, the fourth time the wolf computer presses [test] causes
$ git commit -a -m '4' $ git tag -m '4' 4 HEAD
From the server, in an animal's folder you can issue the following commands: To look at filename for tag 4
$ git show 4:sandbox/filename
To look at filename's differences between tag 4 and tag 5
$ git diff 4 5 sandbox/filename
It's much easier and more informative to open a review by clicking any traffic light.

pulling the latest cyber-dojo github repo

As root...
$ cd /var/www/cyberdojo/admin_scripts $ ./pull.sh
pull.sh performs the following tasks...
  • pulls the latest source from the cyberdojo github repo
  • ensures any new files and folders have the correct group and owner
  • checks for any gemfile changes
  • warns you if pull.sh has itself changed
  • restarts apache


overview of how cyber-dojo's language docker-containers work

When you set up your cyber-dojo cyber-dojo will only offer entries whose languages/ subfolder's manifest.json file has an image_name entry that exists. For example, if cyber-dojo/languages/Java/JUnit/manifest.json contains this...
{ "image_name": "cyberdojofoundation/java_junit" "display_name": "Java, JUnit", ... }
then [Java, JUnit] will only be offered if the docker image cyberdojofoundation/java_junit exists on the server, as determined by running
$ docker images


cyber-dojo will start a container from the docker image_name to execute an animals cyber-dojo.sh file each time the animal presses the [test] button.

cyber-dojo language's manifest.json entries explained

This page is for an old version of cyber-dojo.
This is the page you're looking for.

interviewing and cyber-dojo

Why not ask potential interview candidates to do an exercise in cyber-dojo? Candidates simply email you their cyber-dojo URL (which contains their id and animal) when they're finished. From this you can look not only at their final solution, but also at their tests, and how they got there. I know several companies already doing this. They report that it's best to be clear and up-front about what you want. That it's not uncommon for candidates to work on a solution outside of cyber-dojo and then paste in their final code (and maybe the test code). This gives you no clue as to how they got there. Ask them not to do this.

Another useful idea is to provide concrete feedback to the candidate and ask them to try again.
Then look at their second submission to see if/how they adopted the feedback.

If your team sometimes pair-programs, why not mirror the pairing in your recruitment process?
Instead of interviewing 5 candidates sequentially, see how five candiates fare technically (and socially) in a 10 person cyber-dojo, pairing each candidate with a developer from the team they're hoping to join. Do several iterations swapping partners each time. Note that if your team never pair-programs it is incongruent to pair in the interview.
Teamwork characteristics ... cannot be determined if you interview ... one at a time.
W. Edwards Deming


some stats on 15,000 practice sessions

As I write this the number of practice dojos on cyber-dojo.org is about 15,000.

The most popular day to run a cyber-dojo is Thursday.
  • 1375 Saturday
  • 1022 Sunday
  • 2488 Monday
  • 2588 Tuesday
  • 2575 Wednesday
  • 2660 Thursday
  • 2307 Friday

The most popular language-unit-test framework is Java-JUnit (but the figures probably depend a lot on which ones have been installed the longest).
  • 3125 Java JUnit
  • 2881 C# NUnit
  • 1087 Python unittest
  • 1071 C++ assert
  • 904 C assert
  • 736 PHP PHPUnit
  • 701 Javascript assert
  • 600 C++ GoogleTest
  • 525 Ruby TestUnit
  • 384 Python pytest
  • 357 Java Approval
  • 324 Java Mockito
  • 278 C++ CppUTest
  • 219 Ruby RSpec
  • 217 Java Cucumber
  • 205 Javascript jasmine
  • 157 Haskell hunit
  • 154 Clojure .test
  • 131 Go testing
  • 125 C++ CATCH
  • 120 Perl TestSimple
  • ...

The most popular exercise is Fizz Buzz (again, some have been installed longer than others).
  • 2091 Fizz Buzz
  • 1830 100 doors
  • 924 Verbal
  • 787 Calc Stats
  • 778 Leap Years
  • 733 Roman Numerals
  • 722 Game of Life
  • 713 Anagrams
  • 644 Print Diamond
  • 549 Tennis
  • 498 Prime Factors
  • 476 LCD Digits
  • 466 Yatzy
  • 405 Bowling Game
  • 355 Count Coins
  • 329 Number Names
  • 298 Harry Potter
  • 287 Mine Field
  • 286 Phone Numbers
  • 192 Poker Hands
  • ...


terms & conditions

  • cyber-dojo is free for non-commercial use
  • Commercial use of the public server requires a license. For example, if you work for a profit-making organization, and you're using http://cyber-dojo.org at work, during office-hours, you need a license.
  • The cyber-dojo Foundation issues licenses
  • cyber-dojo is provided in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

please email me your feedback

What did you like?
What did you dislike?
What should I add?
What should I remove?
Please email me your feedback.

about cyber-dojo



what is cyber-dojo?

cyber-dojo at Trondheim XP meetup
  • a dojo is a place where martial artists practice martial arts.
  • cyber-dojo is where programmers practice programming!
  • cyber-dojo is not an individual development environment.
  • cyber-dojo is a shared learning environment.
  • in a cyber-dojo you focus on improving rather than finishing.
  • in a cyber-dojo you practice by going slower.
  • tell me how to use cyber-dojo

cyber-dojo tips

  • Repeat your practice. Repetition frees up mental capacity creating space for improvement.
    Don't be too concerned about finishing; think about improving.
  • cyber-dojo is designed to encourage team practice and works well with two (or more) people at each computer, periodically rotating the current keyboard drivers to different computers as navigators.
  • After each practice use the dashboard to start a review. Look for evidence of...
  • Practice refactoring.
  • Allow at most N amber traffic-lights (total or in-a-row)...
    • per animal
    • per cyber-dojo
    • repeat with reduced value of N
  • Before pressing the button predict what colour traffic-light you will get.
    Allow at most N incorrect predictions...
    • per animal
    • per cyber-dojo
    • repeat with reduced value of N
  • Set social challenges...
    • Change keyboard drivers before starting each new cyber-dojo
    • Change keyboard drivers during a cyber-dojo
    • Change pairs before starting each new cyber-dojo
    • Change pairs during a cyber-dojo
  • Set technical challenges...
    • no loops
    • no conditionals
    • no division or modulus
    • immutable data structures only
    • no mouse
    • no data structures
    • maximum 5 lines per method
    • maximum 2 levels of indentation
    • the possibilities are endless!
  • When everyone is at green set a challenge to either...
    • find some code you can delete and the tests still all pass
    • find a bug, and write a failing test for it
  • Create a custom starting point...
    • with all the tests, but none of the code
    • with all the code, but none of the tests
    • with a specific fault - which pair can fix it first?
  • Play the average-time-to-green-game.