The Real Benefit of Pair Programming
As Obie points out, an additional benefit of pairing, although not often mentioned, is the fact that if forces developers to actually do some work! In the age of continuous distraction, how many hours do you spend actually writing code vs. gawking at YouTube etc.
“Most developers that I’ve met (except at TW) hate pair programming and I chalk it up to human nature. Truth is, pair programming is one of the only effective ways that a lot of us have ever witnessed keeping average developers from pissing away 95% of their productivity engaging in non-work such as reading and writing blogs, instant messaging, personal email, shopping online and otherwise wasting time on bullshit. When you’re pairing, you simply HAVE to work all day. Yes, it’s exhausting, but incredibly effective. As my friend and former boss just mentioned to me a sec ago…”
I have a feeling that, in light of this insight, most arguments around pairing being wasteful of resources fall flat.
Quote of the day (from Oracle’s Ask Tom)
“When someone tells me “X is better than Y”, I say “show me, tell me why, show me why, teach me how to measure that what you say is likely true”
Amen.
As an aside, I found this while trying to figure out which was better out of joins vs. subqueries. Here’s why:
“they (joins/subqueries) are semantically different.
Use a subquery when you need no columns from the tables referenced in the subquery. Use a join when you do need some of the columns.
select * from emp where deptno in ( select deptno from dept );would be “better” than:
select emp.* from emp, dept where emp.deptno = dept.deptno;And remember, a subquery cannot simply be replaced by a join (and vice versa), since they often result in DIFFERENT ANSWERS.
The optimizer knows what to do - use the proper construct based on the question being asked. subqueries and joins are NOT interchangeable in general.”


