极限编程中,有一项实践是pair programming, 是说两个dev在一起programming,用一台机器,两个显示器,两套键盘鼠标。在agile中,人们对TDD 和 CI的质疑比较少,基本上还是赞同的。
但是对于pair programming, 却存在很多的质疑,到底pair programming是不是一个好的practice?pair programming到底有什么优势?有什么弊端?什么时候pair是适当的,什么时候又是不合适pair的。
agile推崇pair,据我所知,主要是因为pair可以share knowledge,可以帮助一个新进入项目的人或者一个缺乏某一方面知识的人很快的进入状态, 可以防止由于人员变动导致某一功能模块无人熟悉的情况。而且pair可以提高代码的质量,两个人总是比一个人的思路要广泛,发现问题的可能性也大得多。
但是pair programming 也有其无法避免的弊端。
pair programming 一般要求两个人中至少有一个具有pair经验, 要知道,一个人coding的时候可以只顾自己的思路,两个人的话,你不但要有自己的思路,还要思考别人的思路,这需要极大的耐心去兼顾别人的想法。
举一个简单的例子,当两个人fix bug的时候, 两个人很可能有不同的思路来探索bug产生的原因,而且这时候很难说谁对谁错,如果两个人都以自己为中心,尝试自己的想法,那就会发生抢鼠标的情况,这是最不愉快的。
和fix bug很相似,当做某些research的工作的时候,很可能N个思路都可以达到目标,而且讨论谁的思路正确也会无果而终。这时候就不适合pair programming。
现在回顾一下最好的pair 方式是什么呢? 一个人写测试,一个人写实现。不会有什么冲突,为了实现一个目标各有分工。另外就是对系统做较大的改动的时候需要share这个改动的信息,这时候可以pair。 但是只要是做类似research的工作的时候,就不适合pair,这时就需要独立思考。
做了pair不到1年,我感觉只要是research的工作,而且2个人都有不同的想法,这时候就可以不pair。
如果是做新的story,对系统有较大的改动,就需要pair。
pair之所以很难推广,是因为在开发的过程中,大部分的时间都是做research, 因为在动手之前,首先要知道相关的功能是如何运作的,所以就会反复的看代码。
另外,从绩效考核的方面说,如果到了一段时间就要考核dev的performance,而且考核结果和奖金挂钩,那就热闹了, pair的两个人肯定会抢着做story, 谁都不想让出主力的位置,要知道,一旦让出主力位置,你就有可能被拉开差距,对系统的熟悉程度也会降低。那最后你的绩效也会不好。如果两个人抢着干活,就很容易出现rush的情况,做出来的东西有可能是没有经过深思熟虑的。
有的dev能力可能很强,可能说:“我不会跟我的pair抢着coding...”,这可能是因为他的功力比较深,对类似的系统已经很熟悉。但是这样的人又有多少呢? pair要想很好的推广,就要考虑大部分dev的情况。
所以,pair的利弊和实施的时机就是上述我说的。以后要是哪一个人说:“诶? 你们怎么没有pair啊,这样不行啊!”。 那么我会说:“玩儿蛋去, 谁告诉你任何时候都需要pair啦”
分享到:
相关推荐
leetcode高频面试题内部结对编程资源 下面是我可以召集的进行结对编程会议的过程的记录。 :) 结对编程会话前的电子邮件 模板化电子邮件在结对编程会话发生的当天发送(周二/周四@下午 1 点,周日@上午 ...
Joint encoding and node-pair grouping for physical-layer network coding
1.4.4. Outline of optimal algorithms of source coding . . . . . . . . . . . . 18 1.5. Channel coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5.1. Introduction and ...
the Physical Coding Sublayer (PCS), Physical Medium Attachment (PMA), Twisted Pair Physical Medium Dependent Sublayer (TP-PMD), 10Base-TX Encoder/Decoder, and Twisted-Pair Media Access Unit (TPMAU). ...
It implements all 10/100M Ethernet Physical-layer functions including the Physical Coding Sublayer (PCS), Physical Medium Attachment (PMA), Twisted Pair Physical Medium Dependent Sublayer (TP-PMD), ...
检查数组中对的和arr[] = {1, -2, 1, 0, 5}sum = 0Input: 1 -2 1 0 5 0 Output: Array doesnt have two elements with the given sum Explaination:(No valid pair exists.)二叉树中所有节点的总和 15 / \ 6 8 / \ ...
we present a method for combining an asymmetrical phase mask and its conjugation phase mask to produce the point spread function of a wavefront coding imaging system, which has the defocus invariant ...
检查数组中对的总和arr[] = {1, -2, 1, 0, 5}sum = 0Input: 1 -2 1 0 5 0 Output: Array doesnt have two elements with the given sum Explaination:(No valid pair exists.)二叉树中所有节点的总和 15 / \ 6 8 / ...
即时编码问题每日编码问题使用nimlang解决的问题... cons(a,b)构造一个对,car(pair)和cdr(pair)返回该对的第一个和最后一个元素。 XOR链表是内存使用效率更高的双链表。 而不是每个节点都保存next和prev字段
A pair of socks is an object. Luckily, Python understands objects very well. The two main features any object has are properties and methods. Let's take a person object as an example. Typically in ...
The book concludes with a pair of fully worked sample applications for you to follow through, because nothing reinforces your understanding of how concepts fit together as much as looking at finished...
The book concludes with a pair of fully worked sample applications for you to follow through, because nothing reinforces your understanding of how concepts fit together as much as looking at finished...
fn main () { // generate a fresh keypair and extract encryption and decryption keys let (ek, dk) = Paillier :: keypair (). keys (); // select integral coding let code = integral :: Code ::
Programming iOS 11 is actually the second of a pair with my other book, iOS 11 Pro‐ gramming Fundamentals with Swi ; it picks up exactly where the other book leaves off. They complement and ...
Making Software - What Really Works, and Why We ... What about pair programming, or code reviews? Is it possible to predict the likely number of bugs in a piece of code before it’s released? If so, how?
Reason for this is the design of the algorithm, not a bad coding style. Examples: Memory usage for factoring a given N (using the MPQS Algorithm) with size... 256 Bits : ~89 MB, 280 Bits : ~140 MB...
Coding Standards 133 Iteration Demo 138 Reporting 144 7. Releasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 “Done Done” 156...
实现的算法: 线性时间选择:排序: 数据结构: 组织cpp内置数据结构用法: 矢量,堆栈,队列,双端队列,priority_queue,map,unordered_map,pair,tuple,string,set 实施方式: 使向量的push_back()函数为O...
To simplify coding, PAQ6 uses a binary string alphabet. Thus, the output of a model is an estimate of P(y_i = 1 | context) (henceforth p), where y_i is the i'th bit, and the context is the previous i ...