Friday, November 2, 2007

Pair Programming, When? Why?

"WHAT?! Two developer in one computer, develop one slice of programming code. It's a lot resource wasting". It probably most common comment from Project Manager all around the world.

Fortunately, Laurie Williams of the University of Utah in Salt Lake City has verified that, "Paired programmers are only 15% slower than two independent individual programmers, but produce 15% fewer bugs (N.B.: The original study showed that 'error-free' code went from 70 % to 85 %; it may be more intuitive to call this a 50 % decrease of errors, from 30 % to 15 %). Since TESTING and DEBUGGING are often many times MORE COSTLY than initial programming, this is an IMPRESSIVE result."

WHY? I bet, you debug more than you program in project. I could finish 1 page of Web Form in 1 hour, but I could debug the page problem up to 3 hours. Even if it is only one really small little problem. So, based on the research, 2 page are finished in 60 minutes and 90 minutes of debugging time with pair programming, instead of 50 minutes of development and 180 minutes of debugging time with individual programming.

WHEN? I bet, if you do Stored Procedure Programming frequently as a Database Administrators, you will have learned much about any issues that put you into trouble in the past. The debugging time is shortened for some kind of development that developer do frequently. So, pair programming is not that effective for monolithic skill set developer. Pair is effective for multiple skill set developer with frequently-technology-changing-work.

It is interesting to find that when project use me, I do the code programming and technology learning at once. I often use this pairing methodology to produce some project code. Since I'm still a CS student, which has low technical knowledge, the learning time is also shortened through pairing.

The pair consists of 1 developer and 1 navigator and the role is rolled frequently. The navigator functions as the programmer's guardian so the program seems to be as bug-free as possible.

The advantage and disadvantage of Pair Programming can be read at here: http://en.wikipedia.org/wiki/Pair_programming

No comments: