Pair programming: When two developers sit at the same computer and work together.

Mob programming: When many developers(more than two) sit at the same computer and work together.

Pair/Mob programming Pros and Cons

The pros and cons are very similar between pair and mob programming. In other words regardless of if there are two, three or four devs the idea is the same.

Management may view pair programming as a misuse of resources, since they could have two devs pushing out code in parallel. This is mostly a misconception and the pros we are about to go through clearly explain why. But there are so me cons which teams need to manage correctly to make pair/mob programming work properly.

Pros

Cons

My team fluidly interchanges between pair, mob and solo dev as circumstances change. For example a day would like this: three devs will start working on a complex task while another starts on a simple task. When the simple task is done that dev will join the group on the complex task. Then maybe a production issue arises and two devs break off the group to look at the issue.

My team will take certain considerations into account before deciding on a mob to tackle a given task.

  • Expertise: Do we have someone with the correct expertise for the task? Does anybody want to skill up in that particular area and learn from the expert?
  • Task difficulty: How complex is the task? Do we need more heads together on this problem?
  • Task importance: How important is the task? Is failure/bugs acceptable?
  • Dev saturation: Are there too many devs already involved? At what point is adding more devs not going to be beneficial? eg 30 devs at one computer is redundant, since a handful of devs will be just as efficient.

Often you will hear people give very specific instructions on how to pair/mob programme as if there is only one way to do it. There are actually many different ways you can pair/mob programme. I recommend to try different techniques and change it up from time to time. I use all of the below techiques depending on the situation:

Standard pair/mob programming

Method: one person codes and the others watch and make suggestions.

When to use: I use this for complex solutions which require deep consideration.

Reason: The person coding can complete large chunks of work while the rest of the team can comment when they think of edge cases to consider or see issues in the code. If the person coding does not know what to do or is junior then others must explain exactly what to type so that he can learn and still be actively involved in the process.

collapse
Shared IDE pair/mob programming

Method: Share IDE with Visual Studio Live share so that both devs can type at the same time

When to use: I use this for code heavy soltions which require a lot of typing and some coordination between devs.

Reason: This is a geat tool since huge amounts of code can be delivered while the devs stay in sync and constantly check each other.

collapse
Some other exercises
  • One person uses the keyboard and another person uses the mouse. This is an exercise in coordination and team work.
  • One person types(only what he is told) and the others explain what to type. This is an exercise in communication for the person explaining.
collapse