The next practice I want to discuss is a very important one
in XP, and also one of the scandal, controversial, and it's
the practice of pair programming. What does it mean? It means
that all production code is written with two people looking at one
machine. And not that they're, they're working with one keyboard and
one mouse or they're not just interfering and writing on each other's
code. And the way in which that happens is by playing
different roles at different times. So the two developers alternate between the
role of programming and strategizing, where strategizing means, for example,
looking at the code that has been written and thinking whether
that would work. Or what other tests that are not there
might not work, given the way the code is being written.
Or maybe looking at the code from a, you know, slightly
detached perspective and trying to figure out whether the code can
be made simpler, more maintainable, more efficient. And interestingly, there are
measurements, there are studies that
suggest that development productivity with pair
programming is similar to that of two people
working independently. And that answers one of the
main objections against pair programming, which is why
should I put two developers together, which is
going to cut their productivity in half. It is
not. Studies shows that that does not happen.
And that the resulting code can actually benefit
from the fact that two developers are working together.