Optimism is not necessarily as beneficial as many proclaim.
The pessimist complains about the wind; the optimist thinks it will change; the realist adjusts the sails.
-- William Arthur Ward
Optimists may accomplish more than realists, realists certainly accomplish more than pessimists, but optimists do many times as much damage. For example, nearly all "revolutionaries" and criminals are optimists. Lenin, Hitler, Sadam Hussein, Bernie Madoff, and probably all con-men and burglars were extremely optimistic. The conviction that they will never be caught is nearly universal among criminals. Many, perhaps most, excessive risk takers are optimists.
An unsuccessful optimist never learns. He is one of those fools who is sure everything will work out all right, but who does nothing to make sure it will. A successful optimist will learn from his mistakes and keep working at his problem.
Some work almost requires optimism, because the work is so tedious, for example, Fred Brooks in The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition (2nd Edition) says:
All programmers are optimists. Perhaps this modern sorcery especially attracts those who believe in happy endings and fairy godmothers. Perhaps the hundreds of nitty frustrations drive away all but those who habitually focus on the end goal. Perhaps it is merely that computers are young, programmers are younger, and the young are always optimists. But however the selection process works, the result is indisputable: "This time it will surely run," or "I just found the last bug."
If you have a choice, you should plan for the worst and hope for the best, or as Lazarus Long put it "Pessimist by policy, optimist by temperament - it is possible to be both. How? By never taking an unnecessary chance and by minimizing risks you can't avoid. This permits you to play out the game happily, untroubled by the certainty of the outcome." (Robert A Heinlein, Time Enough for Love.) Take precautions then just enjoy yourself knowing you have done what you can to prepare.
Another view from David Weber and Eric Flint's novel, Crown of Slaves (Honor Harrington):
But if the expression "optimistic paranoiac" hadn't been a ridiculous oxymoron, it would have described Ruth fairly well. She seemed to take it for granted that half the human race was up to no good, even if the knowledge didn't particularly worry her much - because she was just as certain that she'd be able to deal with the sorry blighters if they tried to mess around with her.
From the unix fortune-cookie program:
pessimist: A man who spends all his time worrying about how he can keep the wolf from his door.
optimist: A man who refuses to see the wolf until it seizes the seat of his pants.
opportunist: A man who invites the wolf in and appears the next day in a fur coat.