Try free
5 min read Guide 406 of 877

Pair Programming Practices

Pair programming means two developers working together at one computer. Good pairing produces better code, shares knowledge, and builds team relationships. Bad pairing is frustrating and unproductive. This guide covers effective pairing practices.

Pairing Benefits

BenefitImpact
Code qualityFewer bugs, better design
Knowledge sharingNo single points of failure
OnboardingFaster ramp-up
FocusLess distraction

Pairing Roles

Driver and Navigator

PAIRING ROLES
═════════════

DRIVER:
─────────────────────────────────────
├── Hands on keyboard
├── Writes the code
├── Focuses on implementation
├── Thinks about syntax
├── Immediate problem
└── Tactical

NAVIGATOR:
─────────────────────────────────────
├── Watches and reviews
├── Thinks about bigger picture
├── Spots bugs and issues
├── Considers design
├── Looks ahead
├── Suggests improvements
└── Strategic

SWITCHING:
─────────────────────────────────────
Switch every 15-30 minutes:
├── Timer or natural break
├── Both stay engaged
├── Fresh perspective
├── Shared ownership
└── Equal participation

ANTI-PATTERN:
─────────────────────────────────────
Bad pairing:
├── Navigator checks phone
├── Driver ignores navigator
├── One person always drives
├── Silent coding
├── Not really pairing
└── Engagement required

Pairing Styles

Different Approaches

PAIRING STYLES
══════════════

DRIVER-NAVIGATOR (Classic):
─────────────────────────────────────
├── One drives, one navigates
├── Switch regularly
├── Clear roles
├── Good for most work
└── Default style

PING-PONG (TDD):
─────────────────────────────────────
Process:
├── A writes failing test
├── B makes test pass
├── B writes next failing test
├── A makes test pass
├── Continue alternating
└── Great for TDD

Example:
  A: write test → RED
  B: implement → GREEN
  B: write test → RED
  A: implement → GREEN
  ...

STRONG-STYLE:
─────────────────────────────────────
Rule: "For an idea to go from your
      head into the computer, it must
      go through someone else's hands"

├── Navigator has idea
├── Must explain to driver
├── Driver implements
├── Forces communication
├── Good for teaching
└── Explicit knowledge transfer

BACKSEAT NAVIGATOR:
─────────────────────────────────────
When to use:
├── Expert + novice
├── Expert navigates more
├── Novice learns by doing
├── Gradual handoff
└── Teaching mode

Remote Pairing

Pairing Distributed

REMOTE PAIRING
══════════════

TOOLS:
─────────────────────────────────────
├── VS Code Live Share
├── JetBrains Code With Me
├── Tuple
├── Screen share + video
├── Same codebase access
└── Good tooling essential

SETUP:
─────────────────────────────────────
Requirements:
├── Stable internet
├── Good audio (headset)
├── Camera optional but helpful
├── Shared screen/editor
├── Easy to take control
└── Low latency

TIPS:
─────────────────────────────────────
├── Over-communicate
├── "I'm going to..." before doing
├── Narrate your thinking
├── Take breaks
├── Acknowledge latency
├── Patience required
└── Communication key

SCHEDULE:
─────────────────────────────────────
├── Agree on pairing time
├── Time zones considered
├── Shorter sessions (2h max)
├── Breaks between sessions
├── Respect work hours
└── Sustainable remote

When to Pair

Good and Bad Times

WHEN TO PAIR
════════════

GOOD FOR PAIRING:
─────────────────────────────────────
├── Complex problems
├── Unfamiliar code
├── Critical features
├── When stuck
├── Onboarding
├── Design decisions
├── Debugging hard bugs
└── High value work

NOT GOOD FOR PAIRING:
─────────────────────────────────────
├── Simple, routine tasks
├── Research/exploration
├── Writing documentation
├── Email and admin
├── When either needs focus time
├── Simple bug fixes
└── Low value work

MAKING THE CALL:
─────────────────────────────────────
Ask:
├── Is this complex?
├── Would another perspective help?
├── Is knowledge transfer valuable?
├── Is review needed anyway?
├── Worth 2 people's time?
└── Value exceeds cost?

GitScrum Tracking

Managing Pairing

GITSCRUM FOR PAIRING
════════════════════

TASK ASSIGNMENT:
─────────────────────────────────────
├── Assign both pair members
├── Both get credit
├── Visible collaboration
├── Track who worked together
└── Shared ownership

PAIRING SESSIONS:
─────────────────────────────────────
Task checklist:
├── ☐ Pairing scheduled
├── ☐ Environment ready
├── ☐ Session completed
├── ☐ Code committed
└── Tracked sessions

RETROSPECTIVE:
─────────────────────────────────────
├── Discuss pairing experience
├── What worked well
├── What to improve
├── Adjust practices
└── Continuous improvement

Best Practices

For Pair Programming

  1. Switch roles — Every 15-30 min
  2. Both engaged — Active participation
  3. Communicate — Narrate thinking
  4. Take breaks — Intense work needs rest
  5. Choose wisely — Pair on complex work

Anti-Patterns

PAIRING MISTAKES:
✗ Navigator disengaged
✗ Never switching roles
✗ Pair on trivial work
✗ Silent coding
✗ One person dominates
✗ No breaks
✗ Forced pairing always
✗ Poor tooling for remote