Tuesday, May 8, 2007

The Secret To Software Estimation: Lie Like Scotty

I see that Scott Hanselman posted about software estimation. Excellent advice, as usual. Here's my somewhat less serious advice, in the form of a quote from "Star Trek III: The Search for Spock":


Kirk: "How long to re-fit?"

Scotty: "Eight weeks. But you don't have eight weeks, so I'll do it for you in two."

Kirk: "Do you always multiply your repair estimates by a factor of four?"

Scotty: "How else to maintain my reputation as a miracle worker?"

Kirk: "Your reputation is safe with me."


I always multiply my initial gut-reaction estimate by four. So if I think it'll take a day, I tell the client it will take a week. If I think it'll take a week, I tell the client it'll take a month. This works really well for a couple of reasons:


  1. My initial gut-reaction estimate is almost always wrong by a factor of two or three.

  2. When I tell the client it's going to take a week and it takes three days, they're thrilled.


The funny thing about all this is that it still works even if I tell the client what I'm doing beforehand. Weird but true: I tell them a week, they know I actually think it'll take a day, but they're still happy when it's done in three.


Of course, this really only works after I've established a track record of delivering solutions to hard problems. And my miracle worker reputation gets a bigger jump from not telling them beforehand, so I usually don't. Except for the ones that read this blog.


  1. This also works because you probably tell the client you are only going to charge them for the hours you actually work anyway.

  2. Well that's a good point. And of course I *do* only charge them for the hours I work.

  3. Garage Sales and Garage-Sale Quality Code [Via: Scott Hanselman ] MooTools 1.1 Released [Via: Dion Almaer...

  4. The problem with over-estimating is that as a practice that's encouraged it sort of bubbles.

    Recently I got asked "How long to add this link to our web site" (or something equally trivial). In my head I went, "Um, like, ah, Five Minutes". Then I went, "...but, I'm not going to have a spare five minutes this week, and it's five minutes to add the link, but it's also ten minutes just to open visual studio, and five minutes to test locally, and five minutes to fix the typo/spelling mistake, and then thirty minutes to do a build, and thirty minutes to get it into the staging system, then a little wait to have the customer confirm that it's OK, then thirty minutes to get it into production". So... it'll probably knock out most of a day. But, if I think it's actually going to take a day, then I should say a week, because I'm demonstrably always overly optimistic. Besides, at least a week will *pass* (while I'm not working on it) before I get the opportunity to even look at it. So I say "Look, it's pretty easy. It'll take five minutes to add the link. A day to get it into production. Say a week."

    Then the manager gets my estimate, and knows that he should treat me as being too optimistic, so he hears a week and doubles it. Then he tells the customer that it will take at least two weeks.

    The customer hears that it will take two weeks to add a link, and they think "There is *no way* we're going to pay for that", so they cancel their 'order', then they cancel their account, and the whole system functioned to lose business.

    I actually watched exactly this happen last year, and I was really pissed off. Because my customer lost one of their customers because one of their middle managers likes to think that he "under promises and over delivers". It was the smug look on his face that pissed me off. He lost business by under-servicing his customer and covering-his-arse, then sat there with a proud look on his face.

    Of course, I didn't know that any of this was going on. If I had have known that it was *really* going down like that, then I could have had that link in production in Five Minutes! Promise*.

    * Promises are estimates only and do not constitute a guarantee. Some network transfer speed required. Link may contain a spelling mistake.