Sunday, June 15, 2008

Pair Programming - I Drive, You Show the Way

Ever gone on a road trip - alone? Not much fun is it? With a Big Mac in your mouth, you've got to have one eye on the road, one hand on the steering wheel, the other eye on a map, and the other hand clutching it. Now that's a feat even unicycle riding, ball juggling circus clowns find hard to do.

It's the same thing with programming - on the one hand you've got to make sure you're codes are syntactically correct (never mind politically), and on the other, you've got to think about software and database design, security, speed, scalability and a whole bunch of other issues. Now i know most of you out there can do this better than a circus clown, but the fact remains - wouldn't it be better if there where a 'co-driver' so to speak?

Here's where pair programming really shines. I used to think pair programming was just a bunch of 'poppycock' - two people sitting working on a single computer one the same set of codes - whatever for? So they both can slap the sense out of each other if one decides to snooze?

It turns out that, when explained the 'co-driver' way, it makes a lot of sense. When I do programming, and I reach a design decision point, I tend to stare off into space for a good few minutes while the cogs in my brain turn (rather slowly, I might add). It's kinda like stopping at the side of the road to refer to your map to decide which way to go (if you're alone of course). Having someone else figuring out the way, just makes more sense.

Ok, enuff explaining - I'm preparing training slides for this to start pair programming in my team - slides for this next post!

No comments: