Pair-Programming with a Wide Gap in Talent? 121
efp asks: "I'm a graduate student and have a programming assignment coming up. We're encouraged to work in pairs and I've agreed to work with a friend. However, while I'm far from l33t, I've several years more experience than my partner. Are there effective techniques for pair programming with a wide gap in talent? I want us both to get a lot out of the assignment, and I do not want to do all the work (which has been specifically identified and disallowed by the instructor anyway). Navigator/driver scenarios? Index-card design techniques?"
peer programming (Score:2, Informative)
Re:Swap out (Score:3, Informative)
Exactly what I was going to recommend. By writing the tests first, you can help drive the design as the more experienced person. But by them trying things to pass it, they learn a lot too.
The biggest challenge is to consistantly do the simplest thing possible (not the dumbest thing).
If you run into problems, I'd highly recommend the TDD list [yahoo.com], or you can feel free to ping me offline.
Try this... (Score:2, Informative)
One of its basic tenets is pair-programming: http://www.extremeprogramming.org/rules/pair.html [extremeprogramming.org]
Of course, if your partner is way below your level, every session would end up being a tutorial, very counter-productive. In which case, he should either step-up by practicing in his spare time, or worse comes to worst, get a new partner.
Re:Isn't this the point? (Score:2, Informative)
That's a benefit when it occurs, yes, but the real point of pair programming is to get two people working together on a single task to stay disciplined, to implement all of the necessary features, to produce the best possible code, and to spread the knowledge of the entire system throughout the team. It supports many of the other XP practices.
translation scripts are the key (Score:2, Informative)
The best way to bring up a newbie in pair programming is to give her simple stuff that she can do reasonably quickly and well enough. The most common highly delegatable by far for text-based programmers like me is translation scripts. It's a breeze to specify; You need to figure out what other programs you are going to interface with and then just tell them what you need in and out. Best to have real files to work with. For example, in my field I use a lot of distance matrixes that consist of an array of labels and a 2-dimension square of numbers that is diagonally symmettric; but there are many different formats for these and my CompLearn [complearn.org] system only supports one text matrix format. So already there are a bunch of simple translation programs that I can easily delegate by saying "see this distance matrix output from program X?" Translate it to something that works with CompLearn! This is also useful for the output side of most programs that need to work with the real world. And of course the venerable and highly useful HTML screen scraper is a great subtype of this big class of programs. The reasons this is so good to delegate are as follows:
My favorite language for this kind of thing is Ruby, but I think Perl or Python would be fine too; anything that supports regexp and decent strings is a winner.
Happy Pair Programming and good luck! Rudi [cilibrar.com]