Pair Programming refers to the practice of having two people engaged together on a single programming task. It’s an XP practice, and is employed by many agile (and non-agile) software development teams. Even in traditional environments where pair programmnig is not the norm, it is still the go-to practice used whenever someone is faced with a difficult or frustrating bug, problem, or design decision. Any time one programmer calls another over to have a look at something they’re working on, their practicing pair programming.
Pair programming involves two active participants, not an active programmer and a passive observer. One of the first requirements of effective pair programming is the design of the workspace itself. Typical desk and cubicle setups that have an L or U desktop configuration, or that position the keyboard and monitors in the corner of a desk setup, are not amenable to pair programming (or collaboration of any kind). The best pair programming setups have a table or straight desk that can support two chairs side-by-side, as well as dual monitors, dual keyboards, and dual mice, so that either programmer can work on the problem at hand at any time without having to shift their position or pass the keyboard/mouse back and forth. Of course, pair programming can be done in environments that don’t have all of these amenities, but this environment is ideal and eliminates most of the friction involved in the process.
pair programming is not a "go faster" strategy, it is a "waste less" strategy (which often results in going faster)
— Kent Beck (@KentBeck) February 12, 2015