Sunday, June 19, 2011

It Takes Two For Summer Learning

Another week and another project. This time the problem of choice is the Stable Marriage algorithm. For those interested in it, please go here.

Perhaps more interesting is this was the first time I did pair programming for a project. Unlike the group project hell of grade/high school, pair programming has multiple benefits. After reading a couple of papers on it, one of which had dubious conclusions, I was slightly sold on the idea. With the addition of extra credit and an able partner with a similar schedule I decided to take the plunge. Here are my personal results.

Overall, I'd say the experience was pleasant. It took us about 7 hours of working, but we did the whole assignment in one run. Another person helped to do all the extraneous 'paperwork', i.e. setting up wikis, repositories, etc., in a shorter amount of time. Also having a second person to bounce ideas against helped wrap my head around implementing a working algorithm from the basic structure in my head. And probably most beneficial was another set of eyes to catch any errors in writing or syntax, and honestly this probably saved us the most amount of time. At one point or another we both mentioned that the other saved us several hours of beating our heads against a wall by finding an all to obvious but elusive bug.

However, the whole process wasn't painless. Given adequate time two different minds can come up with two wildly different solutions to a problem. Trying to combine those solutions into one program can be quite tricky. I fear our final solution was more complicated than it needed to be due to the cobbled style of our writing. We attempted to allow each other to write what we had in our heads, and did our best to make the two ideas work together. On the whole it was very successful and we found a working and optimal solution that met the project guidelines. Though I do think though that this led to more time spent coding and debugging than if we had each wholly implemented our own solution.

Saying all of this I still believe that pair programming to be a positive exercise in coding and I intend to attempt to do the rest of the projects in a pair. If only because those extra points make it such an easy choice.

0 comments:

Post a Comment