I've been programming for about 30 years and it took me at least 20 years to learn how to make good estimates. If you can't estimate how long something is going to take, then you probably haven't been doing it long enough. I don't care what your field is, or even if it's engineering or not.
Programming is just like any engineering endeavor. Be a professional and admit that not every job is a weekend hack. If you work somewhere where you have to lie about work taking less time than it takes, then quit that job and go work somewhere else.
One difference between a so-so programmer and a great programmer is someone who finishes his or her work when he or she says he or she will. There are other differences, such as communication skills or lack thereof, but having people be able to trust you is pretty key.
Another way of looking at is this. Programming cannot be rushed. That doesn't mean tell people it will be done when it's done! What it does mean is learn to estimate the worst case scenario. You will not be punished for writing a great piece of software and finishing it a few weeks early. You will be punished for saying it will be finished by a date assuming that nothing will go wrong at all and that you are some kind of programming genius, better than every other programmer out there.
Consider this example. I think I might be able to finish something in a week. The estimate I give is two weeks. Another programmer typically says a job of roughly the same magnitude will be done "in a few days." I have given myself plenty of time to do the job right, and extra time to fix bugs and possibly deliver the project early. The other programmer screwed up and it does take him a week. After a week, his work has tons of bugs. It goes out to production and every one of those bugs is embarassing and takes man days to resolve, rather than a few man hours. I've seen this scenario happen many times. Programmers fall into this trap of their own making. Maybe it has something to do with machismo. Stop pretending to be more manly or smarter than you are and be a professional.