On PHPMaster.com today there's an interesting article about something called "inattention blindness" - basically, the situation that comes up when you can't seem to find an issue/bug yet it's completely obvious to someone else.
Your code isn't working! You don't know why and you've been staring at it for what seems like hours. You're grumpy. You're falling behind schedule. You're getting increasingly irritated. Why doesn't it work? Why can't you see the bug? It can't be so hard to find, can it? Out of sheer frustration (as opposed to rational thought) you call over a coworker to help you find the problem. Within seconds they do what's been seemingly beyond you - they identify the source of the issue. To make matters worse, it's painfully simple. [...] Inattention blindness is a phenomena related to people's perception of the data they receive through their senses.
The talks about the invisible gorilla test and four theories that might cause the person to miss the obvious. He then relates this back to programming, pointing out a few reasons you might "miss the gorilla" when it comes to debugging your code:
- Specific Language Experience / Programmer Expectations
- Operator Overloading
- Syntactic Noise
- Whitespace - Vertical and Horizontal