什么是结对编程
结对编程(Pair programming)来自于极端编程XP(eXtreme Programming),是它的十二个最佳实践之一。顾名思义,结对编程就是两个程序员坐在一起,结对进行代码开发。在极限编程中,所有的软件产品都是由两个程序员并排坐在一起,在同一台机器上共同完成的。
Pair programming is a development technique in which two programmers work together at single workstation. Person who writes code is called a driver and a person who observes and navigates each line of the code is called navigator. They may switch their role frequently. Sometimes pair programming is also known as pairing.
Pairing Variations : There are three pairing variations –
Newbie-newbie pairing can sometimes give a great result. Because it is better than one solo newbie. But generally, this pair is rarely practiced.
Expert–newbie pairing gives significant results. In this pairing, a newbie can learn many things from expert, and expert gets a chance to share his knowledge with newbie.
Expert–expert pairing is a good choice for higher productivity as both of them would be expert, so they can work very efficiently.
结对编程是一种开发技术,其中两个程序员在单个工作站上一起工作。编写代码的人称为驱动程序,观察和导航代码的每一行的人称为导航器。他们可能会经常转换角色。有时结对编程也称为配对。
配对变化 :有三种配对变体 –
新手-新手配对有时可以产生很好的结果。因为它比一个单独的新手要好。但一般来说,这对很少练习。
专家-新手配对会产生显着的结果。在这种配对中,新手可以从专家那里学到很多东西,专家有机会与新手分享他的知识。
专家-专家配对是提高生产力的不错选择,因为他们都是专家,因此他们可以非常高效地工作。