Content deleted Content added
Link suggestions feature: 3 links added. |
|||
(39 intermediate revisions by 29 users not shown) | |||
Line 1:
{{short description|Collaborative technique for software development}}
[[File:Wocintech (microsoft) - 61 (25926639341).jpg|thumb|Pair programming]]
'''Pair programming''' is
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 is intended to free the driver to focus all of their attention on the "tactical" aspects of completing the current task, using the observer as a safety net and guide.
==Economics==
Pair programming increases the [[man
In addition to preventing mistakes as they are made, other intangible benefits may exist. For example, the courtesy of rejecting phone calls or other distractions while working together, taking fewer breaks at agreed-upon intervals
==Design quality==
Line 15:
# the programmers bring different prior experiences to the task;
# they may assess information relevant to the task in different ways;
# they stand in different relationships to the problem by
In an attempt to share goals and plans, the programmers must overtly negotiate a shared course of action when a conflict arises between them. In doing so, they consider a larger number of ways of solving the problem than a single programmer alone might do. This significantly improves the design quality of the program as it reduces the chances of selecting a poor method.<ref>{{cite book |first1=Nick V. |last1=Flor |first2=Edwin L. |last2=Hutchins |chapter=Analyzing Distributed Cognition in Software Teams: A Case Study of Team Programming During Perfective Software Maintenance |pages=36–64 |chapter-url={{Google books|KT_bpSSJBgcC|page=36|plainurl=yes}} |editor1-first=Jürgen |editor1-last=Koenemann-Belliveau |editor2-first=Thomas G. |editor2-last=Moher |editor3-first=Scott P. |editor3-last=Robertson |year=1991 |title=Empirical Studies of Programmers: Fourth Workshop |publisher=Ablex |isbn=978-0-89391-856-9 }}</ref>
==Satisfaction==
In an online survey of pair programmers from 2000, 96% of programmers stated that they enjoyed
==Learning==
Knowledge is constantly shared between pair programmers, whether in the industry or in a classroom. Many sources suggest that students show higher confidence when programming in pairs,<ref name="strengthening"/> and many learn whether it be from tips on [[programming language]] rules to overall design
==Team-building and communication==
Line 32:
There are both empirical studies and meta-analyses 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.
A [[meta-analysis]] found pairs typically consider more design alternatives than programmers working alone, arrive at simpler, more maintainable designs, and catch design defects earlier. However, it raised concerns that its findings may have been influenced by "signs of [[publication bias]] among published studies on pair programming
| last = Hannay
| first = Jo E.
Line 44:
| doi = 10.1016/j.infsof.2009.02.001}}</ref>
Although pair programmers may complete a task faster than a solo programmer, the total number of [[man
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, and for novices as compared to experts.<ref name='ijhcs'>{{cite journal
Line 75:
|date=February 2007
| doi = 10.1109/TSE.2007.17
| s2cid = 9889035
| url = http://simula.no/research/se/publications/Arisholm.2006.2/simula_pdf_file
| access-date = 2008-07-21
Line 80 ⟶ 81:
| archive-date = 2010-10-29
| url-status = dead}}</ref> It may reduce the code development time but also risks reducing the quality of the program.<ref name="hannay-meta"/> Productivity can also drop when novice–novice pairing is used without sufficient availability of a mentor to coach them.<ref>{{cite web|last=Stephens|first=Matt |author2=Doug Rosenberg |title=Will Pair Programming Really Improve Your Project?|url=http://www.methodsandtools.com/archive/archive.php?id=10| access-date = 28 May 2011}}</ref>
A study of programmers using AI assistance tools such as [[GitHub Copilot]] found that while some programmers conceived of AI assistance as similar to pair programming, in practice the use of such tools is very different in terms of the programmer experience, with the human programmer having to transition repeatedly between driver and navigator roles.<ref>{{cite journal |last1=Sarkar |first1=Advait |last2=Gordon |first2=Andrew D. |last3=Negreanu |first3=Carina |last4=Poelitz |first4=Christian |last5=Ragavan |first5=Sruti S. |last6=Zorn |first6=Ben |title=What is it like to program with artificial intelligence? |journal=Psychology of Programming Interest Group |date=2022 |url=https://www.ppig.org/papers/2022-ppig-33rd-sarkar/ |access-date=27 March 2023}}</ref>
==Indicators of non-performance==
There are indicators that a pair is not performing well:
* ''Disengagement'' may present as one of the members physically withdraws away from the keyboard, accesses email, or even falls asleep.
* The ''"Watch the Master"'' phenomenon can arise if one member is more experienced than the other. In this situation, the junior member may take the observer role, deferring to the senior member of the pair for the majority of coding activity. This can easily lead to disengagement.
Line 95 ⟶ 98:
==Remote pair programming==
'''Remote pair programming''', also known as '''virtual pair programming''' or '''distributed pair programming''', is pair programming in which the two programmers are in different locations,<ref>{{cite journal |last1=Flor |first1=Nick V. |title=Globally distributed software development and pair programming |journal=Communications of the ACM |volume=49 |issue=10 |year=2006 |pages=57–8 |doi=10.1145/1164394.1164421 |s2cid=8963421 }}</ref> working via a [[collaborative real-time editor]], shared desktop, or a remote pair programming [[Integrated development environment|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 verbal communication resulting in confusion and conflicts over such things as who "has the keyboard".<ref name='jucs'>{{cite journal
| last = Schümmer
| first = Till
Line 117 ⟶ 120:
==See also==
* [[Extreme programming]]
* [[Joint attention]]
* [[
* [[
==References==
|