report-stories

Pair Programming - Driver, Navigator or Tour Guide?

Many of our teams at REWE digital practice pair programming. This means that two developers work tog

from  Stefan Scheidt
24.06.2019

Many of our teams at REWE digital practice pair programming. This means that two developers work together on one computer.

Pair programming offers many advantages:

  • Pair programming is a form of "Extreme Code Review".

  • It promotes consensus about the resulting solution and "Collective Code Ownership". 

  • It also supports the distribution of knowledge within the team.

  • It limits "Work in Progress".

  • It opens doors for working methods such as Trunk Based Development without pull requests, which in turn bring their own advantages.

Pair programming also poses some challenges:

  • Pairing partners may prefer different operating systems, keyboard layouts, IDEs and key bindings.

  • The workstation ergonomics must allow joint work on one computer.

  • Efficient pair programming is only possible if there are enough uninterrupted times in the working day in which a pair can work together.

  • Pair programming is exhausting. Often a pair does not take breaks in time and not often enough.

  • Pair programming can only lead to collective code ownership if the pairing partners change often enough. All team members must find a mode in which they can work well together as pairs.

 

Various studies have shown that pair programming has no negative influence on the development speed of a team. Our experience confirms this.

 

In the course of dealing with the challenges we have, among other things, dealt a little more intensively with possible modes of cooperation.

Distribution of roles

In addition to unstructured collaboration, in which two people work together "just like that", there are at least the following common roles in pair programming:

  • Tour Guide & Tourist

  • Driver & Backseat Navigator

  • Driver & Navigator

Tour Guide & Tourist
 

In this role assignment, the pairing partner on the keyboard acts as the "tour guide", while the other partner is the "tourist". The tour guide does the job and explains everything she does and points out "interesting sights". The tourist follows what is shown and, if necessary, asks questions.

This distribution of roles is suitable for introducing "new" colleagues to a topic - content-wise or technical. However, the tourist is often passive and must actively "stick to it". The tour guide can do this by asking the partner ("I would check it in like this right now"). OK", "I think we need another test. What do you think?", ...).

Driver & Backseat Navigator
 

In this role distribution, the partner who is not sitting at the keyboard dictates to the partner exactly what he should do - like the Backseat Driver, i.e. the "know-it-all" when driving a car. The driver is only the executive organ.

This distribution of roles is also suitable for an "expert - novice" constellation, but the "novice" is much more actively involved than the "tourist". The Backseat Navigator must be able to explain what is to be done well and at an appropriate level of abstraction. Please also note the following explanations on "Strong-style Pairing".

Driver & Navigator
 

This is the role distribution which is usually aimed at by paring partners with comparable level of knowledge (content-wise as well as technical). It alludes to the teamwork of driver and co-driver during a rally. The driver concentrates completely on the details of the coding, the navigator keeps the larger overview and asks questions.

The driver supports this distribution of roles, for example by

  • giving an outlook of where she wants to "go" ("Let's first implement database access."),

  • says what she thinks ("I implement A first. Then I can use this later for B."),

  • expectations ("This test should now fail."), and

  • obvious ("Can we commit it that way?").

The navigator can assist by

  • by following the action of "the story",

  • Confirms or rejects assumptions,

  • Reasons are asked when the driver takes surprising or unexpected routes,

  • thinks about the following tasks

  • is looking for a way out when he feels the pair is heading for a dead end.

Role Swapping

For the Driver/Navigator role distribution, the roles should be changed regularly. This can be done, for example, by a timer that reminds you to swap roles every 10 minutes. If the team practices test-driven development, ping-pong pairing can also be used: Pairing partner A begins the pairing by writing a failed test. Pairing partner B makes the test green and refactorizes in the role of the driver. Then it is swapped: B writes a failed test and A turns him green as a driver.

With the other role distributions, the change is more difficult if it is used in an "Expert - Novice" constellation. For example, a "novice" can usually only take on the role of a tour guide to a limited extent. However, it is also possible to change the distribution of roles when roles are changed: The expert becomes the backseat navigator of tour guide, the novice becomes the driver of tourist.

Strong-style pairing

An interesting variant of driver-navigator pairing can be strong-style pairing. This idea was brought up by Llewellyn Falco. The golden rule of this style is: "For an idea to go from your head into the computer it MUST go through someone else's hands". It combines elements of Driver & Navigator and Driver & Backseat Navigator. For example, it addresses situations in which the classic driver is too dominant, or the classic navigator just watches. It establishes a kind of separation of powers between driver and navigator and involves the navigator more actively in what is happening.

Finally, it must be said that pair programming is of course only possible and meaningful if there is the corresponding "buy-in" of the participants. Not all people feel comfortable in pairing situations, and you have to respect that. In such situations it can be interesting not to take a step back, but to take a step forward and try out a Mob Programming session instead of Pair Programming.

Next Story from  Stefan Scheidt

Pair Programming - Driver, Navigator or Tour Guide?

Stefan Scheidt
Next Story in : report-stories

SHIFT Think Tank

Melanie Pöplau

Search here for Stories, Jobs and Categories…

Back
No search results for available
Robot
Unfortunatly your search term didn't generate any hits.
Further down we have several terms for you or take a look at our job openings!