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.

Javier Hertfelder
4 min readMay 11, 2021

Introduction

The life of a gold miner is a difficult one, every single day has to enter in a darkening mine, look for gold nuggets and return, most of the time, with empty hands, willing that next day will be a better one. Differences aside, the life of a developer has sometimes similarities with a miner, that gold nugget is the problem you are trying to solve and the solution is somewhere inside your brain. Now, imagine for a minute, how hard it could be for a developer that just landed on your company to solve that problem. This coding dojo, will give that developer the opportunity to get together, have a great time, and hopefully learn something about mining.. I mean.. programming ^^.

Coding Dojo explanation

This Dojo is about mining, mining as fast as you can. Developers have to complete the following tasks:

  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

The session consists of 2 parts. The first part is designed to code fast and under pressure, the second one is about optimizing the code to mine as fast as it can.

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

  • Each developer has to create the miner once and save the Id
  • 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

This exercise is an old one, I took the idea from a CAS Conference done back in 2017, we have done it twice since then. The second time was a month ago, I have improved the overall experience with the live ranking page, the swagger documentation and we included the refactoring part.

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.

Resources

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response