Original URL: http://www.theregister.co.uk/2005/12/04/putman-estimates/

It’s anybody’s guess

Estimates, not guesses, are key to controlling development

By David Putman

Posted in Developer, 4th December 2005 18:26 GMT

Comment If you were to ask me how long it takes me to get to work each morning, I would tell you, “It usually takes about an hour, door-to-door.” I’m pretty sure most of you could also give a reasonably accurate description of your journey to work, too.

It’s worth bearing in mind the use of the word ‘usually’ in my answer. It does usually take me about an hour to get from my home to my office but occasionally, too occasionally for my liking; it can take a little longer. Not withstanding mishaps, however, my experience tells me the journey will be about an hour and I can plan to leave home about an hour before I need to be in the office and expect to be there on time.

This is because I know to a high degree of certainty the value to assign to most of the variables involved in the journey. I have experience of travelling to my hometown station; riding on the train; and getting from the destination station to the office. In other words, when you ask me how long it will take me to get to work I am estimating under conditions of certainty.

There are three conditions under which we can attempt to estimate anything and these are certainty, risk and uncertainty. We’ve already discussed certainty and under these conditions in software development, we would be familiar with using the technologies and we would have experience of the domain too. Estimating under these conditions is quite simple and relatively easy.

However, unlike with my train journey, it is very unusual for software developers to be asked to estimate from a position of certainty. To gain a competitive advantage, organisations need to be delivering new and, hopefully, unique functionality. "New and unique" is, by definition, something we have not done before and have no experience of. It is, therefore, unknown.

When we’re trying to estimate with unknown variables, we are estimating under conditions of risk. Under these conditions, we are certain about some things but not about others. For example, we might be planning on redeveloping our existing application in a new language. Obviously, in this case, we’d be familiar with the domain but not with the technology, so that is where the risk would arise. Estimating under these conditions is complex and difficult.

The very last condition we might be asked to estimate under is uncertainty and this is where we are unfamiliar with both the domain and the technology. It is very tempting to leap into this type of project just for the learning experience or the sheer thrill of doing something novel but, ultimately, it is doomed to failure. These are chaotic conditions to say the least and any estimating you did here would only be guesswork.

A frequent mistake made by developers and project managers alike is to imagine that they are estimating from a position of certainty when they are really estimating under risk or uncertainty. It is a human failing to believe you know more than you actually do or to over-extrapolate from your experiences. Guessing is easier and requires less effort than making a proper estimate. So, what should we do when we’re asked to produce an estimate and we are operating under risk or uncertain conditions? Well, it may sound obvious, but if we can bring the risky or uncertain variables into the zone of certainty, we can estimate with confidence.

The first thing we can do is to break our requirements down into very small sections; or stories as we call them. This on its own makes things much easier to understand and estimate. We might then find that we understand many parts of the problem and there are only a few small items left that we don’t fully comprehend.

The second thing we can do is a thing we call ‘spiking,’ which means driving a metaphorical spike right the way through the heart of the requirement until we have enough knowledge to estimate it with certainty. We can experiment, if you like.

But it’s not enough just to allow the developers to go off and experiment on an ad-hoc basis whenever they decide they don’t know enough, or haven’t the confidence, to produce a reliable estimate. Spikes also need to be estimated.

Each spike should have a set time limit, at the end of which the developer should be able to produce the estimate for the original requirement. Without this discipline, there would be no way of determining the end of your planning period.

It’s very common now to engage in two-part contracts with software developers; the first part being a requirements gathering and analysis stage culminating in a formal build proposal. This is the ideal time for spiking to take place too, so that when you deliver your proposal you are as certain as you can be of the figures you are proposing.

Of course, producing the estimates is only half of the story. Production needs to be continuously monitored, the second part of the contract, so we know whether we are going to reach our deadline. We can measure the ratio of real-time in man-days against the estimated work that actually gets completed. If we do this on a team basis, we usually find that individual inconsistencies cancel themselves out.

For example, we may find that each week we complete stories whose estimates add up to 30 days. Regardless of how many real man-days it took to deliver on those estimates, if the team doesn't change and we have 300 days of estimates for the whole project, we can estimate that the whole project will take around ten weeks, not counting holidays, sickness, etc. As long as the ratio of real to estimated man-days remains consistent, we have a good idea of when we will deliver.

If the ratio starts increasing (i.e., the delivery date is receding into the future), we need to take action and that usually means a customer decision to either: change the date (unlikely), add resources (unlikely too) or (preferably) alter the scope (leave out some lower-priority functionality).

So, in summary, there is no need to guess when you’re estimating, you can reduce uncertainty and risk by breaking your requirements down into more manageable chunks and experimenting to remove any remaining uncertainties. You should also monitor the gap between your estimates and reality as you go, taking corrective action where necessary (that is, in good time). ®