Photo by Leon on Unsplash

Improve your developer’s onboarding experience with this simple coding dojo

Remote working is making the process of onboarding newcomers even more difficult. With this simple coding dojo your team will have fun and get to know each other while improving their coding skills.


Coding Dojo explanation

  1. Create a miner
  2. Log into the mine
  3. Look for those precious gold nuggets
  4. Save them into their pockets
  5. Iterate between 3 and 4

The problem is that the API, which allows the steps described above, does not work as expected, returning random errors and login out miners from time to time. As a result, apart from coding fast, you have to code to prevent those errors.

I have created a simple Web UI and an API, you can find the container here. On one hand, the Web UI is basically to make the session more dynamic. It was developed in ReactJS and consists of 2 sections, one to show the instructions and the other to display a live ranking of how miners are doing.

Introduction on the top, live ranking at the bottom

On the other hand, there is an API developed in .NET Core to mine the gold.

Swagger Documentation

How to organize the Coding Dojo

For the first part, gather your team and share with them both the API and the Web UI URL. Explain the challenge and give some minutes to answer questions and organize the development environment. Once everything is clear, give them time to complete the first part, between 40 and 50 minutes is my recommendation, share your screen with the live ranking web page and let the challenge begin. Once the time is up, announce the winner, and have a 15 minutes discussion about the issues found during the exercise.

The second part is about optimizing and refactoring the code to be the fastest miner, the exercise consists of running the services all at once to check who is the fastest one. My recommendation is to give the weekend allowing developers to code and come back on Mon or Tue to test the miners.

Some tips for the facilitator

  • The code is prepared to throw Internal Server Exceptions randomly
  • Only GET can be tried on the Swagger page
  • The database is an in-memory database, so each time you restart the server everything will be reset
  • The service does not allow to save in the miner’s pocket a different quantity that has been mined
  • Every 10 seconds a random miner is logged out from the mine
  • The Web-UI and the API resides in the same server
  • Once a miner is created, the miner has to log into the mine, look for gold nuggets, save them into their pockets and repeat

Our experience

From my experience, senior developers struggle the most with this type of exercise because it requires to code fast leaving good practices or complicated architectures behind.

The first time, we run the coding dojo in the offices, this time we did it remotely, the overall experience has been mostly the same and the team was engaged from the very beginning.

The overall experience was highly appreciated by the team, the feedback after the sessions was great and some collaborators ask me for doing this type of exercises from time to time.