Now I have set up RPi System B, pairing with System A.
Pair programming - Wikipedia
Pair programming is an agile software development technique in which two programmers work together at one workstation. One, the driver (or Holmes), writes code while the other, the observer (Watson or navigator[1]), reviews each line of code as it is typed in. The two programmers switch roles frequently.
While reviewing, the observer also considers the strategic direction of the work, coming up with ideas for improvements and likely future problems to address. This frees the driver to focus all of his/her attention on the "tactical" aspects of completing the current task, using the observer as a safety net and guide.
Benefits
Some studies have found that programmers working in pairs produce shorter programs, with better designs and fewer bugs, than programmers working alone.[2] Studies have found reduction in defect rates of 15% to 50%, varying depending on programmer experience and task complexity.[3][4] Pairs typically consider more design alternatives than programmers working solo, and arrive at simpler, more-maintainable designs; they also catch design defects early.[5] 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.[2][6]
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.[2][7] New hires quickly pick up the practices of the team and learn the specifics of the system.[8] 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.[2]
Benefits
Some studies have found that programmers working in pairs produce shorter programs, with better designs and fewer bugs, than programmers working alone.[2] Studies have found reduction in defect rates of 15% to 50%, varying depending on programmer experience and task complexity.[3][4] Pairs typically consider more design alternatives than programmers working solo, and arrive at simpler, more-maintainable designs; they also catch design defects early.[5] 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.[2][6]
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.[2][7] New hires quickly pick up the practices of the team and learn the specifics of the system.[8] 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.[2]
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,[9] or cut corners when they are working with a pair partner. The pair partner "keeps them honest".[10][11] People are more reluctant to interrupt a pair than they are to interrupt someone working alone.[12]
Additional benefits reported include increased morale[13] and greater confidence in the correctness of the code.[2]
Studies
There are both empirical and meta-analyses studies of Pair Programming. The empirical studies tend to examine the level of productivity and the quality of the code, while meta-analyses may focus on biases introduced by the process of testing and publishing.
Empirical studies
Williams: Error reduction with increased effort
The Economist noted,
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. Since testing and debugging are often many times more costly than initial programming, this is an impressive result."[4]
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. Since testing and debugging are often many times more costly than initial programming, this is an impressive result."[4]
(Note: The original study showed that "error-free" code went from 70% to 85%. It may be more correct to view this as cutting the errors in half, since the errors decreased from 30% to 15%.)
The Williams study showed an improvement in correctness of around 15% and a 20%–40% decrease in time; however the study also noted a 15%-60% increase in effort (as measured by total programmer-hours). Williams also cites an earlier study (Nosek 1998) which also had a 40% decrease in time for a 60% increase in effort.
Lui: comparing pairs to solos
A study (Lui 2006) compared novice pairs to novices working solo, as well as expert pairs to experts working solo. Lui found that novice–novice pairs experienced greater productivity gains against novice solos when compared to expert–expert pairs against expert solos.[14]
[edit]Lui, Chan, and Nosek: design tasks
Lui, Chan, and Nosek (2008) shows that pair programming outperforms for design tasks.[15]
Meta-analyses
A full-scale meta-analysis of pair programming experimental studies, from before or during 2007, (Hannay et al. 2009) confirms "that you cannot expect faster and better and cheaper." Higher quality for complex tasks costs higher effort, while reduced duration for simpler tasks comes suffers from lower quality – the meta-analysis "suggests that pair programming is not uniformly beneficial or effective".[16]
However, a 2007 meta-analysis concluded that "pair programming is not uniformly beneficial or effective" because many other factors besides the choice of whether to use pair programming have large effects on the outcome of a programming task.[16] The meta-study found that pair programming tends to reduce development time somewhat and produces marginal positive effects on code quality, but that pair programming requires significantly more developer effort; that is, it is significantly more expensive than solo programming. The authors suggest that studies of pair programming suffer from publication bias whereby studies that would not show that pair programming is beneficial were either not undertaken, not submitted for publication, or not accepted for publication. They conclude that "you cannot expect faster and better and cheaper."
This study suggests that even though coding is often completed faster than when one programmer works alone, the total amount of man-hours (number of programmers × time spent) increases. A manager needs to balance faster completion of the work and reduced testing and debugging time against the higher cost of coding. The relative weight of these factors can vary from project to project and task to task. The benefit of pairing is greatest on tasks that the programmers do not fully understand before they begin: that is, challenging tasks that call for creativity and sophistication.[14] On simple tasks, which the pair already fully understands, pairing results in a net drop in productivity.[14][17] Productivity can also drop when novice-novice pairing is used without sufficient availability of a mentor to coach them.[18]
Non-Performing Indications
There are a few indicators that a pair is not performing well:
Disengagement – One of the members physically moves their chair away from the keyboard, or starts working on their email, etc. Sometimes this can be as extreme as one member falling asleep.
Watch the Master – Sometimes one member will be more experienced than the other. There is a temptation to defer to the more senior member, and the less senior will be relegated to observer status. This will often lead to disengagement.
Silence – Pairs cannot work together if they are not talking to each other.[19]
Variants
Remote pair programming
Remote pair programming, also known as virtual pair programming or distributed pair programming, is pair programming where the two programmers are in different locations,[20] working via a collaborative real-time editor, shared desktop, or a remote pair programming IDE plugin. Remote pairing introduces difficulties not present in face-to-face pairing, such as extra delays for coordination, depending more on "heavyweight" task-tracking tools instead of "lightweight" ones like index cards, and loss of non-verbal communication resulting in confusion and conflicts over such things as who "has the keyboard".[21]
Tool support is provided either:
Whole-screen sharing software, such as VNC/RealVNC[22][23][24] or Skype
Terminal multiplexors, such as tmux a or screen -x
Specialized distributed editor tools (such as Gobby, Saros, XPairtise or Visual Studio Anywhere).
...
.END
1 comment:
Post a Comment