python coding contest

James Tanis jtanis at pycoder.org
Tue Dec 27 14:06:23 EST 2005


On 12/25/05, Simon Hengel <simon at airlangen.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> > I'm envisioning lots of convoluted one-liners which
> > are more suitable to a different P-language... :-)
> I feel that python is more beautiful and readable, even if you write
> short programs.

.. yes but there's a difference, some users of that "other" P-language
seem to actually take some sort of ritualistic pride in their ability
to condense code  down to one convoluted line. The language is also a
little more apt at it since it has a great deal of shorthand built in
to the core language. Shorter is not necessarily better and I do
support his opinion that reinforcing short as good isn't really what
most programmers (who care about readability and quality) want to
support.
>
> > How about """best compromize between shortness and readibility
> > plus elegance of design"""?
> I would love to choose those criteria for future events. But I'm not
> aware of any algorithm that is capable of creating a ranking upon them.
> Maybe we can come up with a solution. Any ideas?
>
I think code efficiency would be a better choice. A "longer" program
is only worse if its wasting cycles on badly implemented algorithms.
Code size is a really bad gauge, If your actually comparing size as in
byte-to-byte comparison, you'll be getting a ton of implementations
with absolutely no documentation and plenty of one letter variable
names. I haven't checked the web site either, are you allowing third
party modules to be used? If so, that causes even more problems in the
comparison. How are you going to compare those who use a module vs
implement it themselves in pure python?

--
James Tanis
jtanis at pycoder.org
http://pycoder.org



More information about the Python-list mailing list