views:

203

answers:

6

As a lead developer I often get handed specifications for a new project, and get asked how long it'll take to complete the programming side of the work involved, in terms of hours.

I was just wondering how other developers calculate these times accurately?

Thanks!

Oh and I hope this isn't considered as a argumentitive question, I'm just interested in finding the best technique!

+1  A: 

Good estimation comes with experience, or sometimes not at all.

At my current job, my 2 co-workers (that apparently had a lot more experience than me) usually underestimated times by 8 (yes, EIGHT) times. I, OTOH, have only once in the last 18 months gone over an original estimate.

Why does it happen? Neither of them, appeared to not actually know what they are doing, codewise, so they were literally thumb sucking.

Bottom line:

Never underestimate, it is much safer to overestimate. Given the latter you can always 'speed up' development, if needed. If you are already on a tight time-line, there is not much you can do.

leppie
+4  A: 
Brian MacKay
A: 

This is probably one of the big misteries in the IT business. Countless failed software projects have shown that there is no perfect solution to this yet, but the closest thing to solving this I have found so far is to use the adaptive estimation mechanism built in to FogBugz.

Basically you are breaking your milestones into small tasks and guess how long it will take you to complete them. No task should be longer than about about 8 hours. Then you enter all these tasks as planned features into Fogbugz. When completing the tasks, you track your time with FogBugz.

Fogbugz then evaluates your past estimates and actual time comsumption and uses that information to predict a window (with probabilities) in which you will have fulfilled your next few milestones.

Adrian Grigore
Ah wish we still had FogBugz! We used to use this, but the team didn't adapt to it well so the account was cancelled :(
Curt
+1  A: 

If you're using FogBugz, then its Evidence Based Scheduling makes estimating a completion date very easy.

You may not be, but perhaps you could apply the principles of EBS to come up with an estimation.

bcmcfc
A: 

Overestimation is rather better than underestimation. That's because we don't know the "unknown" and (in most cases) specifications do change during the software development lifecycle.

In my experience, we use iterative steps (just like in Agile Methodologies) to determine our timeline. We break down projects into components and overestimate on those components. The sum of these estimations used and add extra time for regression testing and deployment, and all the good work....

I think that you have to go back from your past projects, and learn from those mistakes to see how you can estimate wisely.

The Elite Gentleman
+2  A: 

There is no general technique. You will have to rely on your (and your developers') experience. You will have to take into account all the environment and development process variables as well. And even if cope with this, there is a big chance you will miss something out.

I do not see any point in estimating the programming times only. The development process is so interconnected, that estimation of one side of it along won't produce any valuable result. The whole thing should be estimated, including programming, testing, deploying, developing architecture, writing doc (tech docs and user manual), creating and managing tickets in an issue tracker, meetings, vacations, sick leaves (sometime it is batter to wait for the guy, then assigning task to another one), planning sessions, coffee breaks.

Here is an example: it takes only 3 minutes for the egg to become roasted once you drop it on the frying pen. But if you say that it takes 3 minutes to make a fried egg, you are wrong. You missed out:

  • taking the frying pen (do you have one ready? Do you have to go and by one? Do you have to wait in the queue for this frying pen?)
  • making the fire (do you have an oven? will you have to get logs to build a fireplace?)
  • getting the oil (have any? have to buy some?)
  • getting an egg
  • frying it
  • serving it to the plate (have any ready? clean? wash it? buy it? wait for the dishwasher to finish?)
  • cleaning up after cooking (you won't the dirty frying pen, will you?)

Here is a good starting book on project estimation:

http://www.amazon.com/Software-Estimation-Demystifying-Practices-Microsoft/dp/0735605351

It has a good description on several estimation techniques. It get get you up in couple of hours of reading.

Max Kosyakov
Just thought I would say that I have this book, and for my purposes it's not very practical. It felt almost academic. But maybe some other folks got some value out of it.
Brian MacKay