Mob Programming is an efficient way to teach multiple people a new language and needs very few resources.
This past fall I had the great opportunity to attend Strange Loop in St. Louis. Along with the main part of the conference, there was also the pre-conference workshops, which were offered at an added cost. However, if you still wanted pre-conference activities, but without the extra money, you were able to attend the ‘Coding Dojos’ that were offered.
What are ‘Coding Dojos’ you ask? As the Strange Loops Coding Dojo page states:
A Coding Dojo is a get-together where programmers follow a pattern similar to the martial arts dojo to practice their skills. In this Coding Dojo you will get an opportunity to practice new languages with leading experts on hand to guide and assist.
It gave developers the opportunity to be introduced to a new language in an hands-on, quick, and effective way.
Dojos were offered in several languages, and none of which I had ever touched. These included Go, Elixir, Swift, Rust, Idris, and Elm.
I opted to attend the Elixir and Rust Dojos.
These Dojos were led by Llewellyn Falco @llewellynfalco, and in a Mob programming format. I had never programmed in this manner before, but found it very intriguing. It allowed anyone who wanted to, a chance to code in this new language without needing their own hardware because it all occurred with one computer that was projected on a screen. It also allowed people to collaborate with several others to get to the end result.
Here is a mockup of the Dojo setup that Llewellyn provided:
Image courtesy of Llewellyn Falco
The important things to note from this image are the ‘Mob’ and the ‘Laptop’. The Mob is the group of people actively developing on the project. Notice there is only 1 laptop for all of the people participating. The Mob’s size can vary, but still, there is only one laptop in use. There are 2 main roles within the Mob during development. These are the Navigator, and the Driver. The Driver is an ignorant typer, who only follows directions from the Navigator. The people populating these roles, continually change. There was also an Audience in which observers can sit and watch without participating in the Mob.
Many of us had little to no experience with the language being used. This is why we had the Expert role. This person was available to answer questions regarding syntax and capabilities of the language being used. S/he could give advise regarding the language, but not on how we solved the exercise, and had to remain ‘hands-off’ of the laptop. There was also the Facilitator role, which for my two sessions was filled by Llewellyn Falco, who made sure we were following the Mob Programming process (which can be tempting to stray from) properly.
And They All Rolled Over And One Fell Out
During my experience, we used a timer that went off in 4 minute intervals. Every time the timer rang, roles would change. The Navigator would move to the Driver position, the Driver would move to the end of the Mob, and the first person in the Mob would become the Navigator. We worked on a Code Kata which asked us to create a solution to do addition in Roman Numerals (i.e. III + VI = IX). As we worked to solve this, we kept rotating through the roles and the mob every 4 minutes to our new position.
From my understanding, Mob Programming sessions can adjust their timer values to what best fits their team, but 4 minutes worked really well for this experience, especially for someone like me who is shy, and nervous about coding in front of people. This allowed me to get up there while navigating, express my thoughts, and if I stumbled a little, I knew I wouldn’t be there long enough to fall on my face.
In my experience, it became more of a collaborative process as the Mob would also shout out suggestions for solving the problem.
Mob Programming for me was a very cool experience which allowed me to collaborate with a group, and still have an opportunity to navigate. I found it to be a very useful and quick way for a group of people to learn a new language. I look forward to trying it again.