Obtiva Apprenticeship: Pair Programming

12 November 2009

Over the last couple of days, I’ve managed to get my hands a little dirty with some client work. I paired with Sean Iams to add a CSV parser into a client’s rails application. I’ve pair programmed at previous jobs before, but never as productive as this.

REXML could not parse this XML/HTML: 
<p>Previously, one person would usually be doing all of the coding while the other tried to look at the total scope of what needed to be done.  This works well in theory, but I&#8217;ve found that the other person usually degrades to a human compiler/spell checker after awhile, or worse, stops paying attention all together.<br /> 
<br /> 
<p>However, I don&#8217;t think that&#8217;s entirely the fault of the developers.  In a lot of programming environments, each developer is conveniently packed into a cubicle.  So, just let me just say something about cubicles:</p> 
<p><b>Cubicles suck, but they really suck for pair programming.</b>  </p> 
<p>With a cubicle, your environment dictates how you code.  As you can see by my highly technical diagram to the left, pair programming in a cubicle forces one person to literally take a step back.  How can you be actively involved in collaborating on code if you have to peer over someones shoulder to even see?  I just doesn&#8217;t work.</p> 
<p>At the Obtiva Studio, we all sit a together (no half walls or any of that garbage) at long, wide desks.  Perfect for pair programming.  Sean and I were both unfamiliar with the application, so we both needed to be looking at real code, figuring things out.  Our environment didn&#8217;t dictate that this is how it should be done, but it allowed us to do so. </p> 
<p>In the end we were able to add this functionality in just a couple of days, much less time than it would have taken me by myself.  Since Sean has a lot more experience with Textmate and OSX, I also got the side benefit of learning several keyboard shortcuts that I wouldn&#8217;t have picked up on in the &#8220;sit back and dink around&#8221; cubicle approach.</p> 
<p>I&#8217;m looking forward to more of this in the future.</p>