Pair Programming In Cpp

Is PairProgramming in CeePlusPlus different?

I've successfully used PairDebugging? live on C++ projects, and have used PairProgramming as part of language training courses, but I've never used PairProgramming on C++ projects. Does anyone have experiences to relate? --PeteMcBreen


At XpImmersionOne, the students did pair programming in Java and reported that they really liked it. I'd expect this to have some bearing on C++ pairing. Chime in, folks! --RonJeffries


I just had my first pair -- feels like losing one's virginity. :-) My partner was waiting idle on his project, so I invited him to pair with me, to try it out. I told him about the problem and showed him the existing code. He made suggestions and answered my questions, and I did the coding. Solo, I had already dramatically restructured the design of the class, a directory iterator (which sorely needed it, apparently written by a C++ neophyte), but during this session we scrapped it entirely, and simply exposed a Contents() method which returned a container. The code was much smaller, cleaner, and robust with regard to concurrency issues. Without pairing, it would have remained well-written code implementing an inferior design.

Also, C++ is a language with a lot of 'surface area' -- lots of tricks and gotchas, and it's nice to have someone to check with instead of having to pull out a reference (or just guess) each time. (I've been using C++ for roughly five years (self-taught) and only this year understood the benefits of passing-by-value and 'discovered' smart pointers.) -- JoshuaJuran


To me, there is nothing fundamentally different about pairing in C++. Although I haven't done it within the context of XP, I have paired with people on and off for afternoons at a time. My gut says that it is more valuable in C++ due to the fact that the language defaults typically aren't what you want. So, your partner says things like "shouldn't that be a virtual function?" and "don't you need to call the base class assignment operator?" -- MichaelFeathers


WardCunningham and I were talking during a break at an OOPSLA workshop run by SteveFraser?. Ward was astonished we could program in pairs using C++ and vi; he thought it was an artifact of the SmalltalkLanguage programming environment. We chased down JimCoplien (on break from the same workshop, and at the time was working on the PatternLanguage published in the first PLoP proceedings), and thus "PairProgramming" became part of the literature.

I've done PairProgramming in C++ and Perl (with the same pair partner, MichaelLindner). Since I haven't done it in Smalltalk or Java, I can't say what's different. I attended the first PairProgramming at OOPSLA, and didn't see anything I didn't recognize. --PaulChisholm


SmalltalkLanguage, LispLanguage, and PythonLanguage are much more interactive than compile/link/run languages such as C++ or Java. The interactiveness is a huge plus when PairProgramming, but doesn't discount the usefulness when it isn't available.


We've tried PairProgramming in JavaLanguage, ExcelVba?, and even InstallShield. We don't have numbers to prove it, but it always seems to be better. --SteveFreeman


We did PairProgrammingInCpp at a couple of my former employers. The only time it doesn't seem to work well is when there is a large difference in language skills. It's all very well to say have the junior partner drive, but when time is short it takes too long to explain the intricacies of such a very large language. But we have a fair spread of skills among our developers, and we can always get 'em partners when they need 'em. We encourage but don't enforce pairing. --PeterMerel


SunirShah wonders why ExtremeProgrammingWithCpp is apparently considered to be impossible by many.


CategoryCpp CategoryExtremeProgramming CategoryPairProgramming

EditText of this page (last edited May 7, 2003) or FindPage with title or text search