Pair programming

Published:

Pair programming is a software development technique usually placed into the agile programming philosophy. This method is based on the act to put two programmers in the same workstation, one of them writes the code who is called the driver, while the other, the observer or navigator, reviews each line of the code while the driver is writing them. The strong point of this technique is specialization of both of them in different scale level task of programming, the driver in the low level task while the observer studies the integration with the rest of the code and the future problems to address. The roles of both programmers are usually switched.

The main advantages I can see are:

  • Less errors in code. Four eyes are better than two.
  • Complete communication. Both know all the part of the program, how to use it and how to debug it.
  • Better design code quality since the design is result of a discussion of two different point of views and it is supposed to win the most valuable features of each one.

The main disadvantages are:

  • Losing work labor. It is more time spent for less code programmed.
  • Disconnection. If the roles are prolonged in long exercises, the observer could disconnect or passively watch the driver and hesitate to participate meaningfully.

Both, summed up, lead me to some conclusions:

  • This method is useful for critical parts of the code where the bugs could be influentially dangerous for other parts of the code.
  • Could be a good initialization exercise between two experimented programmers in order to know themselves and how each one codes, or between one experimented programmer with a junior in order to teach him on a fly ways to code or standards the team uses.

See also

Agile software development

Material

Papers

Books