Thursday Jul 01, 2004

Two heads are better than one

On my office wall (yeah, I still have a place I can call "my" office...don't tell Scott) there is a piece of paper with one line of text highlighted. The piece of paper came out of a meeting I had with Stuart Marks. The highlighted sentence is "Increase the ratio of thought to lines of code."

At JavaOne this morning, Tor Norbye and James Gosling demonstrated one of the best (little-known!) ways to do that: Pair Programming. While Tor was writing some code onstage, James was watching over his shoulder, asking questions. And more importantly, he was finding bugs. This caused Tor to comment on how nice it was to have James Gosling helping you code (and to ask whether we could include James along with the product).

But you don't need to pack up James in order to get a similar result. Now, I would never claim that James is replaceable. :-) But where pair programming is concerned, anybody who is proficient enough to understand most of what you are doing will provide useful assistance. And the benefits are considerable. (Here's another study with similar results.)

It's fun, it improves programmer morale, and the increase in quality far outweighs the increase in programmer hours spent per project. So what I don't understand is why we developers aren't clamoring for it to be standard practice everywhere...especially since one study indicated that pairs work best when the two people are of somewhat differing ability. Can you think of a better way to simultaneously get your senior programmers to share their knowledge, and your straight-out-of-college new hires to contribute to your bottom line?

Comments:

Post a Comment:
Comments are closed for this entry.