My initial thoughts on pair programming (definition).
Normally at our shop, we don’t do pair programming. Each developer is assigned his or her own tasks and they are responsible for completing them. If they require assistance of explanation from another developer who is more familiar with that system they need to go and request that assistance on their own. I believe the vast majority of offices work in this manner.
However, yesterday we decided to try pair programming. We have a complicated CRM application where it takes months to learn the application, and the situation is that another fellow who works on the reporting side of things and I worked together to solve a few bugs in the system.
As we worked together (with a slightly decreased speed than the two of us seperately working) we managed to eliminate two instances of duplicate SQL code in our application and instead used a view that already existed which I was not aware of. As well, I am very confident you that this resulted in a much higher quality of the application, even if it took longer. You are far less likely to end up with bugs when you use pair programming.
I am still skeptical if it really was slower or not, because when you work on your own, you can get stuck on a particular problem and waste half a day, whereas when the other person knows it, you can immediately solve the problem and move on. As well, you are less likely to waste time checking the news, weather, etc, because the other person is sitting and working with you. Also, keep in mind that "task switching is expensive". When you are working on a piece of code and you are "in the zone" and then you have to stop to assist someone else, this lowers your productivity, whereas when both of you are concentrating on one issue, you don’t have this issue.
Pair programming can also be used to train or "rough in" new employees, and as well it results in increased code awareness (i.e. both of you are trained on the same piece of code, incase one of you quits or is sick, the other person also has a good idea of the code).
While the jury might still be out on this principle, and maybe its still too "extreme" for most managers to allow it, give it a shot when you have a chance and see how it goes.


