I'm going to go out on a limb and say that the single most important quality that differentiates a good software developer from an excellent software developer is the ability to spend hours on a problem where he doesn't know if or when he'll find the correct answer. No matter how many unit tests you write or how disciplined your coding practice is, there will inevitably be bugs. Not only that, there will be those annoying, frustrating bugs that you can't seem to duplicate and you spend hours grinding your teeth trying to figure out why the damn thing doesn't work. As a matter of fact, when I'm conducting an interview, I often explicitly give people a question that is too difficult to solve in the allotted timeframe, just to see how well the interviewee deals with coming to the realization that they didn't "ace" the interview.
Those of you that follow American professional football saw this quality in practice in a very different arena last week. The Indianapolis Colts' second year quarterback, Andrew Luck, put together a dismal first half performance in his team's opening playoff game, turning the ball over three times en route to leading his team to a 38-10 deficit. For those who aren't familiar with NFL scoring norms, before last weekend, only twice in the history of the league had a team won after trailing by 28 points or more. There was no doubt about it: Luck screwed up, badly and repeatedly.
However, Luck has built up a reputation as a player who continues to play with poise and confidence, no matter how bad things seem. In the end, no matter how many times the opposing Kansas City Chiefs hit him or made plays to take the ball away, he continued to play effectively. In these situations, other players often either start sulking or start playing with wild desperation. Luck certainly made some adjustments, but he continued to play to his strengths and didn't lose faith in his abilities. More importantly, he kept his head in the game rather than succumb to doubt, as evidenced by a ridiculous play where he turned an unexpected fumble into a touchdown. In the end, the Colts pulled off an incredible comeback to win and advance in the playoffs.
As software developers, there's definitely something we can learn here. I've interviewed plenty of people who have caved badly under the pressure of having to admit that they don't know the answer. I've had plenty of times where I didn't debug problems as effectively as I should have because I decided that I would not be able to do it or because I was too desperate to find the answer. In order to be an effective software developer, you need to stay calm, keep focused, and remember to do things the right way, even when you're under a great deal of pressure.