[Python-ideas] Objectively Quantifying Readability

Rhodri James rhodri at kynesim.co.uk
Tue May 1 07:11:56 EDT 2018

On 01/05/18 01:42, Steven D'Aprano wrote:
> That's a really nice study, and thank you for posting it.


> There are some
> interested observations here, e.g.:
> - line length is negatively correlated with readability;
>    (a point against those who insist that 79 character line
>    limits are irrelevant since we have wide screens now)

There are physiological studies of how we read that support this.  I 
don't have any references to hand (I'd have to go hunting, and no 
promises because the ones I'm faintly aware of happened at least 40 
years ago!), but the gist is that we don't sweep our eyes continuously 
along a line of text as you might assume, we jerk our attention across 
in steps.

> - length of identifiers was strongly negatively correlated
>    with readability: long, descriptive identifier names hurt
>    readability while short variable names appeared to make
>    no difference;

I'd be interested to know if there is a readability difference between 
really_long_descriptive_identifier_name and 
ReallyLongDescriptiveIdentifierNames.  I rather suspect there is :-) and 
the study may be biased by picking on Java as its example language here.

Rhodri James *-* Kynesim Ltd

More information about the Python-ideas mailing list