Pair Programming - Costs and Benefits

Costs and Benefits

Some studies have found that programmers working in pairs produce shorter programs, with better designs and fewer bugs, than programmers working alone. Studies have found reduction in defect rates of 15% to 50%, varying depending on programmer experience and task complexity. Pairs typically consider more design alternatives than programmers working solo, and arrive at simpler, more-maintainable designs; they also catch design defects early. Pairs usually complete work faster than one programmer assigned to the same task. Pairs often find that seemingly "impossible" problems become easy or even quick, or at least possible to solve when they work together.

Knowledge passes between pair programmers as they work. They share knowledge of the specifics of the system, and they pick up programming techniques from each other. New hires quickly pick up the practices of the team and learn the specifics of the system. With "promiscuous pairing" – each programmer cycling through all the other programmers on the team rather than pairing only with one partner – knowledge of the system spreads throughout the whole team, reducing risk to management if one programmer leaves the team.

Pairing usually brings improved discipline and time management. Programmers are less likely to skip writing unit tests, spend time web-surfing or on personal email, or cut corners when they are working with a pair partner. The pair partner "keeps them honest". People are more reluctant to interrupt a pair than they are to interrupt someone working alone.

Additional benefits reported include increased morale and greater confidence in the correctness of the code.

Read more about this topic:  Pair Programming

Famous quotes containing the words costs and/or benefits:

    It costs more to maintain ten vices than one virtue.
    —H.L. (Henry Lewis)

    Unfortunately, we cannot rely solely on employers seeing that it is in their self-interest to change the workplace. Since the benefits of family-friendly policies are long-term, they may not be immediately visible or quantifiable; companies tend to look for success in the bottom line. On a deeper level, we are asking those in power to change the rules by which they themselves succeeded and with which they identify.
    Anne C. Weisberg (20th century)