DEV Community

Cover image for ⏰ How to nail time estimations

⏰ How to nail time estimations

Carmen Chung on November 06, 2020

As a software developer, getting time estimations for building features is often a tricky part of our daily work. One Sunday last month, I finished...
Collapse
 
jonrandy profile image
Jon Randy 🎖️

From 25 years of development experience, I've found it is best not to estimate - at all. Estimation just wastes time.

This is very true:

"Estimation is ultimately a futile effort. Software, more or less, is like writing poetry. Or solving mathematical proofs. It takes as long as it takes, and it’s done when it’s done. Perfect, or imperfect, estimation won’t change how long it takes to complete the work. If that sounds horrible to you, then go do something else."

(quote is from here)

Collapse
 
carmenintech profile image
Carmen Chung

Hmm that's an interesting approach. So if that's the case, what do you tell product managers, your customers, or management, when they ask you when the feature can be launched?

Collapse
 
jonrandy profile image
Jon Randy 🎖️

At work, I tell the PMs that I don't know, they then put a time on it themselves, and it just takes as long as it takes - I'm not going to waste my time estimating - or worse, rushing out poor quality products to meet arbitrary deadlines.

Outside of work, all my clients for freelance work have always been happy with just seeing progress from time to time - and a good final result when it's ready

Thread Thread
 
carmenintech profile image
Carmen Chung

Interesting! I think you're really fortunate to work in a place where you can take as much time as you need. In my experience, it's not very common for most workplaces - even if it's just because other colleagues (sales, communications, marketing, customer support etc) need to know when something will be launched so they can prepare their end of the work. Management in particular, I've found, need to give at least quarterly updates to the Board on how things are progressing. You're super lucky! :)

Thread Thread
 
jonrandy profile image
Jon Randy 🎖️ • Edited

You can do it at any workplace. Stand up for yourself. If you produce good work you'll be valued. Don't waste time on activities that are detrimental to the production of a good final result.

Deadlines and being held to estimates almost always results in inferior code which ultimately makes the project take longer as there are more issues and technical debt to address - not to mention the time spent estimating!

Thread Thread
 
carmenintech profile image
Carmen Chung

I agree spending time estimating can be annoying, and that badly-estimated deadlines are very often dangerous, and detrimental to code quality.

I think we'll need to agree to disagree on not doing estimates at all though. I think being a good team player means keeping the rest of the company informed of when they can expect a feature to launch. In my experience, partnerships needs to prepare workshops for partners (and customers, in my current situation), communications/marketing needs to get media releases ready, and management needs to inform investors/the Board about how their money is being spent. It's unfair on them to suddenly spring a feature launch and expect them to scramble to get their work done, especially if there's time-sensitivity to what they do (i.e. they need to get their media releases/workshops done within a week of the feature being launched).

But again, that's just my experience - if you don't have people relying on your time estimates, then by all means, estimates are pretty pointless!

Thread Thread
 
190245 profile image
Dave

Why the hell can I only click "love" once on your posts? You deserve a lot more than that!

Thread Thread
 
carmenintech profile image
Carmen Chung

Thanks so much Dave, really appreciate it! Also love your "go back to the drawing board" comment - it's super important for people (not just devs) to raise when things aren't possible early on, and to encourage re-thinking the solution (and sometimes the problem, haha).

Collapse
 
fwd079 profile image
Fawad

Interesting. This might work for a one-man-army-permanent-job type situations or a greenfield project, but generally doesn't work for a freelancer/contractor working on an existing software/maintaining/rewriting or upgrading it. Besides, the client who's paying you doesn't really like if you shrug with an "uh I dunno" attitude. A rough idea is always appreciated by a client. A company coming to the client premises for a contracting business, giving an impression of having no idea about estimates, will be thanked and shown the door.
This is an ambitious stance at best, but like I said, it might work for permanent employees in a long-term job for number years. For others the article is very helpful.
Regards.

Collapse
 
jpgbarbosa profile image
João Barbosa • Edited

It heavily depends on what you refer as estimates. If I have a new client, they have an idea and a budget. They definitely need an estimate. However, it's not the estimate we, devs, immediately have in mind, like knowing exactly the amount of days for each specific feature. They need just a ballpark, a range, an idea for their product. For someone who has no idea about programming it's very hard to convert a budget into something more tangible. And it's fair. It's also part of our job as devs.

Some clients have hard discussions with investors, they need a product team with them to provide the necessary info. They might have deadlines. And we need to be able to master the scope, cut some corners if necessary, make use of 3rd party services to create workarounds and deliver value as soon as possible.

That's what we, Whitesmith.co do as a product studio. After the idea is aligned, we define the MVP or the PoC and we make the best we can with that budget (if possible and doable). We rollout the product, we gain traction, we get more funding, we keep developing in an agile way, always validating every step.

Essentially, we make sure we deliver the necessary value according to the needs of our clients. That's way different than implementing features within an estimate, because I agree with you on that. If there's no other way around, the feature should take the time it takes. Won't argue with that. But then we ask ourselves again, can we deliver value sooner?

Estimates are tricky. They are data points, they have different levels of precision, different levels of importance depending on the context and the business. If you work on a single product estimates will have different purposes from consulting. An even on consulting, their purpose changes a lot depending on the phase we are working on. We can easily estimate things that we know and things we know that we don't know. But what about those which we don't know that we don't know? That's when estimates really fail.

Putting everything in the same basket is a simplistic view of something highly complex as estimates.

Collapse
 
marcello_h profile image
Marcelloh

If this works for you, that is fine. But how would you deal with the opposite, when a you want a painter to paint your house, and his answer is like yours? Would you accept this?

Collapse
 
jonrandy profile image
Jon Randy 🎖️

I would appreciate his honesty as builder's estimates are notoriously unreliable 😉

Thread Thread
 
marcello_h profile image
Marcelloh

It's nice when the painter is paid by the hour and you don't knoiw how much you have to wait for it to finish, and how much money it will cost.
Any estimation is perhaps more accurate than no estimations at all. They might be given by previous experiences. And you can always add a dice factor onto it.

Based on mine, I can give a person a rough estimation (with a warning), which will be adjusted in time.

Collapse
 
190245 profile image
Dave

So what do you do in the real world, when PMO and stakeholders are demanding to know when their new feature will be available to users?

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

That is what I do. My jobs are in the real world

Thread Thread
 
190245 profile image
Dave

So, like other commenters have told you - you're very fortunate.

I've gone back & read the article that you reference, and while it makes a valid point (estimates are often used as a stick to beat the developer with), the logical conclusion is frankly, illogical (don't estimate).

That's like saying you keep losing at poker with good friends, so you stop socialising with those friends.

The Project team (PMs, PMO, call them what you will) have a very specific need - to communicate when feature X is likely to be with end users. It's also their job to manage expectations, and to allow for slippage etc, though many of them tend to forget that part.

So our take, is that developers put story points on things, to flag "how complicated we think this piece of work is, compared to another piece of work" - story points do not, ever equate to time. The estimate is, as that article suggests, usually wrong. So we don't have a problem with adjusting it when we get better information.

From there, since we use Jira, PMO have a button they can press that says "how many points per sprint do we achieve" - and then it's relatively simple maths to average that across a number of sprints.

So then, in Sprint planning, assuming all tasks have a "complexity estimate on them," Sprint Planning becomes a drag-drop exercise, and if the backlog is groomed properly by a Product Owner/Stakeholder/vaguely interested party, they simply drag the things from the top of the backlog into Sprints, can plan 6 Sprints in advance, and they know the time box that fits around a Sprint.

Heypresto, stakeholders know how long features will take to be in front of end users (with PMs managing that expectation in case of unexpected issues).

Then, and this is the part most companies get wrong, it's my job as Dev Manager to monitor the whole shebang. Are the team overfitting estimates in order to relax? Are the PMs pushing too much into Sprints? Do the git statistics match the complexity statistics? Etc. Etc.

But again, you're lucky, you don't have to deal with any of this.

Collapse
 
cirphrank profile image
🎧Cirphrank👣

Man, you're spitting fire!

Collapse
 
vinceramces profile image
Vince Ramces Oliveros

You can also add this line.

"Rate your X framework skills from 1 to 10"
HR somewhere critics everything in numbers

Collapse
 
tominflux profile image
Tom

That's good to hear. I've been feeing the same but due to being a junior dev I worry it just comes from a place of inexperience.

Collapse
 
carmenintech profile image
Carmen Chung

Experience definitely helps with estimation, but even extremely senior devs often get estimates wrong. I feel like "just another hour!" is a common refrain...even 1,532,742 hours later... 😂

Thread Thread
 
artdevgame profile image
Mike Holloway

Ultimately every problem is unique, else there wouldn't be a requirement to estimate. With uniqueness comes a margin of error.

Collapse
 
ximias profile image
Alex Holberg

Sure, time estimation hard for a feature, but at least it is possible to do!
I get asked quite a bit about estimating the length of a debugging session. Usually I'll reply something along the lines of "I can tell you when I know what is wrong" or "between 5 minutes and two weeks"

Others in our software department has started using that last one, when they get pressed during debugging, which has earned us a bit of a reputation among the PMs 😆

Collapse
 
carmenintech profile image
Carmen Chung

Haha I've also heard some devs say "How long is a piece of string?" when asked how long something is going to take. Debugging is such a tricky one, because like you said, it's so hard to estimate when you're not sure what the issue is (and if you were sure, you probably wouldn't be debugging!).

Collapse
 
szabgab profile image
Gabor Szabo

I don't understand this "How long is a piece of string?" but reading it, it occured to me that if I don't have a map and I stand at one end of the road then in order to estimate how long it is, or how long it will take me to walk to the other end, I actually have to walk to the other end.

Thread Thread
 
carmenintech profile image
Carmen Chung

