Pair Programming

The excellent Teach Data Science blog has a post about pair programming. My thoughts:

  1. I probably required more pair programming last semester from my students (at least during class time) than almost any other professor at Harvard. I am a fan!

  2. I think stuff like this, from NASEM, is 10% truth and 90% nonsense.

The ability to work well in multidisciplinary teams is a key component of data science education that is highly valued by industry, as teams of individuals with particular skill sets each play a critical role in producing data products.

Teamwork, as a skill, is not nearly as valued by industry as this quote might suggest, nor is it (meaningfully?) possible for industry to evaluate who is good at it. I also wonder how well we can teach it. But that is a long rant for another day.

  1. It is very hard (impossible?) to make students pair-program outside of class. Students don’t really like it. And, unless you allow students to only submit one assignment with two names on it, the logistics don’t really work. And, if you allow students to submit such group-of-two assignments, they will invariably split up the work. “You do questions 1 and 2. I’ll take 3 and 4. Let me know when you are done and we will put stuff together.”

  2. This is the relevant section from my syllabus:

Students work in “Pairs” of two “Partners.” Sometimes, this will be “side-by-side,” each of you with a computer open, each writing code, but talking with each other throughout. Other times, we will “pair program,” meaning just one computer open and both of your collaborating on a single project. You will work with a different partner every class.

If you are the stronger student in a Pair, do not simply charge ahead. Instead, make sure that your classmate keeps up with you. Help each other! If you aren’t talking with each other often, then you are doing it wrong.

  1. We spend the first 4 or 5 weeks, not “pair programming” but “programming in pairs.” Two students, side-by-side, writing the same code and chatting with each other. It works very well! Highly recommended.

  2. Mid-semester, we do some actual pair programming. I require one student in a pair to close her computer. (Or, at least, to stop typing. They might still have their computer open to look stuff up.) Some students like this. Some don’t. But all are willing to give it a try, at least for some of the class sessions.

  3. During these real pair programming sessions, I also force them to collaborate on a single Github repo. One students creates the repo and invites the other to join. Both clone to their local machines. Then they work on just one computer, pushing changes as they go. Then we switch computers, pulling down all the new code. This gives them at least an introduction to collaboration using modern tools.

David Kane
Preceptor in Statistical Methods and Mathematics
comments powered by Disqus