"James Reynolds" <eire1...@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/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to