Python and Ruby

John Bokma john at
Thu Feb 4 00:03:15 CET 2010

Jonathan Gardner <jgardner at> writes:

> On Feb 2, 9:11 pm, John Bokma <j... at> wrote:
>> Jonathan Gardner <jgard... at> writes:
>> > I can explain, in an hour, every single feature of the Python language
>> > to an experienced programmer, all the way up to metaclasses,
>> Either you're a hell of a talker, or I am far, far away from being an
>> experienced programmer. It's advocacy like this, IMO, that keeps people
>> away from a language, because you can't feel nothing but a failure after
>> a statement like this.
> I can explain all of Python in an hour;

OK, in that case I would say give it a go. Put it on YouTube, or write a
blog post about it (or post it here). I am sure you will help a lot of
people that way. 

> Coming from perl to python, the big "aha!" moment was when I realized
> there wasn't anything more than what I saw before me. I kept expecting
> something big around the corner, kind of like when I first discovered
> refs in perl, or when I realized how hard it truly was to write OO
> code in perl that actually does what you think it should do.

There are very nice frameworks to help you (e.g. Moose). OO is not that
hard IMO, but I can imagine it's very hard if you don't understand
references sufficiently.

> Perl has trained me to be fearful of the language, constantly on the
> lookout for jabberwockies. If you fall into one of those traps in
> perl, it's because you weren't smart enough and aren't worthy of the
> language, or so they say.

Odd, you gave me the same feeling when you stated you could explain me
all features of Python in an hour.

> It's never perl's fault. I mean, doesn't everyone know what the
> Schwartzian Transform is?

Doesn't everyone know what the big O notation is? I mean, Schwartzian
transform is not unique to Perl, and it strikes me as odd that you think
it is. It's all about understanding that general sort on average is O(n
log n), and hence does O(n log n) comparisons. Which means that if you
do an expensive calculation in a custom compare function or do a lot of
comparisons it might be cheaper to do precalculate the keys
(O(n)). Randal Schwartz was the person who made this idea popular in the
Perl community, hence the Perl community named it after him, but it was
long known before that and used in other languages.

[How to learn Python]
I am fully aware of how to learn a language, I've done so several times
(or many times even). I only disagree with your statement that you can
explain all features of Python to me in an hour. But I love to be wrong
on this, and to stand corrected.

> There are no dragons in this forest. Heck, this isn't even a forest---
> it's a single-room apartment with everything you need right there
> where you can see it. The thermostat is set to room temperature, and
> no matter what happens outside, you're safe and protected from it all.

Why does this sound like some religious speech?

I always say: if there was a really easy to learn programming language,
I would be programming in it. And no, I don't think Python is it. (Nor
Perl for that matter). I do agree that Python /looks/ more simple (and
certainly cleaner, unless you're using regexp a lot) than Perl, and
certainly to some extend Python /is/ simpler. But in my (relatively long
experience) programming boils mostly down to which libraries you know,
and how well you can use them.

Finally, note that simpeler doesn't always make your code more easy to
grasp. There is a reason that human languages are rich and often have
many ways to say something. Programming, after all, is also
communication with other humans (if only with one self).

John Bokma                                                               j3b

Hacking & Hiking in Mexico - - Perl & Python Development

More information about the Python-list mailing list