Pair programming: Keyboard ninja? Maybe you should drive

As you may know, I’ve recently started at a new position here in London. Last week I was pair programming all day, every day, with a couple of the other developers, learning the ins and outs of the system. It reminded me of an important tip for beginners: good pair programming requires both driver and observer to maintain focus between making a decision and implementing that change.

Renaming a class or a method can be done throughout your code in a fraction of a second with built-in IDE shortcuts. But something like promoting a static method to an injected service (still a pretty common refactoring) can easily take a couple of minutes to actually do. In this time, there’s not much going on for the observer, except listening to the sound of typing. And waiting. And trying not to get bored.

(If you’re unlucky enough to be paired with me, I’ll probably be completely distracted and playing with all the things on your desk by this point.)

Now, I am no stranger to pair programming, and have used it many times before for small tasks. But this is the first time I’ve ever done it solidly for several days at a time. This past week has been a real eye-opener for me in terms of quickly making code changes; although I have been using ReSharper for a while now, I have a new found appreciation for its keyboard shortcuts, and people who can use them effectively. Which sadly doesn’t include me yet.

Using your mouse to navigate code and poke through menus is just too slow, and it really shows when you are refactoring code in front of someone else. A good driver minimises the lag between agreeing on a change and effecting it with lighting-fast typing skills. So unplug your mouse, and go learn your tools’ keyboard shortcuts!

March 4, 2010

5 Comments

Klaus Hebsgaard on March 8, 2010 at 6:48 pm.

Good post, I just got to think of Roy Osheroves Keyboard Jedi:
http://weblogs.asp.net/rosherove/archive/2007/06/03/train-to-be-a-keyboard-master-with-keyboard-jedi.aspx
Could be good to sniff the drivers shortcuts…

Klaus Hebsgaard on March 8, 2010 at 6:49 pm.

Sorry should have checked the link before posting, keyboard jedi can be found here:
http://osherove.com/storage/tools/keyjedi.zip

Richard on March 9, 2010 at 10:20 pm.

Klaus : thanks for the link, this tool sounds interesting but it just crashed when I ran it. Need to take another look tomorrow…

Code Buddy on April 7, 2010 at 8:08 am.

Good post Richard, I’ve been pair programming myself for the last year or so and learned a great deal about improved workflow like this – one thing we did was move to sharing our desktops using VNC, do you do this or gather round the same screen?

Richard on April 7, 2010 at 9:51 am.

Code Buddy : We gather around the same screen for now. Haven’t tried pairing between offices yet!

Leave a Reply