Pair programming

August 22, 2008 at 3:35 pm | Posted in Uncategorized | Leave a comment

Let’s say that two programmers are tasked with creating a computer program. . . say, an e-commerce website. An “obvious” solution would be to split the tasks into two. Have one programmer do,say, the shopping cart and the other programmer do, say, the billing system. Most laymen would reason you can halve your time by doing this. In the real world, though, this doesn’t happen. Programmers can (and often do. . .) step on each other’s toes when writing software, especially as the program begins to get more complex.

Interestingly, the counter-intuitive solution ends up being the more efficient one. Pair programming handles things in the reverse way. . . You pair two programmers together on the same terminal. One programmer writes a unit test and the other programmer is challenged to write code that make the test pass. The unit test guy looks over the second guy’s shoulder during the coding process and suggests another, more expedient method that the second programmer didn’t consider. Or he may ask him re-word variables or function calls in the code that seem unclear to him. if the code makes sense to two people, it is likely to make sense to others as well. Amazingly enough, both programmers together often finish the problem in LESS than half the time. There are a few academic studies that confirm this (according to “Code Complete” anyway).

The idea, of course, is often simple solutions often win out over complex ones. Less code means less complexity which means fewer bugs. Quote-unquote “hard” problems can actually become doable when you put two heads together.

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: