[Python-ideas] Objectively Quantifying Readability

Steven D'Aprano steve at pearwood.info
Tue May 1 15:08:41 EDT 2018

On Tue, May 01, 2018 at 03:02:27PM +0000, Dan Sommers wrote:

> >> I happen to be an excellent judge of whether a given block of code is
> >> readable to me.
> > In the same way that 93% of people say that they are an above-average
> > driver, I'm sure that most people think that they are an excellent
> > judge of readability. Including myself in *both* of those.
> Are you claiming that I'm not an excellent judge of whether a given
> block of code is readable to me?

Of course not. I don't know you. I wouldn't dream of making *specific* 
claims about you. I speak only in broad generalities which apply to 
people in general.

I'm reminded that in the 1990s during the UI wars between Apple and 
Microsoft, people had *really strong* opinions about the useability of 
the two OSes' GUIs. Macs required the user to use the mouse to navigate 
menus, while Windows also allowed the use to navigate them using the Alt 
key and arrow keys.

Not surprisingly, *both* Mac users and Windows users were absolutely 
convinced that they were much more efficient using the method they were 
familiar with, and could justify their judgement. For example, Windows 
users typically said that having to move their hand from the keyboard to 
grab the mouse was slow and inefficient, and using the Alt key and 
arrows was much faster.

But when researchers observed users in action, and timed how long it 
took them to perform simple tasks requiring navigating the menus, they 
found that using the mouse was significantly faster for *both* groups of 
users, both Windows and Mac users.

The difference was that when Windows users used the mouse, even though 
they were *objectively* faster to complete the task compared to using 
the arrow keys, subjectively they swore that they were slower, and were 
*very confident* about their subjective experience.

This is a good example of the overconfidence effect:


This shouldn't be read as a tale about Mac users being superior. One of 
the two methods had to be faster, and it happened to be Macs. My point 
is not about Macs versus Windows, but that people in general are not 
good at this sort of self-reflection.

Another example of this is the way that the best professional athletes 
no longer rely on their own self-judgement about the best training 
methods to use, because the training techniques that athletes think are 
effective, and those which actually are effective, are not strongly 

Athletes are not great judges of what training works for themselves.

The psychological processes that lead to these cognitive biases apply to 
us all, to some degree or another.

Aside from you and me, of course.


More information about the Python-ideas mailing list