Far Beyond Programming — Braindumps by Eric Teubert

Pair Programming. The Holy Grail for Software Development?

17 July 2010

We’ve all heard about pair programming. It’s some development methodology where two programmers have to share a single keyboard and are sitting in front of the same screen. Tell the theory to anyone who hasn’t heard about it and you’ll encounter raised eyebrows. Two programmers sharing one keyboard? What a waste of resources! But is it really?

Knowing vs. Doing

There are books and reports on pair programming claiming it’s great. You can read them and believe what they say in them but you can’t possibly know if it actually works as described. The most important effects are of subconscious nature. When you look for bullet-point-lists of positive effects of pair programming you’ll find easy to grasp, manager-friendly aspects.

Blah blah blah. Don’t get me wrong. These statements are correct as far as I’ve experienced it but it’s not the major benefit. And that’s what I’m talking about: you must have done it to really understand the true benefits.

Motivation

A crucial productivity-killer (and even project-killer) is lack of motivation. Lose motivation and you’ve lost the game. Being a programmer is a tough job. You’re sitting in your office, stare at screens full of geeky looking editors and terminal windows trying to get some work done. There’s this nasty bug you’re tracking since yesterday afternoon and you still have no clue. Now imagine a pair programming situation. What’s different? Well, chances are good two people can trace the bug faster than one. More importantly, two people can talk! There’s the saying that you should explain problems to your rubber duck so you can understand them yourself properly. That might work but explaining something to a real person is much more effective. This is mainly due to one benefit: your partner can ask questions. Your rubber duck can’t. Solving problems is motivating. Solving problems together is motivating and fun! You smile, you cheer, you enjoy the time being together. Try to make your workplace as comfortable as possible. Having a friend next to you definitely helps. And in case you enjoy junk food - make sure not to run out of your favorite snacks :)

Anywhere, Anytime

So it is the holy grail, right? Yeah. No. Somehow. Somehow not. There are situations where pair programming is the perfect tool and others where it just doesn’t work.

Works best if …

Might not work if …

Conclusion

Pair programming is definitely a mighty tool as far as I’ve experienced it. Nevertheless, it’s no all-problem-solving silver bullet or holy grail. It’s perfect in certain situations but it’s easy to imagine projects, teams and tasks where it just wouldn’t work. What are your pair programming experiences? Thank you for reading!

Fork me on GitHub