in reply to Extreme programming... in perl?

The other benefit of having good test coverage through unit tests: they can give you a whack with the clue stick, and tell you when not to be programming.

On a two hour layover between flights earlier this year I fired up the laptop to get in a bit of coding time, and to try out some ideas I'd had on the first leg of the trip. After about 20 minutes of typing, I fired off my test driver, which at the time would run through about 40 test scripts, reporting whether each passed, failed, or failed to run. (Each test script covered several tests; giving an effective coverage of about 120 tests.)

16 of the 40 tests failed.

Pause... Think...

Hm.. I hadn't eaten in a while, had just gotten off a bumpy flight, and was anxious about the weather on the next leg. Plus I'm sitting on the floor of the terminal in San Diego at one of the two available AC outlets, the place is packed with travelers, and kids are crying. Maybe this isn't the best time to be coding... If I keep going, I'm just going to add a bunch of bugs that I'll feel compelled to fix on the next flight, at altitude, where the air is a bit thinner and my brain won't be working as well.

Back out the changes, shut down the laptop, and trundle off in search of food.