Information about Pair Programming

Pair programming requires two programmers to participate in a combined development effort at one workstation. Each member performs the action the other is not currently doing: for example, while one types in unit tests, the other thinks about the class that will satisfy the test.

The person who is doing the typing is known as the driver while the person who is guiding is known as the navigator. It is often suggested for the two partners to switch roles at least every half-hour or after a unit test is made. It is also suggested to switch partners at least once a day.

Benefits

Pair programming is asserted to yield the following benefits, roughly ordered from largest benefit to smallest:
  • Increased discipline. Pairing partners are more likely to "do the right thing" and are less likely to take long breaks.
  • Better code. Pairing partners are less likely to produce a bad design due to their immersion, and tend to come up with higher quality designs.
  • Resilient flow. Pairing leads to a different kind of flow than programming alone, but it does lead to flow. Pairing flow happens more quickly: one programmer asks the other, "What were we working on?" Pairing flow is also more resilient to interruptions: one programmer deals with the interruption while the other keeps working.
  • Multiple developers contributing to design. If pairs are rotated frequently, several people will be involved in developing a particular feature. This can help create better solutions, particularly when a pair gets stuck on a particularly tricky problem
  • Improved morale. Pair programming can be more enjoyable for some engineers than programming alone.
  • Collective code ownership. When everyone on a project is pair programming, and pairs rotate frequently, everybody gains a working knowledge of the entire codebase.
  • Mentoring. Everyone, even junior programmers, possess knowledge that others don't. Pair programming is a painless way of spreading that knowledge.
  • Team cohesion. People get to know each other more quickly when pair programming. Pair programming may encourage team gelling.
  • Fewer interruptions. People are more reluctant to interrupt a pair than they are to interrupt someone working alone.
  • Fewer workstations required. Since two people use one workstation, one fewer workstation is required, and therefore the extra workstation can be used for other purposes.
Studies have shown that after training for the "people skills" involved, two programmers are more than twice as productive as one for a given task. According to The Economist,
"Laurie Williams of the University of Utah in Salt Lake City has shown that paired programmers are only 15% slower than two independent individual programmers, but produce 15% fewer bugs (N.B.: The original study showed that 'error-free' code went from 70 % to 85 %; it may be more intuitive to call this a 50 % decrease of errors, from 30 % to 15 %). Since testing and debugging are often many times more costly than initial programming, this is an impressive result." [1]
(Dr. Williams is currently Assistant Professor of Computer Science at North Carolina State University)


The Williams et al. 2000 study showed an improvement in correctness of around 15% and 20 to 40% decrease in time, but between a 15 and 60% increase in effort. Williams et al. 2000 also cites an earlier study (Nosek 1998) which also had a 40% decrease in time for a 60% increase in effort.

A larger recent study (Arisholm et al. 2007) had 48% increase in correctness for complex systems, but no significant difference in time, whilst simple systems had 20% decrease in time, but no significant difference in correctness. Overall there was no general reduction in time or increase in correctness, but an overall 84% increase in effort.

Another recent study presents a rigorous scientific experiment in which novice–novice pairs against novice solos are much more productive than expert–expert pairs against expert solos, according to "Int J. of Human Computer Studies Vol (64) 2006"

Drawbacks

  • Experienced developers may find it tedious to tutor a less experienced developer in a paired environment.
  • A less experienced developer may feel intimidated pairing with a more experienced developer which may result in less participation.
  • Many engineers prefer to work alone, and may find the paired environment cumbersome.
  • Productivity gains or losses are hard to compare between paired and non-paired environments, as metrics of programmer productivity are controversial at best.
  • Experienced engineers quite likely produce code that is very accurate, and the additional theoretical gain from pairing is not worth the cost of an additional engineer.
  • Differences in coding style may result in conflict.
  • In the case where the team has slightly different work schedules, which is common in an environment that values work-life balance, the pair is only available during the overlap of their schedules. Therefore, not only does it require more man-hours to complete a task, a typical day has fewer pair-hours available, which further increases the overall task completion time.
  • Where a company values telecommuting (working from home) or when an employee must work from outside the office for whatever reasons, pair programming can be difficult and even impossible. However with broadband internet access and common screen sharing programs and VOIP technologies such as Skype, telecommuting can in fact better lend itself to pair programming. (see Remote pair programming)
  • Personality conflicts can result in one or both developers feeling awkward or uncomfortable.
  • Some developers can sit in front of a computer for many hours straight, others like to get up and walk around often.

