I use a mechanism I call "auto-padding". It works like this:

  1. Break tasks into the smallest reasonable chunk you can -- if you can't measure the effort required in under a few hours (I use 6), it's not broken up enough.
  2. Estimate the number of hours for each task.
  3. Add up all the hours.
  4. Now, define "a day" as 6 hours: divide your total hours by 6 to get the number of expected days:
    • Always round up
    • For projects longer than a few weeks, define a week as 4.5 days: divide your day count by 4.5 to get the number of weeks
    • When you have your weeks or days number, but you must supply an estimate in hours, use the business standard values and multiply back out: if you have a weeks number, take $weeks*40 (std 40-hr week); if a days number, take $days*8 (std 8-hr day).

Breaking your project into smaller tasks helps make your estimates more realistic.

Defining days as 6 hours and weeks as 4.5 days (of six hours each, note) gives you an automatic fudge factor that takes into consideration much of the unforseen events, meetings, vactions, sick days, and so on.

As an example, say I have the following task estimates:
TaskHours
Implement foo5
Implement bar6
Implement foobar3
Implement barfoo6

I start with 20 total hours. I divide this by 6 to come up with 3.33 days -- I never give estimates in partial days, so I round this up to 4.

I've found estimating in this way to be reasonably accurate, as it accounts for "productive hours" rather than "work day hours". As a result, I often get finished a little early: in the above example, there's a good chance I'd finish a day early.

This gives me an opportunity to do more testing, clean up one or two things I thought were ugly but "good enough", etc. It also means I work a 40-hour week (usually), can take a leisurely lunch and regular typing breaks, and am able to spend some time reading PerlMonks -- but I still turn my work in on time.

<radiant.matrix>
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet

In reply to Re: OT-ish: Estimating time to code by radiantmatrix
in thread OT-ish: Estimating time to code by kwaping

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.