I have experienced pair programming as a student.
TL;DR: From my experience, I do not recommend pair programming, but I do recommend a course structure where students can ask each other for assistance. This way, students who need and want assistance can get it, and students who are able to give assistance can give it. The ability of the professor or TA in the lab can make a big difference.
My First Experience (Not very good)
EDIT: It seems that this was intended to be pair programming, but due to it being badly explained to the students, it ended up just being "division of labor." In reality in my experience, the review component of pair programming was not really present. I mistook the goal of pair programming - I don't think pair programming is intended to be able to give the students I worked with the amount of help that they needed. If you use Pair Programming as a teaching technique, you should make sure it is explained better than it was explained to me, and make sure students are actually following the procedure. END EDIT.
In the first Computer Science class I took, there was a 2-3 hour lab once a week, and (we) the students were randomly assigned new partners with whom to work on labs every week. There were two student teaching assistants, one who seemed perfectly competent, and one who everyone dreaded (nobody could understand what he was saying at all, but he would talk on and on and demand your attention). There would be an assigned program to write, and a lab report. The balance of work was generally this:
- As a more experienced programmer myself, I usually ended up doing most of the planning and writing of the program.
- My partner would usually write the "lab report". They often did not understand programming very well, but felt that they could contribute by writing a lab report.
Heather's answer said something which was also true in my case:
The other student often was like, "hey, we need to get this done, you obviously know how to do it - just do it".
Many times, I tried my best to get them to understand the code I was writing, pointing out lines of code, explaining functions, describing concepts... but as far as I could tell, most of my efforts were lost. Whenever I actually tried to get my partner to write some of the code, our efforts would start to go nowhere very fast.
One time, when we were learning a topic considered difficult for the class, the professor came in to help with the lab, and he really made sure everyone got the help they needed to understand the concept. That was the only time it seemed that the lab was really successful in terms of most students learning.
Some of the reasons why this experience with pair programming was a bad one were:
- My partners did not seem invested in learning about programming (they were fine with only doing what they needed to in order to pass the class). Other students in the class might have been invested in learning, but not any of my partners.
- Good advice was often unavailable. (The students tended to rely only on their partners or an available TA for assistance. The one competent TA was often busy, and sometimes neither partner knows what to do.)
My Second Experience (Better, but not pair programming)
In the second Computer Science class I took, everyone received individual assignments multiple times a week. We were not required to program in pairs. We had 2-3 hours of lab time twice a week. The teaching assistant was actually another professor, who was very competent whenever people asked him for assistance. Although people were not assigned pairs, students who needed help would often ask other students who they knew were competent programmers for help.
The reasons that this class was so much more successful seemed to be:
- Good advice was always available.
- Anyone could ask anyone else for help.
- The people who wanted and needed help were always able to get it, not stuck with a partner who might know as little as they know.
- The students who knew enough to give help could give it to anyone, not just a partner who might not want it.
My Third Experience (Pair Programming for Fun)
My friend and I meet every couple of weeks and code together for fun. This is completely separate from any form of classroom, academic work, or job. What we usually do seems to fit the definition/intention of Pair Programming far better than any classroom Pair Programming experience I have had. One of us typically codes while the other watches/gives comments, switching off depending on who better understands the particular task. This is enjoyable and we both learn a great deal.
However, in this situation, we are both already fairly competent at programming, and motivated to program and learn.
It is unfortunate, but I cannot really see this succeeding in most academic environments I have been in, because of a lack of motivation in so many students. I would love to be in a classroom where everyone is motivated enough and has sufficient programming skills for Pair Programming to be successful, but I don't think that I have yet been in any classroom like it.