June 8, 2006

Things learnt when pair programming

Even the most experienced programmer can learn from pair programming. There's a collection of things that I've learnt over the years since starting pair programming that I don't think I'd have learnt any other way.

Reading the manual

Like many programmers, I'm not great at reading the manual unless something goes wrong or I want to know how to do something specific. I'm generally too busy to just browse through a manual and find interesting things. However, when pairing, little tips and tricks come up that I find useful but I would never have deliberately looked for.

"Oh - neat - I didn't know you could do that"

I know it's not just me, because, when pairing with other experienced developers (who are less experienced in pair programming), sometimes I'll do something and they'll make a comment like "oh - neat - I didn't know you could do that".

Some examples of things learnt this way

None of the examples here are likely to change your life, but do have some memorability for me personally in terms of things that made me go "oh - neat" that I would not have found otherwise. There are lots of these sorts of things - here's just a sample of 3. Please feel free to add more examples that you've come across by posting a comment.

  • google's "site:" search - limiting a search to just those pages in a domain. e.g. "spots site:sun.com" to find what I'm currently working on. Try "sun spots" without the "site:" - you're not going to find the right thing.
  • F7 in a command prompt - gives you a little dialog showing history
  • The "Factory method" way of retrofitting unit tests
Posted by ivan at June 8, 2006 8:21 PM
Copyright (c) 2004-2007 Ivan Moore
Comments

Virtually everything I've learned about Eclipse has come from pairing, and I'd say I know about 10 keyboard shortcuts and that's it :-)

Still it's interesting to see, when I'm pairing with others, just how many of those shortcuts I pass on. (Ctrl-1 for suggestions, Ctrl-D to delete a line, Ctrl-Shift-R and T for finding files and classes/interfaces respectively were the ones I passed on in the past few days).

Posted by: Aidan at June 9, 2006 6:56 AM

Hi Aidan,

I agree - keyboard shortcuts (and general IDE driving) is one area where pair programming makes a really big difference. Despite being a keyboard klutz compared to many of my former TW colleagues, I find that I pass them on to people who have done less pairing.

Ivan

Posted by: Ivan Moore at June 9, 2006 9:21 PM