An aspect of my current job that I find quite difficult at the moment is estimating how long it will take me to create a feature. We work following Agile principles and will usually have a sprint planning session with the team during which we have to estimate the time it will take us to code a particular requirement.
In my first few weeks, I often either thought “I have not the faintest clue because I don’t even know how to approach this thing” or I thought “Ah, I know that one! That sounds easy. I can do that in a day!”.
The latter was very dangerous - I completely underestimated the duration. Everything always took much, much longer!
We’ve been discussing estimations in the office quite a bit because all the junior developers are having a hard time with it. Luckily the senior devs are saying that estimating becomes easier with experience. It makes sense because you will have done similar things (or exactly the same things) before, so you know pretty much how long it will take.
Just double it
And the advice that they’ve been giving us is to make an estimate in your head and then double it before you say it out loud.
It sounded kind of excessive to me in the beginning and I was worried that my manager or the project managers wouldn’t be happy with me making such high estimates. But now that I’ve got some experience (very little but some!) I think this is a really good approach.
Often times something comes up that is more difficult or complicated than I thought it would be. Or when I think I’m pretty much done with the code and then test it across different browsers, some small details don’t work in a particular browser (not naming any names but I’m looking at you, Internet Explorer!) and I spend another half day fixing it.
Something that also needs to be accounted for are interruptions while we’re coding. It could be that there are meetings scheduled or maybe the project manager has “just a really quick question” which means that I easily lose between half an hour to two hours. Coordinating and divying up work with my colleague also takes up time.
Luckily pressure in our office isn’t crazily high and I feel that even if I didn't manage to complete a feature in a given sprint, it won’t be the end of the world.
And no one has ever complained that my estimates are too high (at least not yet…).