Yeah, "how long is a piece of string" is a pretty bizarre English saying in my opinion! There's a pretty interesting account on the etymology of the phrase here: english.stackexchange.com/question...

Collapse
 
190245 profile image
Dave

I said "How long is a piece of string" at least 5 times today.

I also said "what you want to achieve is not feasible, go back to the drawing board" at least twice.

Collapse
 
ximias profile image
Alex Holberg

That's a good one too. I'll totally start using it 😆

Collapse
 
squidbe profile image
squidbe • Edited

My team has to estimate work every sprint, which is expected of course, but when we're asked to estimate how long before a bug is fixed, I simply tell the asker that we won't know until we find the bug. They rarely insist on an estimate, but when they do, I will not budge... because it's obviously unreasonable to demand an estimate to solve an unknown problem. Luckily, the engineering leadership where I work are reasonable about this and back up the engineers when PMs make unreasonable requests.

Collapse
 
squidbe profile image
squidbe • Edited

Respectfully, this article's title is misrepresentative because you're really talking about work efficiency, not estimation accuracy. That said, we should be estimating effort, not time. Except for the most trivial changes, time estimations are notoriously unreliable (I won't go into all the reasons for this, but there's plenty of info online if you want to research it). This is one of the big reasons Agile replaced Waterfall as the preferred software development philosophy.

So, I'm not suggesting you change the content of your article, but I think a title change would more accurately reflect the article's content.

Collapse
 
szabgab profile image
Gabor Szabo

I personally cannot correctly estimate anything that takes more than 5 minutes and even then I miss the target.
What works for me is when I have real dead line. For example I have a presentation to give and people have already signed up.

My suggestion is to always start by giving an estimate to how long it will take to estimate the project. That might give a perspective.

Oh and BTW, there is a whole movement about noestimates. I think it is worth exploring it.

Collapse
 
ksaaskil profile image
Kimmo Sääskilahti

Thanks for the interesting article! I very much like the advice of taking past experiences into account when estimating.

I've found PERT estimation technique to be quite useful in estimating, I think I picked the recommendation from the Clean Coder. Do not give a single number as estimate but three numbers: one for optimistic estimate, one for the most likely, and one for the pessimistic. If the effort is wildly difficult to estimate, it shows up in the numbers.

Also remember that estimation is not the same as committing to a date. If you commit to a date, then other people will make their plans depending on your commitment, and you must get the job done. I think that's just professional behavior for a software dev. If you are unsure, don't commit. It's much better to say "it's probably ready next week but could take up to four weeks" than make your boss happy by saying "it'll be done next week" and then go to them in a week and say it'll take three more weeks.

Finally, we'll all miss deadlines. The important thing is that when you see a deadline approaching and you know you'll miss it, you should immediately notify every stakeholder you'll miss the deadline so they can take that into account.

Collapse
 
carmenintech profile image
Carmen Chung

Love this response!

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

Of course I'm not saying I never know - I definitely know sometimes, but then that is not an estimation. By estimation I mean attempting to break a largely unknown task down and come up with a time or approximate time it might take. This is what I have found is ultimately futile and a waste of valuable time that could be spent just getting on with it

Thread Thread
 
carmenintech profile image
Carmen Chung

Oh yeah - if you have no clue about the task/it's largely unknown, then estimating is often just plucking a random number out of the air, which is not helpful. We have R&D sessions every fortnight where we sit down and try to actually eliminate most major unknowns on upcoming tickets, to try to put us in a position where we can estimate more accurately. Sometimes it works...sometimes it doesn't (you can't always eliminate every unknown, even when doing prep).

Collapse
 
kiranjd profile image
kiranjd • Edited

I have has my fair bit of missed estimates. Then I read about PERT in one of Uncle Bob's books. It did do some part of the estimating process and it asked accurate questions.

So, I ended up making this small node CLI package that you can run with npx

Collapse
 
ishsitha profile image
Ishwarya Sithanathan

I would love to know about that art tutorial :) I am also learning digital paintings.

Collapse
 
carmenintech profile image
Carmen Chung

Oooh yay! So I follow Art With Flo on YouTube (free tutorials that are more suited to beginners), but she also has a Pateron page with heaps of paid tutorials for more intermediate to advanced levels. She released this tiger tutorial for a weekend for free, so if you're interested in the occasional freebie, I recommend signing up to her mailing list.
(Btw, I don't know her, or have any affiliation with her.)

Collapse
 
ishsitha profile image
Ishwarya Sithanathan

I follow her on YouTube. She is very good. I tried some of her tutorials on YouTube too. Thanks Carmen :) Hope to see more art works for you!

Collapse
 
matthewadams profile image
Matthew Adams

Try this technique. A little more quantitative than this article's recommendations. We use it at Northscaler, Petter's company. Works pretty well. pettergraff.blogspot.com/2014/02/e...

Collapse
 
laurentpayot profile image
Laurent Payot

The answer to give to the client is "between 2X and 3X" where X = your estimation where everything goes well. Because not everything will go well.