Why I Think XP Works

I gave a talk at PyGTA last night on what we're doing to integrate Python into the undergraduate curriculum at the University of Toronto, and what I'll be doing with my PSF grant to promote Python in science and engineering. I was pleased at how many people turned out, given the weather, and thought everything went well... ...someone asked what I thought about Extreme Programming (XP). It was late, I was tired, so I ran off at the mouth a little. (I do that.) Here's what I should have said:
  • I've never used XP on a real project, so take my opinions with a large grain of salt.
  • That said, I'm sceptical of the claims made about it, partly because they fly in the face of my personal experience, but also because the Scot in me instinctively mistrusts anything that's hyped as hard as XP has been.
  • Most importantly, I don't think that the particular practices that make up XP (pair programming, on-site customer, stand-up meetings, etc.) are the real reason it's successful. The reason is that teams that adopt diametrically opposed methodologies, like CleanRoom, also see their productivity go up. One possible explanation is that common practice is the worst of all possible worlds, and any change at all would be an improvement. (There are days when I believe this.) A more likely explanation is that what really matters is deciding that you want to be a better programmer. If you make a sincere commitment to that, then exactly how you get there is a detail. It's kind of like dieting: Atkins, South Beach, macrobiotic, seasonal, or fruitarian is secondary to being sincere about eating better and exercising more.
This hearkens back to a point I made a couple of times during my talk. It's easy to make students jump through hoops in a course. What's hard is convincing them that jumping through those hoops after the course is over really will make their lives better. The best way I've found so far is to bring in experienced programmers who are doing exciting things, and have them say, "Comments, version control, test-driven development..." I'd be interested in hearing what other people do to make the case.