What's better about Ruby than Python?

Alex Martelli aleax at aleax.it
Thu Aug 21 12:15:59 EDT 2003


Anton Vredegoor wrote:
   ...
> tiny chance. Suppose you could make a bet for a dollar with an
> expected reward of a thousand dollars? Statistically it doesn't matter
> whether you get a .999 chance of getting a thousand dollars or a
> .00999 chance of getting a million dollars.

This assertion is false and absurd.  "Statistically", of course,
expected-value is NOT the ONLY thing about any experiment.  And
obviously the utility of different sums need not be linear -- it
depends on the individual's target-function, typically influenced
by other non-random sources of income or wealth.

Case 1: with whatever sum you win you must buy food &c for a
month; if you have no money you die.  The "million dollars chance"
sees you dead 99.9901 times out of 100, which to most individuals
means huge negative utility; the "thousand dollars chance" gives
you a 99.9% chance of surviving.  Rational individuals in this
situation would always choose the 1000-dollars chance unless the
utility to them of the unlikely million was incredibly huge (which
generally means there is some goal enormously dear to their heart
which they could only possibly achieve with that million).

Case 2: the sum you win is in addition to your steady income of
100,000 $/month.  Then, it may well be that $1000 is peanuts of
no discernible use to you, while a cool million would let you
take 6 months' vacation with no lifestyle reduction and thus has
good utility to you.  In this case a rational individual would
prefer the million-dollars chance.


> Therefore, the only thing pertinent to this question seems to be the
> risk and gain assessments.

Your use of 'therefore' is inapproprite because it suggests the
following assertion (which _is_ mathematically speaking correct)
"follows" from the previous paragraph (which is bunkum).  The
set of (probability, outcome) pairs DOES mathematically form "the
only thing pertinent" to a choice (together with a utility function
of course -- but you can finesse that by expressing outcome as
utility directly) -- the absurdity that multiplying probability
times outcome (giving an "expected value") is the ONLY relevant
consideration is not necessary to establish that.


> Another relevant meme that is running around in this newsgroup is the
> assumption that some people are naturally smarter than other people.
> While I can certainly see the advantage for certain people for keeping
> this illusion going (it's a great way to make money, the market
> doesn't pay for what it gets but for what it thinks it gets) there is
> not a lot of credibility in this argument.

*FOR A GIVEN TASK* there can be little doubt that different people
do show hugely different levels of ability.  Mozart could write
far better music than I ever could -- I can write Python programs
far better than Silvio Berlusconi can.  That does not translate into
"naturally smarter" because the "given tasks" are innumerable and
there's no way to measure them all into a single number: it's quite
possible that I'm far more effective than Mozart at the important
task of making and keeping true friends, and/or that Mr Berlusconi
is far more effective than me at the important tasks of embezzling
huge sums of money and avoiding going to jail in consequence (and
THAT is a great way to make money, if you have no scruples).

Note that for this purpose it does not matter whether the difference
in effectiveness at given tasks comes from nature or nurture, for
example -- just that it exists and that it's huge, and of that, only
a madman could doubt.  If you have the choice whom to get music
from, whom to get Python programs from, whom to get as an accomplice
in a multi-billion scam, you should consider the potential candidates'
proven effectiveness at these widely different tasks.

In particular, effectiveness at design of programming languages can
be easily shown to vary all over the place by examining the results.


> Of course there is a lot of variation between people in the way they
> are educated and some of them have come to be experts at certain
> fields. However no one is an island and one persons thinking process
> is interconnected with a lot of other persons thinking processes. The

Of course Mozart would have been a different person -- writing
different kinds of music, or perhaps doing some other job, maybe
mediocrely -- had he not been born when and where he was, the son
of a music teacher and semi-competent musician, and so on.  And
yet huge numbers of other people were born in perfectly similar
circumstances... but only one of them wrote *HIS* "Requiem"...


> there are those that first leap and then look. It's fascinating to see
> "look before you leap" being deprecated in favor of "easier to ask
> forgiveness than permission" by the same people that would think twice
> to start programming before being sure to know all the syntax.

Since I'm the person who intensely used those two monickers to
describe different kinds of error-handling strategies, let me note
that they're NOT intended to generalize.  When I court a girl I
make EXTREMELY sure that she's interested in my advances before I
push those advances beyond certain thresholds -- in other words in
such contexts I *DEFINITELY* "look before I leap" rather than choosing
to make inappropriate and unwelcome advances and then have to "ask
forgiveness" if/when rebuffed (and I despise the men who chose the
latter strategy -- a prime cause of "date rape", IMHO).

And there's nothing "fascinating" in this contrast.  The amount of
damage you can infert by putting your hands or mouth where they
SHOULDN'T be just doesn't compare to the (zero) amount of "damage"
which is produced by e.g. an attempted access to x.y raising an
AttributeError which you catch with a try/except.



Alex





More information about the Python-list mailing list