See also

External links

  • Williams, Laurie & Robert Kessler (2000), "All I Really Need to Know about Pair Programming I Learned in Kindergarten", Communications of the ACM 43(5): 108–114
  • Agility counts, The Economist, Sep 20th 2001
  • Article Will Pair Programming Really Improve Your Project? from Methods & Tools
  • Pair Programming Productivity: Novice-novice vs. Expert-expert International Journal of Human Computer Studies Vol 64 (2006) 915-925
  • Williams, L.; R.R. Kessler & W. Cunningham et al. (2000), "Strengthening the case for pair programming", Software, IEEE 17(4): 19-25, DOI:10.1109/52.854064
  • id="CITEREFArisholmGallisDybaSjoberg2007">Arisholm, E.; H. Gallis & T. Dyba et al. (2007), "Evaluating Pair Programming with Respect to System Complexity and Programmer Expertise", Software Engineering, IEEE Transactions on 33 (2): 65-86, DOI 10.1109/TSE.2007.17
    programmer or software developer is someone who programs computers, that is, one who writes computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist who writes code for many kinds of software.
    ..... Click the link for more information.
    In computer programming, unit testing is a procedure used to validate that individual units of source code are working properly. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual program, function, procedure, etc.
    ..... Click the link for more information.
    Flow is the mental state of operation in which the person is fully immersed in what he or she is doing, characterized by a feeling of energized focus, full involvement, and success in the process of the activity.
    ..... Click the link for more information.


    Type Weekly newsmagazine
    (in UK, a registered newspaper)
    Format Magazine


    Owner The Economist Group
    Editor John Micklethwait
    Founded September 1843
    Political allegiance Economic liberalism (moderate Libertarianism), "Extreme Centrism"
    ..... Click the link for more information.
    University of Utah (also The U or the U of U or the UU), located in Salt Lake City, is the flagship public research university in the state of Utah, and one of 10 institutions that make up the Utah System of Higher Education.
    ..... Click the link for more information.
    North Carolina State University is a public, coeducational, extensive research university located in Raleigh, North Carolina, United States. Named North Carolina State University at Raleigh by statute and commonly known as NC State or NCSU
    ..... Click the link for more information.
    Telecommuting, e-commuting, e-work, telework, working at home (WAH), or working from home (WFH) is a work arrangement in which employees enjoy limited flexibility in working location and hours.
    ..... Click the link for more information.
    Remote pair programming is the practice of pair programming where the two programmers comprising the pair are in different locations, working via a collaborative real-time editor, shared desktop, or a remote pair programming IDE plugin.
    ..... Click the link for more information.
    Software development process
    Activities and steps
    Requirements | Architecture | Implementation | Testing | Deployment
    Models
    Agile | Cleanroom | Iterative | RAD | RUP | Spiral | Waterfall | XP
    Supporting disciplines
    ..... Click the link for more information.
    ~ do ~ check ~ act ~ plan ~ do ~ check ~ act ...
  • pair programming ~ solo programming ~ pair programming ~ solo programming ...
    ..... Click the link for more information.
Remote pair programming is the practice of pair programming where the two programmers comprising the pair are in different locations, working via a collaborative real-time editor, shared desktop, or a remote pair programming IDE plugin.
..... Click the link for more information.
digital object identifier (or DOI) is a permanent identifier given to a document, which is not related to its current location. A typical use of a DOI is to give a scientific paper or article a unique identifying number that can be used by anyone to locate details of the paper, and
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter