Over in the CodeProject’s Lounge, Edgar Prieto asks whether software developers “should have a positive or negative state of mind,” by which he seems to mean, should they be optimists or pessimists?

Optimism seems to have one big thing going for it: confidence. The belief that you can tackle any problem, and even enjoy doing it, is central to being able to continue to work in IT. Without the ability to turn a blind eye to all of the unknowns and undecideds that you will face along the way and focus solely on a simplistic view of your planned implementation, you can’t ever roll up your sleeves and start getting things done. Without the ability to turn off the naysayers in your mind, you’d become defeated before you ever began any nontrivial project. You need to have faith in your ability to overcome those obstacles when they arrive.

I often observe an unrealistic optimism as a prominent personality trait of young, energetic programmers. They usually hold onto that trait, even after several spectacular crash-and-burn project failures that could be directly linked to overly optimistic estimates and an inability to consider all aspects of the problem in their original design. These young bloods remind me of Spartan warriors, who would rather die in the pursuit of glory and honor than shy away from any battle — no matter how insurmountable the odds. But if their careers survive these failures and they eventually learn from them, then they often go on to become great developers.

More experienced developers tend to be a little more pessimistic. They actively look for flaws in their design, and they’ve come to expect that what the client requests is not really what they want. They also know that, no matter how well they investigate the problem, something (or some things) will go wrong along the way. As a result, they’ve learned to be a little outrageous in their estimates because what seems excessive at the beginning of the project will seem quite reasonable (or even insufficient) by the end.

But you can also take pessimism too far. I once knew an experienced developer who always investigated every unknown and charted out every execution path in the programs he wrote. He almost never had a bug — but he almost never got anything done. His colleagues would finish five projects (and fix all the bugs they introduced in the process) before he could complete even one of his near-perfect creations. He was the poster child for “Worse is better.”

Excessive pessimism can also lead to an interminable design phase, as you try to answer every question definitively. You involve as many interested parties as you can, which often produces design by committee. As Hermann Hesse said, “If you talk about it, even the simplest thing becomes complex and incomprehensible.” So you have to know when to say “good enough” and get started, with the understanding that you’ll undoubtedly need to ask more questions later.

As you can probably tell by now, my answer to Edgar’s question is “a healthy dose of both, please.” You need optimism to help you take that first step in the journey of a thousand miles, but you need a healthy pessimism to keep your eyes open for problems before they get out of hand. So you should be optimistic about some things and pessimistic about others. The secret is knowing which is which.

Get weekly development tips in your inbox
Keep your developer skills sharp by signing up for TechRepublic’s free Web Developer newsletter, delivered each Tuesday.
Automatically subscribe today!