结对编程 

结对编程

结对编程(英語:Pair programming)是一种敏捷软件开发的方法,两个程序员在一个计算机上共同工作。一个人输入代码,而另一个人审查他输入的每一行代码。输入代码的人称作驾驶员,审查代码的人称作观察员(或导航员[1]。两个程序员经常互换角色。

在结对编程中,观察员同时考虑工作的战略性方向,提出改进的意见,或将来可能出现的问题以便处理。这样使得驾驶者可以集中全部注意力在完成当前任务的“战术”方面。观察员当作安全网和指南。结对编程对开发程序有很多好处。比如增加纪律性,写出更好的代码等。

结对编程是極限編程的组成部分。

  1. ^ Williams, Laurie. Integrating Pair Programming into a Software Development Process (PDF). 14th Conference on Software Engineering Education and Training. 2001: abstract [2020-09-16]. (原始内容存档 (PDF)于2011-12-29). "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."



取材自維基百科 - 中文時事百科