Pair-Programming with a Wide Gap in Talent?
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?"
First find an old monk and a young monk...
So you write something like
int Add(int a, int b)
{ return a-b; }
int Test()
{ return Add(1,2) == 3; }
And then your partner can make the test pass by writing:
int Add(int a, int b)
{ return 3; }
or if they are clever,
int Test()
{ return 1; }
Or with a little refactoring,
int OldAdd(int a, int b)
{ return a-b; }
int Add(int a, int b)
{ return OldAdd( a, (-1)*b ); }
Read the first few lines describing the assignment. Wait until two days before the assignment is due, and then he can get the donuts and coffee while you pull a few all nighters to finish the project. Get a friend to pretend to be your boss. Your friend should stand over your shoulder, asking if you are done yet, and read the rest of the assignment to you as you program, adding and subtracting requirements at random.
I Am My Own Worst Enemy
this sound like it is an excellent way to prepare yourself for a career in the real world.
Some see the vessel as half full; others see it as half-empty; We pour it out on the floor and laugh
Well... knowledge and herpes.
-30-