What makes code "readable"? (was Re: Python vs. Perl, which is better to learn?)

Steve Holden sholden at holdenweb.com
Tue May 7 08:39:55 EDT 2002


"Terry Hancock" <hancock at anansispaceworks.com> wrote ...
>
> Mark McEahern wrote:
> > When I was looking at that "readable" Perl
> > code which George pointed us to (some comments
> > probably forthcoming from me in a reply to his
> > post, but in any event thanks George! :)  I started
> > to ponder that question.
> >
> > "What makes code readable?"
> >
> > (Actually it was "why do I still not find this highly
> > readable?")
> >
> > One thing that occurred to me was that the Perl code had a
> > very high number of "transitions" between punctuation and
> > text.
> >
> > Effectively every line, and sometimes literally
> > a dozen times within a line, text and symbols are
> > mixed.  Not just the odd parenthesis or period, but
> > great streams of that infamous Perl "line noise".
> >
> > I think a high "symbol-set-transition rate" (please
> > offer a better term) leads to low readability.
> >
> > Punctuation itself also inherently lowers
> > readability, I believe, which is a reason I find
> > assembly easier to read than Perl, though clearly
> > less productive.
>
> Oh I dont know I think its just possible though sometimes
> difficult for me to articulate if articulate is the right
> word which it might be but I digress lets get back to the
> point I think punctuation actually does lend a lot of
> readability in both programs and prose Indeed I always find
> it pretty annoying when people leave punctuation out of
> their email posts and I suspect you know what I mean by
> now This is particularly relevant when there are many twists
> and turns to be followed as in this passage with parenthetical
> clauses and in highly nested code
>
> ;-)
>
> Seriously, though I think that punctuation aides readability.
>
Of, ((course- $if %there[''s"] (((too *much@) of!) #it), +it, {can; {get}}
[in]- +the ~way~ `as`) \well).

[...]
a-place-for-everything-and-everything-in-its-place-ly y'rs  - steve
--

Steve Holden: http://www.holdenweb.com/ ; Python Web Programming:
http://pydish.holdenweb.com/pwp/








More information about the Python-list mailing list