Tenet of XP: Paired Programming

In the downtime on the project, I wanted to talk about a tenet of XP programming, which is paired programming.  The general idea is that if we worked in pairs, we could bounce ideas off of each other.  Code would be better, because we could double-check each other's thought process, as well as literally checking the code.

In addition, it helps with those who are strong in one area and weak in another, because the other person could be the opposite way.  So, the concept of pair programming can be very helpful.

But this has a negative connotation; it could be seen as inefficient; that is a lot of work for the two to handle, instead of both working on the project.  Most people have the philosophy that more time coding means more of the project is done; but what XP'ers are saying is that by ensuring you do it right the first time, and testing that it does work ahead of time, you ensure that the code will not have to be fixed later (unless the user changes their mind that it affects that piece of code), and it will be well refactored, making the design easier.

Still, it can be hard to work with someone, especially with conflicting ideas/opinions.  I like the idea of working together; however, if paired programming is not for you, there are other agile methodologies that may be more suitable.

Published Friday, October 20, 2006 10:00 AM by bmains
Filed under:


# re: Tenet of XP: Paired Programming

Tuesday, October 24, 2006 5:00 PM by dsmyth

hi, pair programming is an interesting idea but where I feel it comes into it's own as a programming approach is when you pair program with a doman expert/customer/someone who knows the business requirements.

It's ok having two programmers working in pairs as a sharing knowledge/learning exercise but the quality of the code doesn't necessary improve if two programmers work on a piece of functionality.

If both programmers share a wrong idea of the requirement or if both make the same assumptions then quality won't necessary improve.

I've pair programmed with a domain expert and it works well. I'm all for it!