Pair Programming
Add Your Suggestions Here
What has worked for you? What tools do you use for screen sharing? Â Please add your tips and experiences! We will all benefit.
What is pair programming?
Pair programming is two (or more) people working on the same code at the same time.Â
If you're working in person, you sit at the same computer and take turns typing. Â If you're pairing remotely, you use a screen sharing application.Â
Typically one person is the "driver" - the person with the keyboard - and one person is the "navigator" - who suggests the next step to take. Â Both people talk about design choices, Â syntax and logical errors, etc. Â The programmers trade roles frequently.Â
How To Pair Program describes how to do a pairing session, step-by-step.
When and why might you pair program?
The advantages of pair programming  are that we write better code with fewer mistakes, we're more familiar with more of the code base, working together can be more fun, and it tends to make new contributors become productive more quickly and stay with the community.Â
Critical or complex code
It's best to have more than one person review sensitive or complicated code, especially if it could affect other parts of OpenMRS. Â If it's something you'd request a code review for, it's a good candidate for pair programming.
Solving tough problems
Two brains are better than one.Â
Different skill sets
Perhaps you have different levels of expertise or different kinds of expertise. Â You might know all about Java, and your partner might know about HL7. Â A pairing session can get you up to speed quickly-- and that means more productive coders working on OpenMRS.Â
Expert-Expert
Coding with a colleague can be a great experience. Â You can get more done, learn some new tricks, or see other ways to think about a problem.Â
Novice-Novice
Two brains are better than one.
Software Tools
You need
a way to talk, preferably voice chat  (like Skype)
a way to share a screen
a way to share control of the computer if at all possible - so you're both actively working with the code
Plan on spending  30-60 minutes on getting your tools to work the first time you pair.
Screen sharing tools depend on what operating systems you're using and how much configuration you want to do. Â Â
The best way to find tools is to search for "remote pairing tools" on Google or Stack Overflow. ( Consider limiting search results to the past year, as some go back 6+ years.)
Here are some good posts:
StackOverflow posts:Â
pair.io gives you a one-button, collaboration-friendly dev environment for your GitHub repo . Still in alpha - could be great, especially with our GitHub switchover.
Software Tool Reviews
Please add your reviews below.Â
iChat (Mac-Mac)
jriley: Worked the best for us so far. Â Occasional refresh errors on the screen, but responsive.Â
ScreenShare app (Mac - installed to /System/Library/CoreServices/ScreenSharing.app)
jriley: We couldn't get our machines to connect. iChat uses this to share -- it's easier to use iChat.
join.me  (web)Â
jriley: Ok for viewing a screen, terrible for remote control. Â It ensured the navigator navigated instead of typed.Â
Adobe Connect - the OpenMRS U chat room - screen share only, no shared control
jriley: ok for viewing a screen, especially by multiple people. Â Without the shared keyboard and mouse, it's more of a lecture. You'll have to find ways to keep it a collaboration. Â
Untested:
Skype screen share
TeamViewer - (Mac, Linux, Windows)
TightVNCÂ Â (Windows and Linux)
Social Tools
Pair programming is about collaboration, which makes it different from programming alone. Â
//TODO:
//ping-pong programming -  one writes test, one writes code to make it pass  http://c2.com/cgi/wiki?PairProgrammingPingPongPattern
//make sure you're listening && collaborating  ( by...)
//if navigating, esp. while pairing remotely, get used to the  pauses while the driver carries out the plan.  They aren't stuck, they're thinking.
Tips
Use an IDE you both know
Collaborating is hard work. Â Plan sessions of only 1-2 hours. Â
Interesting Links
Unlikely Tools for Pair Programming - presentation from Open Source Bridge conference
Harnessing the Good Intentions of Others for your OSS projects - an OSCON presentation - how to lower the  barrier between a volunteer expressing interest and contributing.
There are many introductions to pair programming and other agile development techniques - see Wikipedia or do  Google search.