High costs and negative value of pair programming
namcookanalytics.com
namcookanalytics.com
I want to mention the opening line in the introduction: "The pair programming method could only exist in an industry that does not measure well and does not understand economics." This argument is speculative and unpersuasive.
Speaking of measurement, I take issue with this paper because it suggests that lines of code (LOC) is a good metric. The author demonstrates a lack of economic savvy by writing, "As can be seen from table 1 the economics of pair programming are severely negative." That table uses lines of code (LOC) as the key metric. There are so many problems with the choice of such a wrongheaded metric. First, writing better software often involves writing less code! Second, as a commenter points out, knowledge transfer is very important. Third, pair programming may build team cohesion.
Many industries use variations of pair programming, as the author recognizes. That said, I think the author fumbles in suggesting that quarterbacks trading time is similar to pairing. I wonder why the author didn't look at apprenticeships in manufacturing, where skills are demonstrated in a hands-on way.
Finally, as a model-builder myself, it pains me to see weak, flawed models baked into papers such as this. Take this section of text: "Table 1 is extracted from a pair-programming calculator developed by the author. It allows researchers to input a number of variables including staff compensation, application size in lines of code, and coding speeds for both pairs and individual programmers."
Such language, to me, makes it appear that the author is trying to make his claims seem "mechanical" -- just the matter of turning a crank and running some calculations. Such a claim is silly and a sham, of course. The choice of what to measure and how to weigh it is central. This paper makes no serious attempt to promote such a discussion.
In summary, this paper did not make a serious attempt to understand the true (economic, yes!) value of pair programming, in my opinion. If I were to guess, the author may well have had his conclusion in mind before writing the paper or doing his research.
I think the coding environment being analyzed is already well-defined and the projects being coded are one-offs being sold to clients where maintenance is done through a lucrative support contract. In this setting, a "defect" would be anything keeping the product from shipping. Anything else is overlooked and untracked.
It's the software equivalent of shoveling whatever crap you can find into a sausage casing, pricing it like fine steak, then selling your own medicine when it makes them sick.
That said, most of the time developers with roughly equal skill levels end up writing new code to implement new features. And LoC is about the best metric you can use. If you factor in expert developers writing fewer LoC to achieve the same goals, then the results of the paper are magnified, because if an expert's 1000 LoC is good for 2x the number of features as an average developer's 1000 LoC, but the number of bugs is comparable, then it's an even greater advantage to use the expert.
>No space given to future maintainability or bugs, only on raw productivity.
They do talk about bugs; they say in the summary:
"There are no significant quality benefits compared to a single programmer who uses static analysis and inspections."
And later on in the paper they compare delivered defects.
I'm easily in the "expert" end of the spectrum as a programmer; I've never seen a benefit in pair programming that would justify two salaries. I'm sorry, and I'm sure I'll be slammed for this, but pair programming is a crutch to boost programmer productivity of average or below average developers. "Average" developers would have to make 1/3 or less of my salary to make it worthwhile, economically.
In my opinion pair programming's only valid use is in training a junior developer (or allowing two junior developers to support each other, though in the paper the bugs delivered were far worse from two junior developers than from a single expert developer -- but you can't always hire an expert developer).
Otherwise it's a waste of money. If you can pull it off as a developer in some big company that has lots of money, by all means, have a blast. I thought HN was more about bootstrapping and getting code working as quickly as possible, and pair programming is not the way to accomplish that.
[1] http://mail.linux.ie/pipermail/social/1999-October/000483.ht...
For me, a few hours of pairing a day has a lot of value. If I could, I would do that regularly. When I use it to focus on hard problems, it can improve my thinking, it improves knowledge transfer, and it builds team relationships.
Really, the biggest problem is the presentation. The whole thing reads like a back of the envelope calculation turned blog post dressed up to look like an industry white paper. If this were just a blog post with a few more caveats thrown in, it wouldn't be nearly so bad.
How would you account for LoC nuances, exactly?
As I pointed out, the better the developer, the fewer LoC produced per "feature point" or however you want to measure it. So any analysis that doesn't take into account the nuances would be skewed against the expert developers.
This would mean that, if the study purported to prove that two average programmers were more productive than an expert, I would have to take the conclusion with a grain of salt (or reject the analysis).
But given that despite the disadvantage, experts were still shown to be more cost effective without pair programming? I don't see why we'd need to reject that conclusion.
But there wasn't any useful data because the source, timing, measurement practices, and sample sizes for the grand summary tables were not mentioned at all. It's like reading an article that states very firmly that the moon is made up of precisely 89.24397% green cheese. It sure sounds very specific but where DID that number come from?
I hope the author publishes more details about how these numbers were calculated because we need more data about pairing but I don't really expect that he will.
More heat than light, really.
And then:
It is obvious from table 3 that the best economic results do not come from pair programming but rather from hiring and using expert single programmers.
Well... sure... of course, and good luck with that! Meanwhile, in the real world, while you're waiting for your expert programmers to submit their resumes to your company, pair programming is a great way to bring new/junior devs up to speed. In fact, I think that may be one of its greatest values.
If you have two roughly equally skilled devs, it's possible that you'd be better served by working individually combined with good code reviews, though I don't think the article made much a case for that.
One could claim that the author made up numbers to support the author's argument.
And hasn't pair programming been around at least since the 90's? doesn't seem that new to me.
"Functional Programming" has as well. [2]
And the "Waterfall" development model also has its roots in the 1950s. [3]
"Extreme Programming" (1996, and a book in 1999) [4] was the first popular methodology to advocate "100% pair programming" as a major component. (I've read the book: They say that you have to use all of the practices, all the time, if you want "Extreme Programming" to work.)
Point is that, depending on how old you are, the late '90s can qualify as "recent."
[1] https://en.wikipedia.org/wiki/Object-oriented_programming#Hi...
[2] https://en.wikipedia.org/wiki/Functional_programming#History
[3] https://en.wikipedia.org/wiki/Waterfall_model
[4] https://en.wikipedia.org/wiki/Extreme_Programming#History
I am actually a fan of pair programming, I have seen and experienced it work - in an environment where you are designing and developing new things day in, day out - pair programming or as I like to call it...collective collaboration - is invaluable - it prevents following rabbit holes and single point of failures - and solutions get developed, much, much faster.
Of course for this to work you need a smart team of engineers and scientists who respect each other, who are confident in their ability but also recognize that two heads are better than one.
Anecdote time: I was working on a project where for a while I was the sole scientist/engineer - I spent a fair bit of my time bouncing ideas off a system architect who worked closely with my team. In a few months I was assigned an engineer who's knowledge of hardware absolutely flawed me, together we were able to knock down feature requests so fast it we became quite renowned in our little org...we hardly ever stopped talking during the day (this pissed off a couple of people to no end...but "you can't argue with working code and happy users" as my manager used to say)...I left that job a few months ago to explore the world a bit more but when I left the team was much bigger but the philosophy remained the same - talk, argue, yell, laugh, cover whiteboards and interrupt and genius happens.
YMMV, I've met developers who's ego could not adjust to that model or who "couldn't work in noisy environments" and it wasn't for them..but I always tr to seek out a noisy, dynamic team, because they are usually doing awesome things and having fun :)
(Note: I've never used pair-programming and don't really care one way or the other. But this analysis seems terrible to me.)
[1] The Costs and Benefits of Pair Programming http://collaboration.csc.ncsu.edu/laurie/Papers/XPSardinia.P...
I guess he didn't, and where the data comes from is "a pair-programming calculator developed by the author"—in other words, software he wrote that gives whatever he decided the answers should be, and whose code he isn't (at least in this piece) publishing.
1) For building a complex system in a short time you have to take lot of critical decisions under pressure implication of which will be felt even after the product is shipped. During pair programming your partner can stop you from making many such decision which actually saves LOT of lines of bad code. That is why this study is totally worthless
2) Pair programming is perhaps the best way to give training to someone new to the system. It is much more beneficial than the best of documents. It is like roaming around the city with a experienced guide than reading from a book
3) if you do pair programming with lots of experienced programmer you will actually learn to see things in s different perspective. You will start doing things in a different way.
The cost of these has been completely externalized. Does the 85% reduction in defects come from a casual code review? Or are 3 senior developers doing Fagan inspections?
When an inspection reveals bugs, do we take into account the increased time to fix the bug because developers are informed about them after having forgotten some context?
Is static analysis incompatible with pairing?
Where does the 1.5 vs 1.6 defect rate come from? What about the rest of the numbers?
If a pair produces less LoC than someone soloing, couldn't this actually be a good thing? I know that the most productive coders I work with actually tend to delete more lines of code than they introduce.
When you work yourself on implementing something, how will compare these two:
YOU (60% of your capacity) vs YOU (>90% of your capacity)
My philosophy is that pair programming is just like individual programming but just increase the output efficiency of one of the member in the pair by 30% or so (if the pair is a good pair). Thats it.
An individual programmer at his >90% capacity will outweigh (in terms of output/cost) two programmers at 60% capacity.
So, if you have to pair them to get a single programmer with 90% capacity, do it.
This fails to account for: 1) The cost to train a novice developer & 2) The value if having two people equally acquainted with a code base (thereby reducing dependency on a particular employee)
http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=913816...
Is there an engineering profession where using more raw material to get some function is actually a good thing?
http://namcookanalytics.com/high-costs-and-negative-value-of...