Pair Programming session
Today I had a really enjoyable pair programming session with my college Øyvind. It was quite some time ago since our last session, which was when we were both working at a customer together.
We were there for a few months and during this time we experimented with different ways of pair programming. It was also the first time we where pairing together, and all do it went very well, and we both learned a lot from (and about) each others, by the different ways of working and thinking, it felt unnatural to me. Or perhaps I should say, not completely right.
It was too much guided by rules, we for example tried ping pong; which means that you change from being a driver to a navigator between each and every test. But we tried other approaches as well to determine when to switch between roles.
But today was different, completely different I have to say. Today we were not driver or navigator, today we were both at the same time and constantly. Sure only one of us had the keyboard at the same time, but the switching was so rapidly and irregular that there was no real pattern to discover (not that I was looking for one). One only had to give a slight hint that he wanted to try something and the switch was made, and the same applied to passing back the keyboard.
If I had to compare it to something else I would say that it felt like we where both standing in front of a whiteboard heavily discussing the design and what the next steps to take would be. Both equally involved and drawing together to make the picture complete.
Needless to say that I felt very energized during the session and drained from energy afterwards, in short this is for me what pair programming is about.
I also recommend you to read this great explanation on how pair programming really works (PDF).






We usually set up two monitors, two usb keyboards and two usb mice on one PC and do what you said: rapid switch pairing in a soort of ping-pong format, but not ritualistically. We use ping pong to keep track of who is currently responsible for the test going green, but both people are typing at the keyboard, one switching with the next every few seconds or minutes. The feedback cycle is great and we get a lot done fast and done right
I agree, a really fun session
I do think ping pong is a great way to get started pairing and get a “rhytm” going though. When you are comfortable with this mode of working I think pairing sessions like this come more naturally.
My colleague and I are sitting in the same room and we use VNC to look at each others computer. I really enjoy that, sitting on my own computer and helping each other is great. Although I can’t really talk about pair programming…
Its amazing how effective pair programming can be. It is really good to expand your horizons a bit, and great for training. I wrote about the benefits here: http://simpleprogrammer.com/2009/12/11/pair-programming-why/
Thanks for the PDF that is a good read. I think what you describe and neither being navigator or driver is the best way to go, but it usually takes two the the same level of development skill.
@Chad Myers
Absolutely agree, it is a great way of programming. But why is one responsible for making the test green, why not both? The same for writing the tests.
How are your two monitors setup? Are they both showing the same content or use one main and a secondary monitor (this is what we have).
@Øyvind Fanebust
Yeah but I still felt that we pushed the strict rules for much too long.
@David Perfors
I think that especially the part that you are missing is the very direct communication and body language, is one of the things that make pair programming so valuable. Are you working remotely?
@John Sonmez
Øyvind an I had been pair programming for about 7 months as well together with other members of the team at the client, and I had been doing it before that as well, but this time was for sure the most effective and pleasurable time. I am going to write a follow-up post on this as well.
When one had the keyboard, the second could have had the mouse. That would be really extreme
There are around 70 unedited videos of pair programming at pairwith.us. One of the nice things is that the code being built is real code, rather than a worked example.
@Mark Nijhof
That we use VNC is just for convenience, so that we don’t have to move to each others side of the room, and besides that our desks have different heights which make working on the same desk uncomfortable.
No we are sitting in the same room and looking at each other
The reason why I don’t call it pair programming is because we are not really switching constantly. It is just when one of us has a problem we look at each others computer and communicate, some times this results in coding (mostly from my side I guess…) but most of the times it is not.
Basically this is (I think) because my colleague is taking over the project and I have to explain a lot of the code (shame on the people who started the project (and on me) they/we didn’t do much testing..)
Hi Mark,
Good post.
While pair programming can work I have seen cases where it doesn’t work. Read my post Pair Programming Is Not a Silver Bullet http://www.arrangeactassert.com/pair-programming-is-not-a-silver-bullet/
Cheers,
Jag