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.

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

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Data streaming with Apache Kafka — guide for data engineers

What you must know about Pandas — hands-on Scenario

Introducing G|Code’s Change Makers: Kayla Griffith

Creating Multi-boot USB: For Catalina and Mojave Installer

Creating maven projects that can be imported into Red Hat Business Central

The most delicious function — yummy curry

How to Install Multiple Golang Versions of the Environment

Families Learning Together — I

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Javier Hertfelder

Javier Hertfelder

More from Medium

Top 9 Candidate Sourcing Best Practices

Communication Is Key

Top 6 Expert opinions on the importance of software product technical audit

software product technical audit

What managing An Intern/ Co-Op Taught Me