Monday, November 19, 2007

Pair Programming or Mandatory Code Reviews?

On a thread in ALT.NET discussion group, Jeremy Jarrell asked for tips and tool suggestions for doing code reviews.  Eventually the conversation moved to pair programming, and Dave Laribee relayed an interesting tip from Mike Roberts on getting developers to try pairing.  Dave's paraphrase of Mike's tip was "nothing like a long-assed code review to get developers to try pair programming."

I think that is probably a good approach if you are interested in getting your team into pairing, but meeting resistance.  Give them a choice:  regular, mandatory code review sessions with their peers, or pair with someone X hours per day.  It might help you sell it to your manager, project manager, etc as well. 

It would be interesting to see results of one vs. the other with productivity and bug count.  I know which my money is on, and which would be less painful for me.