Pair programming is the software development practice wherein two programmers team up to write code together at the same time, on the same machine, and on the same codebase.
My roommate, Boot D (a nickname to protect the innocent), paired with me today, Day 02 of Dev Bootcamp – Fall 2012, in the Year of the Dragon.
Quick drag(gressi)on:
- 2012 is the Year of the Dragon on the Chinese calendar.
- I was born in a previous Year of the Dragon (1976).
- Three weeks ago I got a rather large Asian dragon tattooed on the side of my calf.
- DBC Headquarters is on the edge of Chinatown here in San Francisco, and dragons are revered in Chinese culture.
- Today it was hotter than a herd of dragons roasting weenies at Burning Man.
Anyway, Pair Programming.
In a word: niiiiiiice!
What’s so nice about it? Many, many, things. But I want to focus on only one aspect here today, and that is the optimum combinations of pairing among programmers with distinct , varying levels of experience / proficiency / language-specific familiarity / general programming knowledge. For the sake of simplicity, I’ll lump these aspects all together and call the result “Code-Q”.
In a given programming pair, there are three possibilities. A coder could be paired with someone who currently:
- has a lower Code-Q
- has about the same Code-Q
- or possesses higher Code-Q
The question is then, what are the developmental implications for a given coder for each of the three combinations? in the context of the following objectives:
- developing facility with the syntax of a new programming language (e.g. Ruby)
- deepening and solidifying their current conceptual understanding of the day-to-day use of a programming language
- transcending their current level of proficiency through learning new and possibly more elegant approaches to programming challenges
Granted, this is after just two days of pair programming, but here are some conclusions I’ve made thus far:
Pair Programming Principles To Prosper
If your goal is to increase your comfort level and proficiency with the syntax of a new language, then pair with a programmer of similar Code-Q.
Because you will both be eager to cover as much ground as possible, your rate of progress will be much higher than if you A) attempted to assist a greenhorn beginner, or B) if you struggled to understand the elegant, esoteric instructions issuing from the pizza slot of a seasoned pro. In the case of A) you would lack the necessary vocabulary and clarity of thought to convey the principles at play in the problem domain to your less experienced peer. Conversely, in scenario B) you wouldn’t have learned enough “rules of the game” to appreciate when to break them or when to play a different game altogether.
When your objective is to crystalize your knowledge of a programming language, pair with a programmer who currently exhibits less Code-Q than you.
The ability to explain complex and/or subtle programming principles in simple, straightforward, and easy-to-grok language will force you to deepen your own understanding of the tools offered by said language. Pairing with someone with a similar level of Code-Q would hinder the re-conceptualizing and refinement of what each member of the pair already knows–in part because the pair would tend to reinforce each others’ (possibly bad) habits. Likewise, pairing with a coder of significantly higher Code-Q tempts the less experienced coder to seek approval and to demonstrate that they can “hang” with the alpha-geek by only relying on syntax and techniques that they are the most confident with–thus neglecting precisely those areas of development that would benefit most from a beginner’s on-the-nose style questioning.
To transcend a hard-earned and long exhibited level of programming proficiency, pair with an old pro with strong Code-Fu & high Code-Q.
Because programming practices and coding habits tend to become ingrained over time, discovering new and potentially more elegant ways to tame the machine almost always requires a more experienced guide.
Which brings me full-circle back to my new friend and first pairing partner, Boot “Going The Distance” D. Our mutual Code-Q is similar. He certainly has strengths that I don’t have, and perhaps vice-versa, but with respect to the goal of mastering the Ruby programming language, we’re both far enough from Nirvana to be great companions on the journey. When I hit a wall, he has a sledge hammer. And when he zones out, I’m often getting into the zone. Anecdotally at least–this pairing combo definitely supports my first recommendation above on the topic of pair programming.
If you’re a new practitioner of pair programming, or if it’s all old hat–either way–I’d love to hear your thoughts and tips on this valuable software development practice.
Jeremy Has Left Building
What time is it? Bed time! What time is it? Bed time! I said, what time is it?
return “Bed Time”.upcase
