1 of 8

Pair Programming

2 of 8

Programming with people

“Alone”

Helping eachother

Pair Programming

(it’s a spectrum!)

HackBright students pairing

GDI students helping eachother

GDI student working dilligently

3 of 8

What is Pair Programming?

2 programmers, single computer

Driver:

  • Controls the mouse/keyboard
  • Deals with the details

Navigator:

  • Thinks higher level
  • Watches for typos, logical errors

Switch off every 10-20 minutes

HackBright students pairing

4 of 8

Guidelines

  • Make sure to rotate roles!
  • Anyone can change anything
  • Be patient, respectful, and open
  • Resolve disagreements civilly

GDI students pairing

5 of 8

Why Pair Programming?

  • Fewer bugs (15-20%)
  • Better code quality
  • Better design

It’s better for the code!

var padToThree = function(number) {

if (number<=999) {

number = (" "+number).slice(-4);

}

return number;

};

for (var i = 0; i <= gridWidth; i+=units) {

line(i+offset, i+offset, height+offset);

}

for (var i = 0; i <= gridHeight; i+=units) {

line(offset, height+offset, i+offset);

}

6 of 8

Why Pair Programming?

  • Increases knowledge sharing
  • Reduces bad programming habits
  • Improves focus
  • Improves communication skills

It’s better for the coders!

HackBright students pairing

7 of 8

Why Pair Programming?

  • Increases knowledge sharing
  • Increases “bus factor”

It’s better for the whole team!

8 of 8

Getting started

  • Pick a partner
  • Pick a project
  • Start high-level