Brian Slesinsky's Weblog

Saturday, 15 May 2004

What it's like to join an Extreme Programming team

A couple of months ago, I quit my job at a big software company and started working for a tiny Internet startup. One thing I found attractive about the new job was that we would be doing Extreme Programming, the latest trend in software development. I'd been reading about it for years, but never had a chance to try it until now. Here's what it's been like.

I was skeptical at first that we would really be doing Extreme Programming. My experience in the software industry has been that our earnest resolutions to do things properly get thrown out the window when the going gets tough. I figured we would end up using some Extreme Programming techniques, but with a lot of modifications as we figured out which methods worked for us.

But a few days before I would be starting work, while having lunch with the folks at the new company, I asked whether they would have a desk and computer ready for me. They said I wouldn't need one since we'd be doing pair programming. Four programmers, two computers. Wow. That's serious.

On my first day, I walked in and sat down and we started coding. (We had already taken care of paperwork.) The way we do things is that one person writes a test and the other person implements the production code to make the test pass. Then the person who just wrote the production code writes the next test.

I had never seen the code before and knew nothing about the architecture, so I asked a lot of questions, like, "I don't understand what you're doing," and, "okay, now what do I do?" It felt strange working on some code to render a web page without really understanding what I was doing. But since my partners knew the code, they kept us on track. I was productive (with help) the first day, and fully up to speed soon after.

People who haven't done it tend to have a couple of suspicions about pair programming. First, that being in close proximity with another person all day will get annoying fast, and second, that you're goofing off half the time.

I've found that pair programming is more like having first-class service while you work. With your own personal programming guru, lots of petty frustrations and interruptions just go away so you can get stuff done. Asking the person you're pairing with some trivial question is far more efficient than looking it up in manuals, searching Google, and interrupting coworkers. You don't even need to explain what you've been doing, because they already know. Sometimes your question gets answered without even having to ask it.

(If word gets out about this, everyone will want one!)

And when you're not at the keyboard, you still need to be paying attention, because the other person is asking you questions and expecting you to catch their mistakes. Plus, you'll be in the hot seat in a minute, implementing the code for the test your partner is writing now.

Whatever relevant knowledge one person brings to the project diffuses to everyone else pretty quickly as they pair up with different people. (We switch partners after lunch, so on our four-person team we end up working with every other person about three times a week.) In the first few days I picked up a bunch of IntelliJ shortcuts and showed off a few of my own. I also learned xpath by example, because we use it extensively in web page unit tests.

There have been a few times when both of us were bored and we seemed to be thinking slower than usual, but they tend to be the exception. (Maybe we should have switched partners.)

Days are short but fast-paced compared to what I've considered normal for a programming job - typically I put in seven and a half hours. It's nearly all honest work, not meetings, foosball, Starbucks runs, or surfing the web. I was wiped out after the first day, but quickly got used to the pace.

We did end up getting a third computer that we put in a separate room for folks to check their email when on break. But that's only for personal mail. My average number of work emails a day is zero, and there are days when I don't bother to check. (Why use email when everyone except the CEO is in the same room?) As for not having my own desk and computer, I don't miss it. I was picking up bad work habits at my previous job that I'm happy to leave behind.

(There is more to Extreme Programming than pair programming, but this post is long enough.)