CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeffrey Palermo (.com)

Blog moved to www.jeffreypalermo.com

Palermo's rules for Pairing (pair programming, that is) - level 200

Palermo's rules for Pairing:
Pair programming is a great way for real-time code review and collaboration.  Chances are that the end goal will be reached more quickly by working with a partner when writing software.  This might sound counter-intuitive at first if you think that 2 people splitting the work would accomplish the goal faster.  What actually happens very often is that, without communication, work is duplicated, or people code is slightly different directions.  I'm won't pander to the benefits of pair programming too much, but when pairing, here are my rules:
  • Talk while you code.  Explain the thought process that is leading you to type what you are typing.
  • Play the TDD game.  Have one person write a test, then pass the keyboard so that other other person makes the test pass.  The person who gets the test to pass decides if he wants to write a test next or pass the keyboard.
  • If both programmers aren't on the same page for the task, whiteboard it to form a common understanding.
  • Commit the code to source control after each task is completed.
  • When working in a team of more than 2, rotate pairs so that knowledge flows.
  • If one of the programmers is a clear novice on the task, have him drive first until he's no longer the novice.
  • Don't steal the keyboard.  If you know of a better way to accomplish a task, explain your thought process so that your partner understands the better way.
  • Defer driving.  If you are completely comfortable with the code that is about to be written, pass the keyboard to your partner.  Writing the code will benefit him more than you.
  • Communicate.  It's tought, and there will be disagreements.  No one has overruling authority.  If you haven't convinced the other of your viewpoint, you haven't communicated it effectively.  If it's important, then everyone on the team must understand why.
  • Communicate.
  • Communicate.

Published Feb 20 2006, 01:06 PM by Jeffrey Palermo
Filed under:

Comments

Sam Gentile said:

<p>My apologies to my readers and my CodeBetter colleagues on one more link posting without original material. I have had an intense couple of weeks and the For Sale sign went up on my NH house today as we get ready to move states. I still promise to have my CAB and Spikes post up real soon-)</p>
# February 20, 2006 7:20 PM

Sam Gentile said:

<p>My apologies to my readers and my CodeBetter colleagues on one more link posting without original material. I have had an intense couple of weeks and the For Sale sign went up on my NH house today as we get ready to move states. I still promise to have my CAB and Spikes post up real soon-)</p>
# February 20, 2006 10:27 PM

Sam Gentile said:

<p>My apologies to my readers and my CodeBetter colleagues on one more link posting without original material. I have had an intense couple of weeks and the For Sale sign went up on my NH house today as we get ready to move states. I still promise to have my CAB and Spikes post up real soon-)</p>
# February 21, 2006 8:24 AM

Jason Haley said:

# February 21, 2006 8:36 AM

Sam Gentile said:

<p>My apologies to my readers and my CodeBetter colleagues on one more link posting without original material. I have had an intense couple of weeks and the For Sale sign went up on my NH house today as we get ready to move states. I still promise to have my CAB and Spikes post up real soon-)</p>
# February 23, 2006 11:13 PM

About Jeffrey Palermo

Jeffrey Palermo is a software management consultant and the CTO of Headspring Systems in Austin, TX. Jeffrey specializes in Agile coaching and helps companies double the productivity of software teams. Jeffrey is an MCSD.Net , Microsoft MVP, Certified Scrummaster, Austin .Net User Group leader, AgileAustin board member, INETA speaker, INETA Membership Mentor, Christian, husband, father, motorcyclist, Eagle Scout, U.S. Army Veteran, and Texas A&M University graduate. Check out Devlicio.us!

This Blog

Syndication

News

Headspring Systems

View Jeffrey Palermo's profile on LinkedIn

See my new blog at .jeffreypalermo.com