Inattentional blindness
About a year ago Stuart Wray published a very nice article about pair programming called How Pair Programming Really Works. The article discusses four helping mechanisms of pair programming: pair programmers chat, notice more details, fight poor practices and share expertise. It is very well written and explained and in my rather limited exposure to pair programming these values are quite apparent.
This, however, is not a post about pair programming. I think the first two items, more chat and paying more attention to details, deserve discussion beyond pair programming. I think you could put these two into the same category: fighting inattenional blindness.
Inattentional blindness “is the failure to see an object because attention is not focused on it”. Mark Green has a very extensive and informative post about this phenomenon:
To understand how inattentional blindness occurs, it is necessary to accept a very unintuitive idea: most of our perceptual processing occurs outside of conscious awareness. Our senses are bombarded with such a large amount of input, sights, sounds, smells, etc., that our minds cannot fully process it all.
To cope with the problem, we have evolved a mechanism called attention, which acts as a filter that quickly examines sensory input and selects a small percentage for full processing and for conscious perception. The remaining information is lost, unnoticed and unremembered - we are inattentionally blind to it since it never reached consciousness.
It is not that the fact, information or problem is hidden from you or is out of your sight but that you do not process it and your attention span does not cover it.
I am sure it has happened to you: you are stuck in what seems to be a complex issue, you ask a team member to have a look and as you are explaining the issue to them it becomes very clear what the problem is without any input from them. The answer is right before your eyes, it is just that you are inattentionally blind to it. In fact you do not even have to bother your teammate; just explain it to yourself the same way you would to your colleague. Try to explain it in very simple words, stay as far from deep technical explanations as possible and at first explain it in high level. If that does not help then explain a bit more and in more details, as if the problem is not clear after the first minute of explaining it to your team mate and s/he does not have any input because s/he needs more information. This is known as Rubber Plant Effect:
It has been observed that, when you're stuck on a software problem, explaining the problem to a colleague, or even to an ornamental plant in the office, often clarifies your own understanding of it, and leads you to a solution.
A possible explanation is that putting the problem into words usually linearizes it, and makes you choose one of two or more alternatives (because you can only say one of them at a time).
The problem is that we are inattentionally blind to some simple facts. Thinking linearly about the problem is a big part of why this works; but the other thing that greatly contributes to the discovery is that we need to pour some more resources, but of other types, to the problem. If your visual sense is blind to it, talk about it. That will trigger your auditory sense. This helps contribute to the problem’s sensory conspicuity in different ways. It is as if the problem that you were trying to solve by one force is now being tackled by several forces.
Trying to stay away from technical details and using simple words also makes you think about the problem differently. You force yourself to look at the problem from the eyes of someone who does not know about it and that takes a lot of details away and helps unveil the problem.
Sometimes though, even that does not help. You are too stuck and the problem seems or is very complex. Your brain is swamped under all the details and even rubber plant effect cannot help. Taking a break lets your brain breathe a little. It also helps you stay away from unnecessary details for a while which could bring the problem buried under those details out. Perhaps you can leave the problem aside for the day and come back to it tomorrow. This action sometimes depending on the amount of time you have spent on the issue and the extent to which your brain is involved (or perhaps offended by not solving it) could trigger it to flag the problem. Your brain is now on a mission to solve a problem and is going to work on it you like it or not.
I have personally solved many complex problems when I least expected; e.g. before sleep, right after I wake up in the morning, under the shower and so on. It is like my brain tells me: “hey, I can solve the problem if you stay out of my way”.