I am aware of the amusingness of writing an article called 'The Joy of Two' on a blog called 'The Naked Startup', but it's a good title no?
In the past few weeks of building Gameplan I've had a personal epiphany resulting from our work style. One of the key tenets of what Arun & I wanted to do for ourselves was to experiment with new ways of working and a key part of that was pair programming.
We currently use a 'work' Mac with a 20" monitor that isn't personalised to either of us and we use one keyboard, one mouse and two brains.
It's just the best thing we could have done. I realise this sounds like hyperbole but the sheer volume of work that we're getting through seems to bear out the unintuitive notion that having one person 'just sitting there' is faster.
Good Things
You
get stuck less often. Many a time we hit a proper 'how are we going to do this?' roadblock but with both of us trying different approaches we seem to get keep moving through the difficult times. Many a time I'm convinced I'd still have been sat there late into the evening trying to fix problems. Also those annoying typos that cause 'why is it doing that?' moments are stamped out much more quickly.
It seems that programming where there is always 'a solution' rather than 'a single answer' is an ideal fit for continuous collaborative work. There's also an 'opposite' benefit to stop ourselves before we disappear into a problem that doesn't need to be solved right now. It always helps to have another person to say "That'll do for now".
Focus. Every now and then as a solo programmer you get in the zone where four hours disappears and you produce something amazing. Unfortunately this tends to happen at 2AM, and rarely. With no IM, twitter, email and someone else next to you nudging you back into focus all the time you simply destroy your programming todo list.
Our quality is much better. The pairing has also enabled us to better ingrain testing into our work. We write tests first and then get them to pass, leaving us with fully tested code that we're much more comfortable with. The benefit of the pair here is to keep you on the straight and narrow, it's hard to drift off and start hacking when your other-programming-half reminds you the write tests first.
One of the reasons pairing works so well is that you are both constantly learning and teaching at the same time. This is also why it can be quite tiring! The benefits of picking up good habits, and suppressing your own embarrassing ones, as well as being exposed to another brain trying to solve the same problem are huge. We're also constantly having to justify our concepts to each other which helps you to sharpen your thinking before you dive in and start thrashing about in code.
Nothing quite beats the satisfaction of producing excellent quality end product. My theory is all engineers just want to build something and get a nice pat on the head. Even on the hardest days where I feel we've really got stuck and hardly achieved anything, when I look back back at the crossed off features I realise we're still motoring along.
The final obvious benefit is in the understanding of our application. We make more sensible decisions about the architecture, because we're discussing all the time. There are no chunks of code that we do not both have our hands in. It is extremely important (certainly initially) for both of us to know every area of our product intimately. Important for a convincing sales message, important for knowing how it works and important for laying the building blocks for any future work when there might be more than two of us.
--
I should say that we're not pairing all week. We often take some time off on Fridays as 'separate', where tasks less suited to pairing are knocked off the list. We also schedule any external meetings and calls for that day which means that we definitely have four days uninterrupted programming together.
I'm not sure if many other tasks are well suited to this collaborative approach. I still tend to think that visual design tends to work better as a work-then-critique cycle rather than the continuous feedback that pairing provides. But who knows? There's definitely a case for pairing in wire-framing or describing the functionality and flow of an app - in fact we've been doing that as well.
The one time since we've started that I've programmed on my own and had a 'hack' at something, I had the old familiar problems of 'why is it doing that?' and 'this was working a minute ago!' I missed my testing and I missed the constant reminders and thoughts of a partner. (Aren't I sweet?)
I know it seems counter intuitive. I know it's a hard sell to clients and bosses. I know it's tough to find someone who you can spend all that time with. I know you don't want to give up the keyboard, but try it for a week on something *real* and come back and tell me you don't feel a) better and b) more productive.