Laurie Williams Copyright © 2003, Laurie Williams. All rights reserved.
Pair programming is a style of programming in which two programmers work side by side at one computer, continually collaborating on the same design, algorithm, code, or test. One of the pair, called the driver, is typing at the computer or writing down a design. The other partner, called the navigator, has many jobs. One is to observe the work of the driver looking for tactical and strategic defects in the work of the driver. Tactical defects are syntax errors, typos, calling the wrong method, and so on. Strategic defects occur when the driver is headed down the wrong path what they are implementing just won't accomplish what it needs to accomplish. The navigator is the objective, strategic, longer-range thinker. Any of us can be guilty of straying off the path. A simple "Can you explain what you're doing?" from the navigator can serve to bring us back to earth. The navigator has a much more objective point of view and can think better strategically about the direction of the work. One great thing is that the driver and the navigator can brainstorm on demand at any time. An effective pair programming relationship is very active. The driver and the navigator communicate at least every 45 seconds to a minute. It is also very important to switch roles periodically. Anecdotal and statistical evidence indicates many benefits of pair programming. These benefits are described in this chapter. However, without a doubt, there is resistance to transitioning to pair programming. One group of people who resist is managers. They often have the knee-jerk reaction "Why in the world would I pay two programmers to do something that one programmer could do?" This is not a surprising reaction. This chapter addresses the concerns of managers who are considering or are resistant to transitioning to pair programming. Specifically, we examine five common motivations of managers that pair programming can address [Williams+2002]. |