Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law
Most people struggle with estimating the time it takes to complete tasks.
Oh, how that makes them nervous...
Deadlines creep up unnoticed, and they over-insure themselves by more than 500% just in case. But it's still not enough.
We hear mumbling instead of actual numbers, a common problem with developers. And managers try to impose "deliberately inflated deadlines" to promise something more acceptable to the clients - a common disease in management.
Personally, and I'm sure this resonates with many of you, I hate questions like "When will it be ready?" But they’re crucial at any stage of a project that’s meant to be under control. So, how can we realistically estimate time to complete particular tasks? Let's break it down.
Step 1: Understand the Requirements
If you don’t know the ship’s destination, how can you tell how long the journey will take?
Start by identifying all the work that needs to be done within the project.
This includes, for example, functional and non-functional requirements. Sometimes it’s tough to capture everything at once, so this process may need to be iterative. Include time for meetings, reporting, communication, testing, and other key activities necessary for project success.
Step 2: Order the Activities
Next, list all defined tasks in the order they should occur.
At this stage, there’s no need to add estimates for how long each task will take. However, it helps to mark important milestones. For example, you may need documentation for another system component before integration begins.
Step 3: Risk Management
At the project’s start, conduct a brainstorming session to identify risks. Assuming your project has no risks is naive — every project has risks. If you don’t see them, you’re likely looking in the wrong direction.
When risks are not identified and measured, it means that you no longer have control over the project and the time it takes to complete it. You rely on luck — that these risks that you have not thought about can materialize and increase the time it takes to complete the project or spoil the project.
Make a list of all potential risks, assumptions, exceptions, and limitations.
Step 4: Make the Estimates
Now begins the actual estimation step. There are several methods of estimating time:
Expert Judgment
This approach relies on evaluations by experts, either individually or in groups. They estimate timelines based on experience. Then, you can average their estimates, discuss, and reach a consensus. Involving experts adds accuracy and validation to your estimates.
Three-Point Estimating
This method is both simple and widely used. It involves identifying optimistic (O), pessimistic (P), and realistic/most likely (M) estimates.
Values for P, M, and O are set by asking questions like: "How long will this take if everything goes smoothly?" and "What’s the worst-case scenario?" The final estimate is calculated using the formula: (O + 4M + P) / 6.
The result of the calculation gives a close realistic estimate. This formula allows, on the one hand, to take into account possible positive and negative scenarios and, on the other hand, to "smoothen" their impact and obtain a more realistic assessment value.
Cost of Quality
This is a fascinating technique. Here, you estimate the time to develop functionality without considering bugs, assuming “perfect” software (though such software is a unicorn). Then, you add time for addressing bugs and issues to bring it closer to that perfect state.
For software quality assurance costs, you might analyze areas such as:
- Defect prevention activities
- Cost of QA
- Fixing internal errors
- Addressing performance problems
- Resolving external integration issues
- Installation and configuration based on the real environment
Analogous Estimation
This method relies on past experience. Look for analogies and find similar completed tasks or projects.
Decompose the project into tasks the team is familiar with and has handled before, estimating based on previous results. For instance, if a previous website project cost $8,000 and you’re developing a similar one, estimate this new project around $8,000.
Bottom-Up Estimation
Similar to Expert Judgment, but here, estimates are made for each project component separately, then summed up.
By piecing together an estimate bit-by-bit, knowing how much time each part will take, you get an overall estimate while accounting for communication costs and risks.
Parametric Model
This method builds a parameterized forecast model based on past data, metrics, and statistics. It’s a blend of Three-Point Estimating, Bottom-Up, and Analogous Estimation.
For example, if last week two tasks took two hours, and this week you have four similar tasks, you might estimate eight hours.
The flexibility of this method, grounded in historical data and industry standards, makes it one of the most precise.
Conclusion
It’s challenging to interpret requirements perfectly, and stakeholders often add or modify specifications. If you’re unwilling to fully understand the requirements or decompose the project, you’ll end up with estimates varying by random multiples of pi (3.14…) or e (2.71…). Inaccurate estimation often comes down to a lack of attention to detail.
Estimation takes resources, sometimes significant ones, but detailed attention can yield more accurate completion predictions, especially with an experienced team.
We need to teach accurate estimation skills in the IT field. It’s vital for the project’s success, the team’s success, the final product, and of course, customer satisfaction. Yet teaching attention to detail isn’t easy—it takes time and effort.