Some of my best friends are programmers. Something special happens when two co-workers sit in each other's space working on a problem. Something beyond professional collaboration.
Sometimes a friendship takes root and grows.
In fact, some of the most fun I've ever had is sitting next to my programming partner and talking about possibilities.
Let's try this. No, that's not working out.
What if we do this? Hmmm...let's try something else.
Yes! We got it!!
I think there is a misconception that programming is a solo activity done in a darkened room with the computer screen casting a strange, blue glow over the face of a hunched body furiously typing away at the keyboard.
Ok, there are times that IS an apt description of us programmers:)
But, programming is also a team activity. Even if you're individually working on some code, usually your work will be incorporated into a larger code base. Your code must play nicely with the rest of the application or you'll end up with a busted up app (or as my old boss would politely say 'unexpected results'.) And of course the application development team must work with the business and commercial teams to get the product out the door.
Keeping teamwork in mind, the lone wolf coder sometimes has another option: Pair Programming.
What is Pair Programming?
Put TWO programmers in front of ONE computer. One will be in charge of the computer, typing in the commands. This is the Driver. The other will sit next to the driver and review the code as it's being typed. This is the Navigator.
Now the magic begins. Both programmers think out loud. This is a crucial part to the success of the joint effort. Silence is not golden in this scenario. Both parties engage in conversation about the code, build on to each other solutions, play devil's advocate, challenge each other's notions, and freely exchange ideas.
Periodically, the programmers will trade roles so each partner gets the opportunity to drive and to navigate.
Why is Pair Programming so much fun?
You will laugh. You will get frustrated. You may even get mad . But you will also LEARN. The exchange of ideas between the pair makes the sum of knowledge greater than each
You will learn more about your partner than just her coding style. You will get to know your partner as an actual person. You may learn that she loves to eat yogurt (Yoplait. Strawberry flavor. Low-Fat.) In fact, you may learn that she eats yogurt every single day. At 2:00.
It's a silly example, but when you get punch-drunk and blurry-eyed looking at endless lines of code, yogurt is as good a reason as any other to take a break. It could also be the means to a friendship that goes well beyond the pair programming.