Optimism is reserved for misguided souls and high-level management.
You need to be better than that, you can’t sit around and hope it’ll all turn out for the best. You’ll be dead in the water if you subscribe to such fanciful notions, look around you at all those failed projects.
One thing you need to remember is that you need to make your own luck to be in control your project’s destiny. Few bosses hand out gold stars for, it wasn’t my fault. Not even McDonalds do that.
Think ahead; put the necessary steps in place to prevent the bad things happening, get the right people (see good-guys) involved to make sure the right things do happen, and when people say you were lucky, that worked out well, you can afford yourself an inward wry smile.