c o d i n g f r o g s

croaking about programming, programming languages, software engineering, and the business of software

3Aug/110

How Long To Dig A Posthole?

Some days ago at work I asked a friend what he'd done over the weekend.  "Dig a posthole," he replied.

That seems an odd answer since there's quite a bit of time in a weekend.  He followed with, "How long does it take to dig a posthole?"

When my wife and I moved into our first home, we had two young kids and no fence around our yard.  After we'd saved the money, one of the first purchases we made was to buy materials to build a fence, which included some 40 or so fence posts if I remember correctly.  Each of these needed to be set a good two to three feet deep in a posthole and set with concrete.

I say this so it is clear that, while I'm no expert, I do have some experience with postholes.  If you have a good shovel and a good posthole digger, even someone of average fitness like myself can dig one in fairly short order.  "Oh, maybe 20 minutes," I replied.

"I spent three or four hours digging a posthole on Saturday," my friend countered.

Ah, yes.  I forgot that digging a posthole takes 20 minutes, except when it DOESN'T take 20 minutes.  You might be digging in clay, which is much heavier and will wear you out faster.  You might hit bedrock or caliche.  You might encounter a rattlesnake den.  Or, like my friend did, you might simply run into a series of large, flat rocks, one on top of the other, right where you need the post to go.

So, a posthole takes 20 minutes to dig, unless it takes an hour, or half a day, or longer.  A shovel and a posthole digger are the right tools for the job, except when they aren't.  And when they aren't, you might need a backhoe-mounted auger, or dynamite.

The point is, you can't ever tell for sure if your posthole will be quick or slow until after the digging has begun.  Unless you are an accomplished geologist, you don't know just by looking at the ground where you want the post to go whether this posthole will be quick or slow.

Writing software is much like this.  The very nature of our job means that most of the time we are, to use the metaphor, digging where nobody has dug before.  We're always inventing new things.  Given any development task, we can give our best estimate as to how long the task will take based on our past experience and our understanding of the nature of the task.  But this estimate is much like the estimate of how long it takes to dig a posthole:  You don't know what you are going to uncover until you start digging.

Unfortunately, sometimes software management misunderstands this.  There's sometimes a belief that the estimates are much more accurate than they really are, and that missing an estimate is an inexcusable offense.  But this would be like getting upset with my friend because there were rocks in the ground where the posthole was supposed to go.

Failing to know that there are rocks underneath the ground shouldn't be a sin.  Ultimately, my friend got the posthole dug anyway.  That's what we do, too:  We encounter the rocks, we figure out how to get them out of the way, and we continue to deliver.  Hitting all your estimates all the time isn't the important part.  Delivering useful software is the important part.