[Tutor] Python Extensions in C

Alan Gauld alan.gauld at btinternet.com
Fri May 27 01:44:40 CEST 2011


"James Reynolds" <eire1130 at gmail.com> wrote

> I'll look into your suggestion regarding comprehension (i'm not sure 
> what
> that means in a programing sense, but I'm sure I'll find out!)

Its the English meaning of the word.
Studies have shown that the layout of code (indentation,
placement of braces etc) have a big effect on how well
readers understand code. Keeping blocks of code at a
single level is one of the big plus points.

So code that looks like

XXXXXXXXXXXXX
     X
           XXXXXXXX
     X

is less well understood by readers than the same code
that looks like

XXXXXXXXXXXXX
     X
     XXXXXXXX
     X

Or

XXXXXXXXXXXX X
     XXXXXXXX
X

Its all to do with the number of levels of complexity
perceived by the eye/brain.

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list