Pair Programming

Pair programming =

Two people +

One problem

(and usually, one computer, one keyboard, one screen...

...notwithstanding remote pairing tools and face-to-face pairing desks)

Pairing is like Rally Racing

One driver, one navigator

Listen to how engaged the navigator is. They are focused on what's coming next, but they are not idly speculating. E.g. circa 4min in

Pair Programming Benefits

Two heads are better than one!

Pair Programming finds the Maximum of Two Minds

[show graph of maxima]

Every person thinks a little differently, has different expertise / experience / energy / perspective.

So for any given problem, at any given moment, one of the partners will be more able to solve that problem.

With pair programming, you get the best of two at every moment.

(And often you get solutions that are better than any individual would have come up with alone.)

Pairing is efficient

MYTH: pairing reduces productivity by 50%

FACT: pairing (when done well) increases productivity, especially when the problem requires creativity to solve

(pairing also increases communication, satisfaction, and the rate of high-fives per minute)

Pairing is teaching

Docendo discimus - "by teaching we learn"

Roles

Driver

Tag Team

Switch roles often!

Ping Pong

  1. Alice writes a unit test and gets it to fail correctly
  2. Alice hands the keyboard to Bob
  3. Bob writes code until the unit test passes ("goes green")
  4. Bob writes a unit test and gets it to fail correctly
  5. Bob hands the keyboard to Alice
  6. Alice writes code until the unit test passes ("goes green")
  7. Repeat until done!

Breath Mints

It's better to have them and not need them, than to need them and not have them.

mentos

Do...

Don't...

References

Videos:

Articles:

https://www.wikihow.com/Pair-Program

https://pdfs.semanticscholar.org/a7b9/eaf874127108f131cb05f8f513c10b5f00d1.pdf

 Previous Lesson Next Lesson 

Outline

[menu]

/