Skip to content

Instantly share code, notes, and snippets.

@Bogghead
Last active April 14, 2023 18:35
Show Gist options
  • Save Bogghead/5071852b35fbd73f1fba845fa2b878f5 to your computer and use it in GitHub Desktop.
Save Bogghead/5071852b35fbd73f1fba845fa2b878f5 to your computer and use it in GitHub Desktop.
How to Setup A Class on Cyber-Dojo

How to Setup A Programming Class/Exercise on Cyber-Dojo

Cyber-Dojo is available to everyone on any day, or night, from anywhere on the planet. It can be used individually, or in a classroom/workshop situation.

Here are instructions on how you can setup the starting state for an exercise so that up to 64 people, or 64 pairs, or mobs, can all work from the same starting point. You will be able to monitor thier individual progess from a dashboard showing a summary of everyone's check-ins, test results, and allowing you to drill down and see every change an individual or pair has made.

Below are two sections. The first is how you setup an exercise for multiple people to work on from the same starting point. The second section is the instructions you give to someone(s) so they can use what you've created.

Section I. Setup of An Exercise Starting Point:

  1. Go to Cyber-Dojo.org where you'll see this. Two buttons: "i'm on my own", and "we're in a group" Choose "i'm on my own"

  2. After selecting "i'm on my own" you will see a menu of options. Choose "create a new session" from the options.

  3. Finally, you will see three columns:

    • Column 1: A scrollable list of coding languages, paired with at least one test framework.
    • Column 2: a scrollable list of exercises
    • Column 3: The instructions for the selected exercise (after you select one). You can see these instructions at any time while doing the exercise. Columns 1 and 2 are listed in alphabetical order.

Once you've made your choice of language, test framework, and exercise, click the "OK" button way down at the bottom of the page. You may have to scroll to see it.

  1. At this point, you are almost certainly looking code with a list of files to the left, and some buttons at the top left. This is the Cyber-Dojo IDE-like enironment. As an example for Java/JUnit, the files listed will be ..

    • Hiker.java - The code under test
    • HikerTest.java - The test code

    Note: These first two files always have an expected answer of 42, and the initial result is always 54.

    Pro Tip: Use the "options" button along the bottom of the page to "toggle syntax highlighting" (not available for all languages).

    • readme.txt - The instructions for the exercise/kata
    • stdout - where the results of the test will be shown
    • stderr - where failures of various kinds are shown
    • status - a 0 or 1 to indicate if all tests passed or not
    • cyber-dojo.sh - the shell script that runs the whole shooting match
  2. OK, now the fun part. Make whatever changes to the starting files you wish to get to starting point you want. When everything (code under test, test code, and readme.txt/instructions) are just the way you want them, it's time to click on the last colored ball (red, yellow, or green depending on the situation you want your attendees to start with), NOW click on the rightmost colored ball.

What you see at this point, across the top, is the current number of check-ins/versions you have, a big "resume" button, left-arrow, right-arrow, and one or more colored balls. Note that the menu items below the big "resume" button are different now: diff?, fork, and revert. Choose fork to create the starting point for your attendees/students.

You next see the fork dialog with what kind of practice-session do you want to create? as a prompt, offerring individual or group. Choose group.

You will be given a new 6-character code that is case-sensitive, and uniquely identifies the exercise, along with how to say it. e.g. 6lqJwd is decribed as "six-lima-quebec-JULIETT-whiskey-delta". the "lima" confirmes that the second character is a lowercase L and not the digit one. "JULIETT" reminds you that the J is uppercase while the rest of the letters in this example are lowercase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment