喝什么养肝护肝| 眼角有眼屎是什么原因| 手腕疼痛挂什么科| 翡翠和和田玉有什么区别| 薛定谔的猫比喻什么| 忘不了鱼在中国叫什么| 包皮溃烂是什么原因| 舌头发麻是什么情况| 肿瘤介入治疗是什么意思| 性激素检查是查什么| 黄疸是什么病| 痛风可以吃什么水果| 人经常放屁是什么原因| 没有润滑剂可以用什么代替| ca125是什么检查项目| 女性尿道炎吃什么药| 突然间头晕是什么原因| ccd是什么意思| 肝喜欢什么食物有哪些| 嘴巴边上长痘痘是什么原因| 结婚登记需要什么材料| 局部癌变是什么意思| 异曲同工是什么意思| 什么叫甲状腺弥漫病变| 测尿酸挂什么科| 牛黄解毒片不能和什么药一起吃| 玻尿酸是干什么用的| 女人为什么会患得患失| 目加一笔是什么字| 97年属什么今年多大| 温居是什么意思| 艾滋病通过什么传播| 拉黑粑粑是什么原因啊| 微信为什么发不了视频| 木人石心是什么意思| 八月二号是什么星座| 口腔异味吃什么药| 解脲脲原体阳性是什么| 狗跟什么生肖最配| 胎盘低要注意什么| 阴部瘙痒是什么原因| 一度房室传导阻滞是什么意思| 虾滑可以做什么菜| 胆囊炎是什么| 孕妇拉的屎是黑色的是因为什么| 四叶草的寓意是什么| 天麻有什么作用| 锁骨疼是什么原因| 睡美人最怕什么| 20是什么意思| 思钱想厚什么意思| 维c吃多了有什么副作用| kps是什么意思| 乙肝两对半阴性是什么意思| 牛的四个胃分别叫什么| 肾阳不足吃什么中成药| 饸饹是什么| 6.20是什么星座| 血红蛋白低是什么原因| mankind是什么意思| 什么是文科什么是理科| 精满自溢是什么意思| 系统性红斑狼疮是什么病| 尿路感染吃什么药比较好的快| 榴莲有什么营养| 尿分叉吃什么药好得快| 女性肾功能不好有什么症状| 勿忘心安是什么意思| 胃子老是胀气是什么原因| 什么歌最好听| 桃子是什么季节的水果| 什么是脉冲| 春宵一刻值千金什么意思| 病危通知书意味着什么| 为什么不能抖腿| 为什么脸上长痣越来越多| 阴虚和阳虚有什么区别的症状| 偏头痛什么原因引起的| 看嗓子去医院挂什么科| 休闲裤配什么鞋子好看| 令坦是对方什么人的尊称| 胃溃疡有什么症状| 手术后拆线挂什么科| 血红蛋白是指什么| 胃胀气吃什么食物好| 什么人没有国籍| 尿路感染吃什么药好得快| 安是什么生肖| 空调买什么品牌的好| 感冒了喝什么汤好| 精分是什么| 镜框什么材质好| 拔牙后能吃什么| 什么杯子喝水最健康| 怨天尤人是什么意思| 朗姆酒是什么酒| 印度以什么人种为主| 化脓性扁桃体炎吃什么药| 生化妊娠是什么原因导致的| magnesium是什么意思| 生物公司是做什么的| exp是什么日期| 治前列腺炎吃什么药效果最好| 黑话是什么意思| 头发的主要成分是什么| 腿抽筋吃什么| 胃酸过多吃什么食物好| 骨穿是检查什么病| 做梦掉牙齿是什么意思周公解梦| 头晕是什么原因引起| 用什么水和面烙饼最软| 什么时候血压最高| 腿痒是什么原因| 身上长红疙瘩很痒是什么原因| 产前诊断是检查什么| 加拿大签证需要什么材料| 凤仙花长什么样| 吃什么能长高| 吃相难看是什么意思| 粉底和气垫的区别是什么| 什么是射频治疗| 什么泡酒让性功能最强| 米色配什么颜色好看| 为什么小鸟站在电线上不会触电| 弱的部首是什么| 双11是什么节日| 羊跟什么生肖最配| 西米露是什么材料做的| cartier什么牌子| 小鱼缸适合养什么鱼| 孩子腿疼是什么原因| 人突然晕倒是什么原因引起的| 玄关画挂什么图最好| 樱桃和车厘子有什么区别| 盆腔少量积液是什么意思| 红色属于五行属什么| 火拼是什么意思| 74年属什么生肖| 什么的西瓜| 左边偏头痛什么原因| 煮肉放什么调料| 什么植物和动物很像鸡| 细菌性痢疾症状是什么| 烟酸是什么| 失眠用什么药最好| 什么的鸽子| hill什么意思| 胸口闷闷的有点疼是什么原因| 手腕三条纹代表什么| 粒细胞偏高是什么意思| 仪字五行属什么| 维生素c不能和什么一起吃| 七岁属什么生肖| 96199是什么电话| 什么的大树| 什么狗不会咬人| 圣诞节送孩子什么礼物好| 小肚右边疼是什么原因| 白玫瑰的花语是什么| 一什么而什么的成语| 为什么小腿肌肉酸痛| 没谁了是什么意思| 上海为什么叫魔都| 耳语是什么意思| 什么品牌的笔记本好| 随意是什么意思| 膝盖疼看什么科| 脂肪肝用什么药物治疗| 生扶什么意思| b型血为什么招蚊子| 兰州市区有什么好玩的地方| 纳闷是什么意思| 喝什么水最解渴| o型血不能和什么血型的人生孩子| 吃什么维生素对眼睛好| kappa是什么牌子| c5是什么意思| 梦见大房子是什么预兆| 逍遥丸有什么作用| 吃什么水果减肥最快| 贪心不足蛇吞象什么意思| 未来是什么意思| 加拿大现在是什么时间| 风是什么| leep是什么手术| 吃止痛药有什么副作用| 入伏吃羊肉有什么好处| 快车和专车有什么区别| 过期啤酒有什么用途| 害喜是什么意思| 脑供血不足什么原因引起的| 干红是什么意思| 减肥吃什么药| 安络血又叫什么名| 什么情况下才做冠脉cta| 山楂泡水喝有什么功效| 总胆固醇偏低是什么意思| 9.3是什么日子| 排湿气最快的方法吃什么| 停诊是什么意思| 喉咙发痒咳嗽吃什么药| 脱口秀是什么意思| a是什么单位| 不景气是什么意思| 启攒是什么意思| 9点到11点是什么经络| 耳朵痒是什么原因| 肾出血是什么原因引起的| 痔疮吃什么药效果好| 脖子淋巴结挂什么科| 什么是阳萎| 小螃蟹吃什么| 伤食是什么意思| 三句半是什么意思| 为什么白带是黄绿色的| 雀舌属于什么茶| 气血不足吃什么东西| 什么样的男人值得托付终身| 黑茶有什么功效| 用纸可以折什么| 秋字五行属什么| 眼底充血用什么眼药水| 单核细胞比率偏高是什么意思| 马齿苋别名叫什么| cas号是什么意思| 活动性胃炎是什么意思| 钻石是什么材质| 兔子肉不能和什么一起吃| 补肾虚吃什么药最好| 甘薯是什么东西| jc是什么牌子| 乳头痒用什么药| 骞是什么意思| 阿尼是什么意思| 唐僧的袈裟叫什么| 省长是什么级别干部| 什么样的女人性欲强| 外阴白斑擦什么药| 04年属什么| 皮肤黑适合穿什么颜色的衣服| 捞女什么意思| 突然头疼是什么原因| 阴蒂痛是什么原因| 什么的水洼| 看耳朵挂什么科| 荷兰的国花是什么花| 称心如意是什么意思| 泌尿感染是什么原因引起的| 手信是什么| ab型血可以输什么血| 什么是免疫组化检查| 第一次世界大战是什么时候| 经常嗓子哑是什么原因| 7月中旬是什么时候| 什么火热| 天天想睡觉没精神是什么原因| 房东是什么意思| 什么是纳米| 中暑喝什么| 尿是红色的是什么原因| 盐酸舍曲林片治疗什么程度的抑郁| 靶子是什么意思| 元宵节送什么| 付梓什么意思| 百度Jump to content

新闻发布:通报九起“软环境”违法违纪案件

From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Pair programming
百度   本书是集体智慧的结晶。

Pair programming is a software development technique in which two programmers work together at one workstation. One, the driver, writes code while the other, the observer 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 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-hours required to deliver code compared to programmers working individually.[2] However, the resulting code has fewer defects.[3] Along with code development time, other factors like field support costs and quality assurance also figure into the return on investment. Pair programming might theoretically offset these expenses by reducing defects in the programs.[3]

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 or sharing breaks to return phone calls (but returning to work quickly since someone is waiting). One member of the team might have more focus and help drive or awaken the other if they lose focus, and that role might periodically change. One member might know about a topic or technique that the other does not, which might eliminate delays to finding or testing a solution, or allow for a better solution, thus effectively expanding the skill set, knowledge, and experience of a programmer as compared to working alone. Each of these intangible benefits, and many more, may be challenging to accurately measure but can contribute to more efficient working hours.[citation needed]

Design quality

A system with two programmers possesses greater potential for the generation of more diverse solutions to problems for three reasons:

  1. the programmers bring different prior experiences to the task;
  2. they may assess information relevant to the task in different ways;
  3. they stand in different relationships to the problem by their functional roles.

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.[4]

Satisfaction

In an online survey of pair programmers from 2000, 96% of programmers stated that they enjoyed working more while pair programming than programming alone. Furthermore, 95% said that they were more confident in their work when they pair programmed. However, as the survey was among self-selected pair programmers, it did not account for programmers who were forced to pair program.[5]

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,[5] and many learn whether it be from tips on programming language rules to overall design skills.[6] In "promiscuous pairing", each programmer communicates and works with all the other programmers on the team rather than pairing only with one partner, which causes knowledge of the system to spread throughout the whole team.[3] Pair programming allows programmers to examine their partner's code and provide feedback, which is necessary to increase their own ability to develop monitoring mechanisms for their own learning activities.[6]

Team-building and communication

Two co-workers pair programming, 2007

Pair programming allows team members to share quickly, making them less likely to have agendas hidden from each other. This helps pair programmers learn to communicate more easily. "This raises the communication bandwidth and frequency within the project, increasing overall information flow within the team."[3]

Studies

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." It concluded that "pair programming is not uniformly beneficial or effective."[7]

Although pair programmers may complete a task faster than a solo programmer, the total number of man-hours increases.[2] A manager would have 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 by project and 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, and for novices as compared to experts.[2] Pair programming could be helpful for attaining high quality and correctness on complex programming tasks, but it would also increase the development effort (cost) significantly.[7]

On simple tasks, which the pair already fully understands, pairing results in a net drop in productivity.[2][8] It may reduce the code development time but also risks reducing the quality of the program.[7] Productivity can also drop when novice–novice pairing is used without sufficient availability of a mentor to coach them.[9]

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.[10]

Indicators of non-performance

There are indicators that a pair is not performing well:[opinion]

  • 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.

Pairing variations

Expert–expert
Expert–expert pairing may seem to be the obvious choice for the highest productivity and can produce great results, but it often yields little insight into new ways to solve problems, as both parties are unlikely to question established practices.[2]
Expert–novice
Expert–novice pairing creates many opportunities for the expert to mentor the novice. This pairing can also introduce new ideas, as the novice is more likely to question established practices. The expert, now required to explain established practices, is also more likely to question them. However, in this pairing, an intimidated novice may passively "watch the master" and hesitate to participate meaningfully. Also, some experts may not have the patience needed to allow constructive novice participation.[11]
Novice–novice
Novice–novice pairing can produce results significantly better than two novices working independently, although this practice is generally discouraged because it is harder for novices to develop good habits without a proper role model.[3]

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,[12] 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 verbal communication resulting in confusion and conflicts over such things as who "has the keyboard".[13]

Tool support could be provided by:

  • Whole-screen sharing software[14][15][self-published source?]
  • Terminal multiplexers
  • Specialized distributed editing tools
  • Audio chat programs or VoIP software could be helpful when the screen sharing software does not provide two-way audio capability. Use of headsets keep the programmers' hands free
  • Cloud development environments
  • Collaborative pair programming services

See also

References

  1. ^ Williams, Laurie (February 19–20, 2001). Integrating pair programming into a software development process. 14th Conference on Software Engineering Education and Training. Charlotte. pp. 27–36. doi:10.1109/CSEE.2001.913816. ISBN 0-7695-1059-0. One of the programmers, the driver, has control of the keyboard/mouse and actively implements the program. The other programmer, the observer, continuously observes the work of the driver to identify tactical (syntactic, spelling, etc.) defects, and also thinks strategically about the direction of the work.
  2. ^ a b c d e Lui, Kim Man (September 2006). "Pair programming productivity: Novice–novice vs. expert–expert" (PDF). International Journal of Human–Computer Studies. 64 (9): 915–925. CiteSeerX 10.1.1.364.2159. doi:10.1016/j.ijhcs.2006.04.010. Archived from the original (PDF) on 2025-08-14. Retrieved 2025-08-14.
  3. ^ a b c d e Cockburn, Alistair; Williams, Laurie (2000). "The Costs and Benefits of Pair Programming" (PDF). Proceedings of the First International Conference on Extreme Programming and Flexible Processes in Software Engineering (XP2000). Archived from the original (PDF) on 2025-08-14. Retrieved 2025-08-14.
  4. ^ Flor, Nick V.; Hutchins, Edwin L. (1991). "Analyzing Distributed Cognition in Software Teams: A Case Study of Team Programming During Perfective Software Maintenance". In Koenemann-Belliveau, Jürgen; Moher, Thomas G.; Robertson, Scott P. (eds.). Empirical Studies of Programmers: Fourth Workshop. Ablex. pp. 36–64. ISBN 978-0-89391-856-9.
  5. ^ a b Williams, Laurie; Kessler, Robert R.; Cunningham, Ward; Jeffries, Ron (2000). "Strengthening the case for pair programming" (PDF). IEEE Software. 17 (4): 19–25. CiteSeerX 10.1.1.33.5248. doi:10.1109/52.854064.
  6. ^ a b Williams, Laurie; Upchurch, Richard L. (2001). "In support of student pair programming". ACM SIGCSE Bulletin. 33 (1): 327–31. doi:10.1145/366413.364614.
  7. ^ a b c Hannay, Jo E.; Tore Dyb?; Erik Arisholm; Dag I.K. Sj?berg (July 2009). "The Effectiveness of Pair Programming: A Meta-Analysis". Information and Software Technology. 51 (7): 1110–1122. doi:10.1016/j.infsof.2009.02.001.
  8. ^ Arisholm, Erik; Hans Gallis; Tore Dyb?; Dag I.K. Sj?berg (February 2007). "Evaluating Pair Programming with Respect to System Complexity and Programmer Expertise". IEEE Transactions on Software Engineering. 33 (2): 65–86. doi:10.1109/TSE.2007.17. S2CID 9889035. Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  9. ^ Stephens, Matt; Doug Rosenberg. "Will Pair Programming Really Improve Your Project?". Retrieved 28 May 2011.
  10. ^ Sarkar, Advait; Gordon, Andrew D.; Negreanu, Carina; Poelitz, Christian; Ragavan, Sruti S.; Zorn, Ben (2022). "What is it like to program with artificial intelligence?". Psychology of Programming Interest Group. Retrieved 27 March 2023.
  11. ^ Williams, L. & Kessler, R. (2003). Pair Programming Illuminated. Boston: Addison-Wesley Professional. ISBN 9780201745764.
  12. ^ Flor, Nick V. (2006). "Globally distributed software development and pair programming". Communications of the ACM. 49 (10): 57–8. doi:10.1145/1164394.1164421. S2CID 8963421.
  13. ^ Schümmer, Till; Stephan Lukosch (September 2009). "Understanding Tools and Practices for Distributed Pair Programming" (PDF). Journal of Universal Computer Science. 15 (16): 3101–3125. Retrieved 2025-08-14.
  14. ^ Agile Ajax: Pair Programming with VNC Archived 2025-08-14 at the Wayback Machine[self-published source]
  15. ^ Pair Programming – The Ultimate Setup and the other options we tried. – Jonathan Cogley's Blog
清明节在什么时候 溶血是什么意思 全身瘙痒是什么原因 董承和董卓什么关系 芝麻分是什么意思
米娜桑是什么意思 大姨妈血块多是什么原因 天秤男喜欢什么样的女生 懂事是什么意思 蜻蜓点水是什么行为
荪是什么意思 白手起家是什么生肖 为什么会有痰 吃什么补血 什么情况下需要割包皮
什么地说话 黄泉路什么意思 市政协秘书长是什么级别 丛林法则是什么意思 梦见仙鹤是什么意思
前列腺炎不治疗有什么后果hcv8jop8ns5r.cn 交警罚款不交有什么后果bfb118.com 青蛙吃什么食物hcv9jop0ns8r.cn 口干口苦吃什么药aiwuzhiyu.com 梦见老公出轨了是什么征兆hcv8jop9ns0r.cn
梦见房子倒塌是什么意思1949doufunao.com 福尔马林是什么味道hcv8jop7ns7r.cn 什么是鸡胸病症状图片hcv8jop3ns6r.cn 吃什么能增强性功能hcv8jop2ns6r.cn 中国最好的大学是什么大学hcv9jop2ns6r.cn
crocs什么意思sanhestory.com 前列腺是什么病hcv8jop3ns5r.cn 慢性非萎缩性胃炎吃什么药效果好hcv8jop6ns2r.cn 6月18日是什么节日hcv7jop7ns2r.cn 人吸了甲醛有什么症状hcv9jop2ns4r.cn
寂寞是什么意思hcv8jop6ns2r.cn 什么是火象星座hcv7jop5ns3r.cn 牙疼吃什么水果好hcv8jop3ns9r.cn 品牌背书是什么意思hcv9jop0ns9r.cn 慧眼识珠是什么意思hcv8jop2ns6r.cn
百度