-
Notifications
You must be signed in to change notification settings - Fork 241
Pair Programming
Collin Mutembei edited this page Dec 14, 2016
·
3 revisions
- Two people working together on the same code, at the same workstation.
- One person is the "Driver", they are doing the typing.
- The other person is the "Navigator", they are watching the driver, and thinking about things on a different or higher level since they aren't distracted by typing.
- Much more info in links below
- There are many benefits to pair programming, many are mentioned in links below, such as
- Higher quality code (best ideas from two people make it into the code)
- More discipline (people keep each other honest - e.g. "Aren't you going to write a test for that???")
- Spread skills and knowledge across team and company quicker, deeper, and more efficiently
- Prevent silos of knowledge and risk because "only one person know this code"
- Keep people from goofing off - pairs work all day unless they are taking breaks - no surfing the web, zoning out to your headphones, etc...
- Better office communication and team cohesiveness - people are listening and overhearing other pairs and learning/helping as appropriate, not lost in their headphones.
- Communicate!
- The "driver" should be talking constantly, explaining what they are doing and why. A silent pair is not a good pair.
- Don't be afraid to stop the pair and ask questions. There's no dumb question, novice questions are good. Just by asking "why in the heck are you doing THAT?", a "novice" programmer can make a "master" programmer think twice, and prevent them from going down a rathole, saving hours, days, maybe even weeks!
- Have fun!
- Take breaks often, and at the same time as your pair!
Consider doing TDD with Ping Pong Pairing: http://c2.com/cgi/wiki?PairProgrammingPingPongPattern
- One person writes a failing test. Say "Ping" and switch drivers
- Other person makes the test pass, then writes the next failing test. Say "Pong" and switch drivers
- Repeat...
There's a separate page on Remote Pairing