Algorithmically Estimating Developer Time
leftnode.com
leftnode.com
Now, how well these methods work depend on the project.
If you're writing a CRUD webapp from scratch and you've got a good framework (RoR, symfony, etc.) you can probably estimate with high precision.
If, on the other hand, you've got some A.I. software that fell off a UFO and your mission is to get it working as part of a larger system, it's hard to estimate.
Maintenance work is hard to estimate for a number of reasons: for one thing, an existing system has a large number of requirements baked into it that you're not aware of. It helps a lot if the last guy left you so some tests but you can't always choose that. ;-)
Even "predictable" projects can become unpredictable if your 'client' changes requirements too much, or if the requirements aren't well specified to begin with. That's one reason I don't do fixed price jobs for low rollers -- I'd rather do anything else, like milk cows on somebody's dairy farm.
The theory behind BDUF is that you can come up with an accurate design, then come up with an accurate estimate for constructing the design, then go build it. It doesn't work because most software development is done in R&D mode, which you can't design or estimate accurately.
- use historical data (keep previous scopes and estimates and read them back in the future)
- break down into chunks
- use planning poker: question your assumptions (oh I though the smtp was already available etc)
- estimate tasks in relative fashion: compare one to another, in the same project, or compare to previous projects (we're better at comparison than absolute estimate)
- use historical data (did I mention it already?)
If I can share something: USE HISTORICAL DATA! It just works.
As well another tip from Mike Cohn (most of above comes from him): always use ranges when estimating.
There's also a free site for playing the game. It'd be nice if this somehow tied into my Pivotal Tracker account to actually set the points once agreed upon (and to also pull down the stories that don't have set points).
How it works is you sit in a meeting, and for the first time hear about a new feature, for example "user wants to click one button to see all historic events grouped by week". The questions that arise are usually along the lines of:
* is this data available? we're not sure * is this particular part of the system messy and hard to change? we're not sure * are we really sure this is what the user wants? _all_ historic events? we're not sure
And then, you estimate. Which means there is a lot of guessing and either/or going on.. and you churn through a whole bunch of stories in one sitting.
Sometimes I wish for a more strict process with more of a technical proposal for changes. Either that, or to get involved with the business side right when they start discussing the new feature, to have a change to look into it/think about it from a technical point of view, while it's getting worked out to a user story.
Either way, a couple of years ago I found http://www.processdash.com/ which discusses the process and has a download for managing it, too.
Anyway, it's a free download and it does just what you mention in your two last points: use historical data and compare like tasks.
The takeaway for me is that good estimation is possible, and that by tracking those numbers you can improve your own estimation skills.
Some other reading material that I found useful in this area was Evidence Based Scheduling (http://www.joelonsoftware.com/items/2007/10/26.html) and Software Estimation (http://www.stevemcconnell.com/est.htm)
This is almost basic probability theory.
http://en.wikipedia.org/wiki/Central_limit_theorem
Estimations could be viewed as random samples with some distribution. The total is the sum of individual estimations. The sigma of the total is less than max(single task estimation sigma) * sqrt(number of tasks).
30 estimations with 0.5 day sigma gives us total sigma 0.5 * sqrt(30)=3 and 96% confidence bounds of (30 - 3 * 2)..(30 + 3 * 2) work days.
Most of the time you will see 30+-3. ;)
Unless you find a task that does not break into one day. Say, with low estimate "tomorrow" and high estimate "half a year". ;)
Your velocity maps points (assumed difficulty) to real time. Once you've done a few tasks - some of which will have involved massive yak shaving - your velocity figure starts to take in to account estimating for unknown problems.
Additionally you're meant to estimate in 'points' against other tasks - was this as difficult as x? And never never ever use hours for the estimation.
So you should take into account uncertainty and importance.
First you should do all uncrtain and important things, then certain and important and, finally, certain and less important. And your velocity will vary greatly then, very slow at the beginning and fast at the end. It is almost meaningless, I say.
New part of stack, new deployment platform, new person in the team, extra client, thing you've never done etc => increased cone of uncertainty => extra time.
So to check the tasks I've completed I issue a command like: "./show done PROJECT_NAME"
Not sure if this is the most productive thing but my productivity has really improved since I started doing this.
Why is this such an acceptable premise?
You're right, no one can force you to keep working. But typically at that point the client owes you money, you have no tangible collateral in hand (like a car) and while you might be able to force him to pay by suing him, it's generally going to be a lot cheaper in the long run to eat the hours and keep the client. If the project is grossly underestimated and the client is unlikely to provide more large projects in the future, then quitting the project might make more sense than continuing. In which case, depending on the nature of the contract and the project, the client might end up suing you.
Before beginning the Estimation process, it's best to talk with the prospective customer about Cone of Uncertainty first; it helps to set a proper context for later execution of the project:
More info http://www.fogcreek.com/fogbugz/evidence-based-scheduling/ and http://fogbugz.stackexchange.com/questions/4396/how-does-evi...