Inattentive blindness phenomenon and code review

Do you remember a selective attention test where you had to count how many times players had passed a basketball? If you haven’t seen it yet, check it now before reading the post.

An inattentional blindness phenomenon (also known as perceptual blindness and inattentive blindness) was first mentioned in 1992 and described in 1998 by Arien Mack and Irvin Rock. In general, the phenomenon suggests that we can fail to perceive even the most conspicuous but unexpected things in plain sight unless we pay close attention to them.

There’re also several related but still distinct types of visual perception failures. For example, change blindness, repetition blindness, visual masking, and attentional blink.

An inattentional blindness implies that our brain can’t notice changes that we do not expect to see. Like a gorilla in the video which was even called “the invisible gorilla” in this regard. Another reason for this phenomenon is absent-mindedness caused by the need to fully focus on something else. It is obvious that you can feel this phenomenon by yourself only if you do not know about it (or do not expect it). And indeed, when you re-experiment with other players and a completely different disguised actor, you will definitely notice them since you’ll be ready for this.

Inattentional blindness is related but still distinct from other failures of visual awareness such as change blindness. “Inattentional blindness is the failure to see a stimulus, such as an object, that is present in a visual field. However, change blindness is the failure to notice something different about a visual display.”

Change blindness can be noticed much easier, there are quite a few videos on the Internet on this topic. Even the BBC has released a program dedicated to this phenomenon. Under normal conditions, a change in the observed picture instantly attracts our attention. However, we may not notice the changes if they coincide with a short interruption of the observed picture. This may be a brief blinking of the screen, video montage joint or minor interference. In experiments on change blindness, it was found that almost 70% of the subjects did not notice the substitution of the main character, and changes in less significant details remained ignored in almost 100% of cases.

It would seem that a term is untethered from programming, and it is not at all clear how the knowledge of this effects can be applied to software development. But we can. The point is, that a developer can be so focused on solving a specific task, which completely captures his attention, that he does not see obvious problems in the neighboring method or solves the problem in some strange way.

Hence the requirements for code review, pair programming, the Pomodoro technique and many others, although not everyone can clearly explain why these requirements exist. In addition, there is always such a developer in a team who is incredibly cool against the background of all the others, and his code, as a rule, is reviewed very superficially. And less experienced developers are often embarrassed to make comments to a more skilled colleague. But they should, since anyone can be a victim of perception failures.

When reviewing the code of your teammates, carefully study what could have been missed due to the phenomena described, and remember the effect of inattentional blindness.