Slashdot Mirror


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?"

3 of 121 comments (clear)

  1. Observations by kevin_conaway · · Score: 5, Insightful

    Since you feel that you have more experience, why don't you let your partner take a first crack at the design? Afterwards, you can work with the design to refine it and give it the benefit of your "years of experience"

    It sounds like you might have to suck it up and let this be a learning experience for your partner. However, don't be closeminded. People who are less-experienced can sometimes introduce a new way of thinking or a different viewpoint that those of us who are set in our programming ways may not have thought of.

  2. Like this? by woolio · · Score: 5, Funny
    Do as the TDD folks do - you write a test that fails, your partner makes it pass.


    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) /* NEW */
    { return OldAdd( a, (-1)*b ); }

  3. I did this in Grad School for a AI class once. by Anonymous Coward · · Score: 5, Interesting

    My lab partner was a continuing education guy from IBM who had 20 years of experience ( he had white hair ) and was earning his MS. Me, I had no industry experience at all. We had to write a program for class that played a game using AI techniques. Since a lot of dynamic programming stuff was involved, I reccomended Smalltalk ( Visualworks ). He was only familiar with C, mostly in a systems programming vein. I was wary of trying to troubleshoot pointer problems, as AI code in c can get pretty hairy.

    The kicker was, we could only really meet and work together on the weekends ( unlike everyone else who lived on campus ). He had a day job. Thus we only had 6 weekends to do it ( and I would be missing a weekend because of spring break too! ).

    So we said "Whoever can get the basic search functions working first, we'll use that language." By thursday, my framework was working, he was still fighting various pointer problems.

    "I don't smalltalk" "You know programming. It's all the same. I'll teach you the language, it's dead simple."

    Smalltalk has a very small keyword set, and very simple but powerful semantics. So I explained it to him as we typed. And even with the vast gulf between C and Smalltalk, he was able to catch some common problems, and offer some design ideas.

    Working only on weekends, we were one of the few groups to finish a working program that could play the game well. In fact, we had one weekend left.

    The last weekend before it was due, we used Visualworks UI designer ( before glade even existed ) to make a gui, hooked it into the engine, and players could then play against the computer with a nice UI. It kicked butt.

    We were the only group that finished on time, with a working game engine and working GUI. All the other groups, if their project ran at all, had a command line interface. I remember chuckling to myself at the start when one group mentioned that they were going to use C++ and MFC, and they'd have it working in no time. Famous last words... ;)

    We got a 110 on the project. >:)

    So yeah, pair programming rocks. It was a educational experience for both of us. :D