http://qs321.pair.com?node_id=446736


in reply to Re: How do you master Perl?
in thread How do you master Perl?

Ah yes, the dear topic of the organized mind!

I actually tend to think the people who golf and obfuscate aren't really the culprits of the everyday unreadable code.

I really don't know how to deal with that problem, and some Perl masters don't have the greatest styles. I vaguely remember a great quote from a master programmer who said that computer program where meant to be read by humans, not computers. Was it Knuth? Does anyone know this quote?

I think this comes back to a master controlling his environment. Randal could probably instruct me on further koans about this (and he did learn quite a number of interesting things in that part of his life). I'll have to think more about this one.

--
brian d foy <brian@stonehenge.com>

Replies are listed 'Best First'.
Re^3: How do you master Perl?
by NateTut (Deacon) on Apr 11, 2005 at 19:42 UTC
    I agree I think Obfuscating and Golfing are unrelated to unreadable production code. One technique I was taught early on (in another programming language) is to write the comments first. Write in the comments what you are going to do in the code. It really helps to clarify your plans and to remember what that plan was after you've struggled through the early portions

    Unreadble code often comes from unskilled coders, but not always. Some people just hate typing so much they make all their variable names 1 character. I like code that reads like poetry...
Re^3: How do you master Perl?
by Aristotle (Chancellor) on Oct 09, 2005 at 23:42 UTC

    I vaguely remember a great quote from a master programmer who said that computer program where meant to be read by humans, not computers. Was it Knuth? Does anyone know this quote?

    I have that quote on my homenode. It’s from the preface to the first edition of Structure and Interpretation of Computer Programs by Abelson, Sussman and Sussman. The exact phrasing is

    Programs must be written for people to read, and only incidentally for machines to execute.

    With regard to the topic of this thread, that book is highly recommended – and it’s available online freely, in full.

    Makeshifts last the longest.