I’ll be the first to admit that my credentials at estimating aren’t always that brilliant… However, like all programmers: it’s part of our daily, or even hourly, lives.
There are a few hard lessons that I’ve learnt though which hopefully help someone out there somehow.
First, stick with what you know. If you can’t visualize an approach or design in your mind (or on paper) for the problem at hand then push back. There’s no shame in dropping a “give me a day or so to investigate and get back to you”.
You can’t know what you don’t know
TIP: This means that virtually anything that’s classified as a bug is worth pushing back on because chances are that if you knew the resolution already then it wouldn’t be a problem right now.
Secondly, don’t be flippant… My evil underestimating ways come to the fore when I’m put on the spot, but when I sit down and logically break things down and categorize them, then my accuracy goes way up. If this sounds like you, then yet again a “let me get back to you on that” should be your go-to response. Remember, poor estimates can totally derail a project whether that be through either under or over estimation.
You also need to know your team. I would push-back on any estimating for an imaginary or unknown team. There’s just no way of knowing what skill-sets, personalities, and team velocity will be in the mix. If you really have to estimate under these circumstances, then you’ll just have to build in a large contingency clause/multiplier (which could effectively devalue the estimate in the first place).
Next, and this one is probably a little controversial, but I’ve seen that too much consensus estimation is probably not going to help. Have you had to sit through a grueling “sprint planning meeting” that involved you weighing in to estimate on stuff that you won’t be working on and only just heard about? Why are those other developers making this little task seem so hard? In my opinion, it’s easy to make something seem difficult in those meetings; but less so to make them seem straightforward. Then again, maybe we just weren’t doing it well… As before, your estimates are only going to be as good as your preparation and in a group estimation environment, everyone must be prepared.
Finally, talk it out and take your time! If you feel like you’re not the man for the job then work out who knows that part of the system and go have a chat with them. If you think you need more time to give an estimate, then let that be known and plan it out.