Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chromatic (983)

chromatic
  (email not shown publicly)
http://wgz.org/chromatic/

Blog Information [technorati.com] Profile for chr0matic [technorati.com]

Journal of chromatic (983)

Monday September 10, 2007
12:03 PM

OooOOooOOo Magic Python Powers OoooOooOooOO

[ #34407 ]

It is hard to write unreadable code in python.... You can still have meaningless variable names, bad encapsulation, functions that are too long, tight coupling, and poor/no documentation, and no tests. However if you compare a program written in python to a program written in some other language, the python program will not be less readable unless effort was put into making the python program less readable.

Python's Magic Powers of Readability in the Face of Barely-Competent Monkeys

I think I'll credit this one as "I hate dollar signs and luuuuuurve prefix and postfix underscores, nanny-nanny-boo-boo."

Of course my favorite line is "You should learn some other programming languages." I counted how many languages I've programmed in to get Perl 6 out the door the other day... and stopped at ten.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I find poor program design more of a factor on readablilty than syntax issues. At the microscopic level of syntax, it's very easy to see what is going on, and that's in any language. It's something you can just look up.

    At the higher levels, the how and why of things fitting together and how the data needs to be passed around, most people seem to just attach things with whatever pipe fittings they have close by, rather than using some consistent, overarching philosophy.

    On the other side are overly-absract fr
    • Design is a readability problem no matter which language it is.

      That's why I prefer to talk about "maintainability" rather than "readability". It shifts the discussion away from syntax to other factors which actually matter.

  • When I was working in the Great White North, I was working with a few Perl programmers that were thrown onto a Python+Zope project for the oddest of reasons. They were smart. They picked up Python without any difficulty. They learned how Zope wanted them to write and structure web apps, eventually.

    After a few months on the project, they had some interesting insights into the different world views of Perl and Python. A moderately experienced Perl programmer can skim over a random piece of Perl code and i
    • Great thoughts, as usual Ziggy.

      Therefore, any Python programmer of even the most basic skill level should be able to read any Python program (if not completely understand the underlying algorithm and data structures).

      Without being able to understand the program's design in the large or small, is being able to read the program even interesting? I can't think of a case where it is. Am I missing something?

      • Without being able to understand the program's design in the large or small, is being able to read the program even interesting?

        I think you're approaching the problem from the wrong direction.

        Given a new program and no previous understanding of how it works, you could read the program and build an understanding from there. Consider the first time you approached a full set of basic binary tree primitives, or a bubble sort. It may have been the first time you came across these concepts, but if you could r

    • The unintentional side effect is that a moderately experienced Python programmer needs to read, rather than skim, each and every Python program he picks up to determine if it’s total crap, moderately good, well-written and crystal clear, clever for good reasons, or written while drunk.

      That’s how I feel about Java. Regardless of how crappy the code, it always looks reasonable on a microscopic level.