Sunday, January 28, 2007

Psychology of Extreme Programming

Converts rabidly follow Extreme Programming not because it is a good design/development methodology (though it has some good idea), but because it is good to developers. XP's methodologies cater to the fact that software engineers are people with foibles and attention spans, just like everyone else. Each of the tenets of XP help keep people motivated, which is key to producing a good product.

Pair Programming

Developers' lives are filled with distractions. When Joe Developer wants a break from programming he is already on a computer with easy access to his email, the news, or his favorite blog. When he is paired with Jane Programmer they both have a reason to keep working. Joe doesn't want to check his email for the 17th time in the past hour while in front of a coworker. Instead he stays interested in his work because the comradeship of the pair satisfies his need for human interaction that email, etc. was acting as a proxy for.

Short iterations

By developing in iterations, John D. and Jane P. always have a concrete near term goal that matters. On traditional long term projects there is an interminable period, between the excitement of the start of the project and the concreteness of shipping at the end, where ennui can set in. By breaking the project up there is always an immediate goal that they can focus on.

Unit Tests

Besides the obvious result of testing the code and hopefully producing a higher quality product, unit tests provide immediate feedback. Just as file transfer indicators, like the silly flying paper on Windows, keep users aware that something is happening, unit tests provide evidence that the program is still growing. Every time Jane P. runs unit tests she gets a sense of gratification that something is happening, even if it is just another bug to fix.

You Ain't Gonna Need It

This principle helps in two ways. First, it reins in the tendency to be an architect astronaut. Second, it keeps Joe D. from being overwhelmed. When Joe starts thinking about how the Tove is going to need to work in the Wabe and that the Borogoves will need to be Mimsy, he gets paralyzed by the daunting complexity and does nothing. However, when he applies the "You Ain't Gonna Need It" principle - o frabjous day - he is able to write beautiful code which later, when he really understands how to make the Tove Slithy, he can.

Final Thoughts

I could go on, but I have already gotten silly enough for one post. The fact is good software is written by good people doing good work. Any methodology that keeps Joe D. and Jane P. motivated and on task will likely be successful.

No comments: