I don't know how to estimate

The business side of software development depends on accurate estimates, and I'm just terrible

Estimations are obviously a huge part of many businesses. I want to get a new bathroom, I'll need to get an estimate. A lot of that is for the purchaser, to be able to choose between businesses and get the best combination of price and like, likelihood that when they're done, it'll look and function how you expected. In software business, this is not any different. The other part is for the contractor, to be able to project what tools and help they'll need, how much material etc.

I don't know what it is, but I'll try to explain it by putting myself in the position of someone doing a bathroom. I might estimate it'll take like 1 hour to get the old tile up, 1 hour to remove the bathtub, 2 hours to put in the new tub, 2 hours to put in the new tile. I might come across some difficulties in getting the tub out of the house, I'll add an hour, and an hour for the tiles. The customer agrees that it's a good price.

When the work starts, I work for 5 minutes and I'm like, wait a second…  if I just go catatonic and work as fast as I can, I can get it done in half the time. Also the issues that I thought might be issues and accounted for in the estimate, turns out they weren't issues at all. So I'm done in like 3 hours instead of 8.

This is how my very reasonable estimates turn into horrible estimates. If you put my estimates in front of another software developer with similar experience and knowledge on the project, they'd see the same thing. But I get to working, and I just go heads down. I can do 3 things at once. My brain has enumerated all of the steps and I have a very clear vision, and very clear execution path. I don't get tied up, I ignore messages, am working through meetings, etc.

The thing about the unknowns, now, after like 20 years of doing this. I won't estimate with an unknown. It really irks project managers. But it's similar if I were to estimate a bathroom project site unseen. Then you go to the site and find that the bathroom is the biggest bathroom you've ever seen and it's now going to take you double your estimate.