Open minds leads to freedom

Communicating my thoughts on software development

The power of pair programming

Posted by rnaufal on January 14th, 2010

Some weeks ago I started doing pair programming with some co-workers basically for two things:

  1. code some tasks of an user story
  2. get familiar with a new software code base

I haven’t had an opportunity to put this technique in practice a lot before, but I can say it was extremely important and benefit for the project. Sometimes I was the driver and sometimes I was the observer. The driver is the person who starts coding and the observer is who starts doing the code review. That point is important: code review.

Pair programming encourages the review of the code. Perhaps you won’t have an opportunity to refactor some code as you have when you are pairing with someone. I think code reviews are important because:

  • Reviews increase code quality, because there are 2 people thinking at the same task at the same time.
  • Refactoring areas arise in the design where improvements are needed
  • When you have the strong support of an IDE (as Eclipse), some refactorings (extract method, extract class, introduce parameter) are highly automated
  • Code is more read than written, two people reading the code can understand a lot more about the code base
  • New ideas arise because of different point of views
  • Questions can be solved by the sum of knowledge of the code base

And you? What’s your experience with pair programming?

Share and Enjoy:
  • Twitter
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • FriendFeed
  • Google Buzz
  • MySpace
  • Slashdot
  • http://atitudereflexiva.wordpress.com/ Rodrigo Martins

    I like pair programming. With pair programming, both co-workers increase their business and technical knowledge.

  • http://atitudereflexiva.wordpress.com/ Rodrigo Martins

    I like pair programming. With pair programming, both co-workers increase their business and technical knowledge.

  • http://rosshuggett.blogspot.com Ross Huggett

    Nice post. My experiences are that it’s more effective than a separate code review.

  • http://rosshuggett.blogspot.com Ross Huggett

    Nice post. My experiences are that it’s more effective than a separate code review.