PHB: Use the CRS database to size that market.
Dilbert: That data is wrong.
PHB: Then use the SIBS database.
Dilbert: That data is also wrong.
PHB: Can you average them?
Dilbert: Sure. I can multiply them too.
-----
I kid (sorta). It misses the core issue, why are developers estimates so terrible, 3 terrible estimates don't make a "good" one.
The post hits on some of the points, but IMHO misses a major one. Estimations are based on experience, yet developers are constantly building brand new types of products. If all you built was "blog engines" over and over again, you would get damned good at estimating them. The trick in software is as soon as something needs to be reused over and over again, it is abstracted, put in a library, built into a framework, so you can make your product different (read: build something entirely new) -- and EVERYONE sucks at estimating the cost of building things entirely new.
Think of the (entirely new in 1962) Lunar Module... they thought it would cost at max 350 million. It cost 2.2 billion. Those where very smart people with a major stake in getting the initial number right, but it was just a crazy ass guess because they had NEVER BUILT ONE BEFORE.
The only half-decent solution I found so far is iterative development. Take a feature and break it down i to big rocks. Further break down the big rocks into little chunks - each that you estimate would take you less than a day to complete.
Only after completing your first "big rock" in this way can you use your new data to gauge your velocity and give an estimate for completing the rest of the work that's worth the paper it's written on.
Experimental psychologists have found that decomposing tasks increases estimate accuracy, regardless of how or why the task is decomposed. It's called the "unpacking effect".
http://www.sciencedirect.com/science/article/pii/S0022103103...
I usually estimate that writing the code is anywhere from 10-20% of completing the project.
Some research shows that 1 kloc of code contains between 15 and 50 defects, and that code reviewing will pick up only 70-90%. This still leaves a lot of bugs. I sometime ago wrote up some meta research on estimating code reviewing: http://specialbrands.net/2011/10/24/code-review-in-scrum-xp-...
McConnell's book has a really excellent table of items that are left out of estimates. Nuts-and-bolts things like "API documentation", "deployment scripts", "status emails" and so on.
> This still leaves a lot of bugs.
Right. The classical software engineering theory is to build multiple quality gates and to study them for defects yielded. I recall that inspection stomps everything else; automatic testing came second.
The problem of time-to-fix is subtly different from time-to-release, though. Software with known defects is regularly in use.
The elephant in the room: Debugging. I don't know how many times I've been asked, "When are you going to find that bug?" Sometimes they are very easy. Sometimes they are very hard. For the really hard bugs, you need to be clever, scientific, determined, methodical and LUCKY. I don't know how to know when I'm going to run into some luck.
Absolutely; but I think it's reasonable to assume that a more accurate estimate is a more valuable estimate. You can also track estimate error over time and use that to adjust future estimates.
> The elephant in the room: Debugging. I don't know how many times I've been asked, "When are you going to find that bug?"
The problem is that in any sample of n=1, variability is huge. It's like saying "I am going to pick one person out of the global population. How tall is he or she?"
Well of course I can't know that. The sample is too small. But if instead I am told "we are going to pick ten thousand people at random from the global population; how tall are they in total?" then I can use previously-gathered statistics to give a range of estimates that will probably be accurate.
That's it. Most, actually all, literature on software estimation I've seem ignores this simple fact. It's feasible to estimate cost and time for building houses, even skyscrapers, if you do that all the time. But how long does it take to climb a never-climbed mountain?
This estimate could be derived in a number of ways. By analogy to other mountains, by creating a statistical model of climbing time based on parameters like gradient and climber skill, or by aggregating expert judgements of the mountain's likely climbing time.
A better example of a difficult-to-estimate task was the Manhattan Project. How long would it take to build the first atomic weapon? That was a truly novel problem, insofar as it would require fundamental physics research to solve.
But almost none of our work is of that nature. To be sure, there are unexpected requirements and complexities, but we are almost never performing fundamental research to achieve our ends.
"Fundamental research" is a matter of perspective. If a developer does not know Rails, he must perform fundamental research into building a new blog engine. While the unknowns, and variability, are significantly smaller, they are still unknown until he does the research. If she were to trod off the beaten path, even slightly, he could run into a community known, but developer unknown, roadblock/design flaw that didn't show up in basic research. (ex. A Rails blog engine vs a multi-threaded Rails blog engine)
What will be discovered or invented is an unknown; it may be unknown that it is unknown. Research is basically an open-ended search process. There's no foreseable end-state to base an estimate on -- though there are terminating conditions we can use to end research (ran out of money, made amazing discovery that will be passed to engineers to commercialise, gathered sufficient data to write publishable paper etc).
Take the linked post's example of AIDS research. How long will it take to cure AIDS? There is simply no way to know. We can produce estimates, but because it is a research problem, any such estimate would have to have wildly broad ranges to be accurate ("somewhere between 10 and 100 years").
In cases of pure research, you can't estimate the end-goal. Until it's over you may not even know that there were new end-goals you were unaware of (eg. 3M's Post It notes).
This is the PERT 3-point estimation technique. It's taught in every project management course in the world.
It so happens that almost nobody uses it in practice, because it is a pain in the rear end to do in Excel. It also so happens that I'm working on a tool to make it easy[1].
All I have right now is a landing page, proof-of-concept code and some articles. Oh, and a pile of research papers and books. It's turned out to be a deeper rabbit hole than I expected.
edit: how come "professional" is the only word that was spelled wrong on the landing page? Because Murphy is hilarious, that's why.
That's quite ironic, given the subject of this thread....
One of them is "Why Research Is Almost Impossible To Estimate".
It still might be useful. Use 1 to anchor 3 to anchor 2 and then triple it.
A quote from Michael O'Church I quite like:
Let's say that you have 20 tasks. Each involves rolling a 10-sided die.
If it's a 1 through 8, wait that number of minutes. If it's a 9, wait 15
minutes. If it's a 10, wait an hour.
How long is this string of tasks going to take? Summing the median time
expectancy, we get a sum 110 minutes, because the median time for a task is
5.5 minutes. The actual expected time to completion is 222 minutes, with 5+
hours not being unreasonable if one rolls a lot of 9's and 10's.
This is an obvious example where summing the median expected time for the
tasks is ridiculous, but it's exactly what people do when they compute time
estimates, even though the reality on the field is that the time-cost
distribution has a lot more weight on the right. (That is, it's more common
for a 6-month project to take 8 months than 4. In statistics-wonk terms, the
distribution is log-normal.)
Software estimates are generally computed (implicitly) by summing the
good-case (25th to 50th percentile) times-to-completion, assuming perfect
parallelism with no communication overhead, and with a tendency for
unexpected tasks, undocumented responsibilities, and bugs to be overlooked
outright.
[1]
The point is, you are unable to know the worst possible outcome. Since it will have huge input into your average, your average is therefore useless. Perhaps the project isn't specced fully enough and, during implementation, a dev discovers an ugly or impossible feature interaction. You now have to either cut features or rearchitect another feature, ie the dice come up 10 in Michael's analogy.An example from my background: I work on ml code. A learning algorithm was written in parallel with a particular loss function (essentially, this tells you if your estimates are good or bad). The person writing the spec assumed that a different loss function could be dropped in later. Indeed, this is how the math works on paper. But loss function number 2 required a different data layout between the machines. The vision was writing a new loss function should be one or two lines of code dropped into the middle of a hot loop; the reality was it took almost a month of work.
Unbounded worst cases don't happen on every project.
All estimates are uncertain because there is no knowledge of the future. This is true of every profession, of every project.
When we make estimates we have to accept that they are uncertain and that the degree of uncertainty is governed partly by the problem domain.
1. Estimate the very best possible outcome. How long would something take if everything went to plan?
2. Estimate the very worst possible outcome. If everything that can go wrong does, how long will the task take?
3. Estimate the most likely outcome. Knowing what you do about the client, the task, the tech, etc, how long is it likely to take.
(Point 3 is the normal way of estimating.)
The advantage of 3 point analysis is that you can use the difference between the times to estimate risk. If the best and worst outcomes are similar, then there's little risk of things going horribly wrong. If the best and the likely times are similar but the worst is much longer then there's something that can completely screw up - identify what that is and defend against it. If the likely and worst times are similar but the best time is much shorter, identify why that's the case and try to make sure it happens. And so on.
Better yet, by taking the aggregate best times for a set of requirements and comparing it against the worst, you can get a good view of the overall risk of a project.
Very useful indeed.