What is pair programming? PairProgramming.com defines it as:
Two programmers working side-by-side, collaborating on the same design, algorithm, code or test. One programmer, the driver, has control of the keyboard/mouse and actively implements the program. The other programmer, the observer, continuously observes the work of the driver to identify tactical (syntactic, spelling, etc.) defects and also thinks strategically about the direction of the work. On demand, the two programmers can brainstorm any challenging problem. Because the two programmers periodically switch roles, they work together as equals to develop software.
Pair programming has traditionally been a practice of XP (eXtreme Programming). That doesn’t mean you have to do XP to pair program, however. Developers seem to fall into several camps on pair programming:
- Some swear by it and feel naked when they’re not with a pair
- Some are comfortable with it, but would prefer not to do it constantly
- Some hate it with a vengeance and wouldn’t be caught near a pair
Each camp has its own strengths and weaknesses, just like the practice of pair programming itself. My preference, though, falls somewhere between loving it and liking it. I don’t think constant pairing is either productive or enjoyable, but there are times when pairing can be quite beneficial.
My formative years as a developer were spent in an XP studio which practiced pair programming 24/7. Being in such an environment taught me the value of collaborative development and good communication. Pair programming supports (one might even say forces) both of these goals.
It goes without saying that moving from an XP shop to SAS was somewhat of a shock for me initially. I was used to a work environment in which all of the developers on a team shared a common work space. Now I was isolated, not in a lab or a cubicle, but in an office with a thick, heavy door!
In my next post, I’ll discuss how I was able to work out getting a monitor splitter and a second monitor, keyboard, and mouse in my office and I’ll give some examples of how my fellow developers and I have used pair programming to our advantage on several recent development projects. Don’t touch that remote.