What ends up happening is that I usually discover that I could have done something differently which would have resulted in a better outcome but it’s too late and too much work to go back because of the deadline, which leads to me kicking myself at the end of the project because I know I could have done better.
I previously thought the answer to this problem was to plan more carefully at the beginning and have a very solid idea on how to complete each step of the project before writing any code, but even after meticulously planning, weighing pros and cons, doing small POCs I still have tons of nervous energy to make progress, and if any problems start to arise or something isn’t working as expected this anxiety quickly gets out of control. What if I don’t finish on time? What will I say at standup tomorrow if I don’t make any progress tonight? What if this is the beginning of me discovering I don’t have what it takes to do this job?? These all sound very irrational now, but these thoughts really do cross my mind when I’m doing something at work and it’s not going as expected.
I know that it’s almost impossible to give an exact estimate of when projects will be completed, but I somehow feel ashamed if the project slips in time estimation (mostly because I am the one that said how long it would take me to complete the work)
I don’t have this problem when working on side projects or when I program things for fun in my spare time obviously because there is no money on the line, no deadline to communicate, etc… so I would really like to try to calm myself down more at work and be able to produce better work because of it. Some people seem to be able to separate the anxiety of getting things done on a timeline and the problem they are solving and seem to enjoy their work much more than I do.
Can anyone offer any suggestions that may have helped them achieve something similar?
If you were able to articulate the reasons why, could you just give yourself more room to work? Take your initial timeline and multiply it by 1.5. Sounds like your original timelines are rarely realistic anyway, so it seems honest enough to just make it arbitrarily bigger and see how that goes instead. If your larger timeline is accepted and you deliver well under that limit, everyone's happy!
That's assuming that you are able to do so. If you've got managers breathing down your neck to get stuff done in unrealistic time.. that's a different situation.
You're not alone. It's a big reason why time based releases are popular. It's why eXtreme Programming (XP) became a thing.
Given enough time, every engineer would ship the most exquisite solution; problem is, their competitor shipped something good enough long ago OR that exquisite solution isn't what the customer wanted.
Release early, release often.