cyphersec A blog about Web Application Security and .NET development best practices

25Apr/091

Pair Programming – We help each other succeed

aprcwhangarei4 Pair programming is one of the first things people notice about XP. Two people working at the same keyboard? It's weird. It's also extremely powerful and, once you get used to it, tons of fun.

Why Pair?

When you pair, one person codes - the driver. The other person is the navigator (as seen in rally competitions), whose job is to think. As navigator, sometimes you think about what the driver is typing. (Don't rush to point out missing semicolons, though. That's annoying). Sometimes you think about what tasks to work on next and sometimes you think about how your work best fits into the overall design.

This arrangement leaves the driver free to work on the tactical challenges of creating rigorous, syntactically correct code without worrying about the big picture, and it gives the navigator the opportunity to consider strategic issues without being distracted by the details of coding.

Together, the driver and navigator create higher-quality work more quickly than either could proceed on their own.

Pairing also reinforces good programming habits. XP's reliance on continuous testing and design refinement takes a lot of self-discipline. When pairing, you'll have positive peer pressure to perform the difficult but crucial tasks. You'll spread coding knowledge and tips throughout the team.

You'll also spend more time in flow - that highly productive state in which you're totally focused on the  code. It's a different kind of flow that normal because you're working with a partner, but it's far more resilient to interruptions. To start whit, you'll discover that your office mates are far less likely to interrupt you when you're working with someone. When they do, one person will handle the interruption while the other continues his train of thought. Further, you'll find yourself paying more attention to the conversation with your programming partner than to surrounding noise; it fades into the background.

If hat isn't enough, pairing really is a lot of fun. The added brainpower will help you get past roadblocks more easily. For the most part, you'll be collaborating with smart, like-minded people. Plus, if your wrists get sore from typing, you can hand off the keyboard to your partner and continue to be productive.

About Alessio Marziali

Alessio Marziali (MCTS) is a Security Consultant with 9 years of experience developing secure applications with Microsoft .NET in a variety of sectors in UK and Italy. Published technical author with two ASP.NET books currently available for purchase and OWASP Code Crawler Project Leader.
Comments (1) Trackbacks (0)
  1. nice article


Leave a comment


CAPTCHA image

No trackbacks yet.