Skip to main content

Pair Programming

Useful tips for pair programming.

Collated below is a non-exhaustive list of tips for pair programming. By collating these tips, it is our intention that developers will be better equipped for pair programming.

Environment​

  • Have a comfortable and inviting environment.
  • Avoid esoteric desktop setups, i.e. custom keybindings and non-standard shells. Stick with the defaults.
  • Disable notifications, i.e. Discord messages, email pop-ups. Pairing with someone distracted by such notifications can be a frustrating experience.

Interaction​

  • Have one developer drive and another navigate. The driver will mostly be typing while the navigator mostly discusses what to do.
  • Regularly switch between roles. As a rule of thumb, a switch should occur every ~15 minutes. If one person seems like engaged, switch roles.
  • Take frequent breaks. Recognize that people respond to pair programming in different ways and cannot last the entire day.
  • Do not be afraid to make and show mistakes. Some people are fearful that others will see all mistakes they make during pair programming. Demonstrate that everyone makes mistakes, show your mistakes and how they iteratively get fixed as you go.
  • Avoid closed discussions when there is a disagreement with an approach, e.g. "That's not good" or "I don't like it". This will shut down someone and encourage the avoidance of sharing opinions or dreading pair programming.
  • Ask open questions such as "What are the benefits and trade-offs of doing it this way?" or "Are there any alternatives that we can explore?".
  • Moments of silence are perfectly acceptable.
  • Spend time together away from code. Build rapport, trust, laugh about things. Discussing ideas away from the code can sometimes help see the bigger picture.