Pair programming and the dreaded ‘anti-pattern’

 

Key Features:
…………………………………………………………………………………………………………………….

  • Business strategy
  • Quality software delivery
  • Advantages of pair programming
  • Destructive anti-patterns

 

When applying agile practices to a business there is one strategy in particular that contributes substantially to the quality of delivered software; pair programming.


For those who have not heard of the practice before, pair programming involves two programmers working together at the same workstation on the same piece of software.  Pairing is a collaborative enterprise, and at its best resembles what most people would understand as a pilot and co-pilot relationship, both actively involved, but with differing responsibilities and the roles switching frequently.

At Black Pepper, properly implemented pairing has benefited many projects in terms of productivity, quality and knowledge transfer and has also provided an ideal method of mentoring junior members of the team in a supportive environment. However, if the pairing fails in some way the effects on quality, productivity and morale can be serious.

A development team needs to be vigilant to ensure that they steer the pairing process in the correct direction and address any issues as they arise. Black Pepper has found that the best way to stay on top of this agile practice is to actively encourage the team to make sure that ‘anti-patterns’ don’t emerge, and to use pairing itself to improve behaviour. Listed below are some of the most destructive anti-pattern’s which everyone should watch out for;

The Silent Partner

Here the co-pilot pays no attention to the work at hand, sits back and lets the pilot get on with it. Whilst giving the illusion of pairing, the co-pilot actively hands off responsibility to their partner. Symptoms may include excessive attention paid to a mobile phone, or conversations with other colleagues.

The Dictator

This anti-pattern sees the pilot hogging the keyboard and ignoring any suggestions by the co-pilot. At worst the “Dictator” makes destructive comments. Ultimately this may result in the “Silent Partner” anti-pattern as the co-pilot becomes dispirited.

The Amicable Separation or Pairing Separately

Both individuals split to work on separate aspects of the current work item, sometimes even using different laptops at the same desk.

Asleep at the Wheel

This behaviour manifests itself when the pilot is basically acting as nothing more than a stenographer. They take no active part in the design of the code, relying on the co-pilot to direct their efforts, in some cases even to the extent of needing to be told what to type.

The Lone Wolf

This is the person who, for whatever reason, prefers to work alone. As a result pairing with them is difficult and they either become “Dictator”, “Silent Partner” or there is an “Amicable Separation”.

Paired for Life

One of the benefits of pair programming is that it is a great way to transfer knowledge around a team of developers. For this to be effective pairs must rotate frequently. This anti-pattern manifests when pairs stay together too long. Regular rotation will also allow the team to get used to working with and learning from each other and ensures that any anti-patterns which develop within certain pairings are quickly quashed.


 

Leave a Comment