Testing In Principle: Stepping Empty
Comments: 1 - Date: July 16th, 2008 - Categories: t'ai chi
In tai chi we are taught to “step empty”, to place the foot on the floor without committing any weight or energy to that foot. Only when the foot is flat do we shift our wieght. This way we remain single-weighted (another principle for another post) and balanced, and keep our options open about what to do with that empty foot, either shift into it, leave it empty, or move it without disrupting the rest of our body.
To illustrate: Which two animals habitually step empty? Some common guesses are cats and tigers, because they have soft footfalls. This is not correct. Empty is not the same as soft: cats tread softly, but they also jump a lot, which obviously means you will land with weight. Tigers have very heavy tread, though they appear lithe. Other guesses were birds (they have to jump up to fly, and they have to land, though perhaps softer than cats), and gazelles (the leaping again). Not dogs, hippos, wildebeest. Here’s the first animal: the full-grown elephant habitually steps empty. Why? With so much mass, its bones cannot withstand a hard fall, so it takes very few chances with its footing. Even though the likelihood is relatively small that it will step on unstable ground, the consequences could be dire, so it moves deliberately. By the way, this is why it’s no great trick for the circus trainer to put her head under an elephant’s foot. No elephant will step on such an unstable surface. (Notice I said “full-grown elephant” - when they are small elephants can run more because their mass is not so great. Even full-grown elephants run on occasion, but not habitually.)
The testing lesson here is that there are times when the project or the testing has the characteristics of an elephant, and the risk then is that any fall will really hurt. When failure is expensive, even when unlikely, step empty. Make sure you have a recovery plan in place in case the system crashes, so you can retain data, system state, and configuration. Make small controlled changes so that it is easy to trace the variation that caused unexpected behavior. Test a new area lightly at first, then commit more and more effort to it as it bears the weight of scrutiny. Then it will become a new trusted base state and you can step again.
So now we have seen one risk model: a failure, though unlikely, will really hurt, so step empty. The other animal has the variables swapped around. Every step may be onto unstable ground, so that even though it is light and durable, the animal has so many opportunities to fall that it confirms every step. Give up? It’s a pack mule. The reason that mules were used in the Grand Canyon, with its treacherous gravel switchbacks and a mile to fall if you put a foot wrong, was that horses weren’t careful enough and kept getting themselves killed. The peculiar gait of a mule is from lifting one foot at time and putting it down in its new place before shifting any weight, and shifting back and replacing the foot if there is insufficient stability. And the classic pose of the mule resisting moving forward another inch, despite all the tugging and kicking and cursing? It can’t find a trustworthy place to step, so it’s not going anywhere.
In terms of testing, we can be like mules by being prepared to find an alternate route if our first step is blocked, to look for traction in an app, and finally if in our professional judgement we can’t move further, we stop and say “no” to requests to continue down a dangerous or unstable path. When I am testing a flaky app that has lots of failure potential, and I want it NOT to crash, that is when I step empty and set all my variables to normal values, follow the safest path to the destination, and present as little load as possible.
Comment by AlexM - August 16, 2008 @ 5:33 am
Your blog is interesting!
Keep up the good work!
Leave a comment