some random reflections of a "Python newbie": (1) books, and free sites

Alex Martelli alex at magenta.com
Thu Dec 9 05:40:20 EST 1999


I've started playing with Python (starting with a strong
background in C++, Perl, and sundry other matters),
and I would like to share a few reflections, in the hope
that I'll receive help on some of them, perhaps stimulate
useful action with others, and maybe (through either
my reflections, or, more likely, ensuing debate) be of
some help to other newbies, too.

(Btw, my newsfeed's flaky -- if it were possible to cc
me on any reply posts, I'd be grateful -- TIA!)

Please consider "IMHO"'s to be liberally inserted in
what follows, of course!-).  

In this post, I cover 2 things (executive summary:-):
1. what put me off Python for so long?
    Short answer: the book "Programming Python" did.
2. there appear to be no providers of free webspace
    that will let one put Python scripts behind the pages,
    while, if one wants to use Perl instead, some can
    be found -- and I find this to be a real pity.

Other issues, more about language and less about
environment, I'll pursue in a separate post later.


OK, here come my ramblings...:

1. why just now?

Why didn't I start playing with Python much earlier?
After some introspection, I think I can answer: the
book "Programming Python", which I read quite a
while ago, _put me off_.  I've tried re-reading it
now, with a better grasp of Python, and still find it
chaotic and offputting.  The contrast with "Programming
Perl", which I find a very, very well written book, could
not be stronger.  A language as _clean_ as Python
deserves a better, _cleaner_ book.

And it's got it, too -- "Learning Python" is _MUCH_
better.  "Internet Programming with Python", while
burdened under a _truly_ silly title (whose idea was
it...?), is also the kind of book that really makes one
itch to go and try out the powerful, beautiful things
it's explaining -- I'm happy I overcame the strong
reluctance to try it, that the title initially gave me.

It's no doubt a matter of taste -- I do _not_ like
books, which purport to be introductions to a
language, which try to teach by presenting "true"
and/or "significant" applications prematurely; my
taste runs strongly towards _simplified_ examples,
"toy" ones if you will, that show the language's
features more starkly, without mixing them up
with application-domain-dependent issue.  It's
also why, e.g. in the realm of C++ books, I love
Lippmann & Lajoie's Primer, Eckel's "Thinking in
C++" 2nd ed, and Meyer's "Effective C++" (CD),
_vastly_ more than Stroustrup's "C++ Programming
Language".  There is, of course, a time and place
for "significant" examples -- but it's not "right off
the bat".  IMHO, as usual, and I know people whose
tastes run strongly towards the other extreme.

Books matter -- a lot.  I just got the "Top 10 of
1999" list of computer books from amazon.com:
out of the 10, 3 are about Perl, 3 about Java, 1
about C++, 2 about object-oriented design, 1
about relational databases.  Mostly a reflection
on the popularity of the subjects, I guess, but,
to some extent, of the books' quality too -- and
such lists will tend to make even more people
read those books (an example of what economists
call a "network effect" -- a term which predates
the Internet, and describes products that become
more valuable to each user when they have more
users, in a "positive feedback" kind of loop).

I'll do what I can (not much) by posting my
reviews to amazon &c, with cross-pointers to
the books I liked from those I didn't, and by
recommending to those who ask.  Maybe the
www.perl.org site should host book reviews too,
helping newbies choose the book that might be
most appropriate for them, else the natural
tendency might be to go for "Programming
Python" and away from one, hard to get hold
of by now and sounding by its titlte as if it's only 
about one specific application area, such as
"Internet Programming with Python".



2. apparently, no free webspace providers support
    Python scripting

I asked about it here the other day, got zero
answers, and meanwhile diligently combed the
net looking for one.  No such luck.  If one wants
to write _Perl_ scripts, fine -- it takes some
looking, but one can find half a dozen providers
that will let you do it, some even without imposing
their ads on your pages.  I've asked each and
every one of them if they would consider adding
Python too -- apparently, none is interested.

I find this to be a real pity.  I would like to make
freely available, to the interested segment of the
public, certain computations, and being able to
place them as scripts behind a free webpage would
be a splendid way to serve them up.  And I want
to redo them in Python from the rather chaotic
Perl version (and the reduced-functionality C++
version) I have now, too.  But I do not know how
to do both things... it's either keep them in Perl,
or give up the idea of having them as scripts
behind a free webpage.

More details... the realm of these computations
is analysis of probability values in the game of
contract bridge.  I have some classic computations
wrapped up in a VC++ application that can be
freely downloaded from my webpage; I have a
much more advanced/innovative set of ideas, 
packaged as a somewhat chaotic ramble of Perl
scripts and ad-hoc C thingies (not very well
integrated with each other), which allowed me
to get some results that are being published in
the prestigious "The Bridge World" (Jan 2000
issue), where the editor described them as
"taking a giant step" towards the resolution of
certain age-old issues in the game's theory.  But
I really cannot distribute that mess of fragile
code -- I _have_ to re-do it "properly".

Python would be a natural for this.  Among
other things, having long-integers available
would enable a very simple approach to the
combinatorial computations I need -- with
longs, computing, say, the factorial of 52, if
and when needed, is no problem at all... what
a wonderful thing!

However, packaging things up for distribution
as Python scripts would mean any interested
users would have to install Python -- and, with
Python 1.5.2, on Windows98, I keep getting
strange crashes and blocks (with any of IDLE,
python.exe, and PythonWin) -- I cannot really
recommend it to people not very knowledgeable
about computers to start with (on Win/NT, no
such problems, but /98 is what most people
will have) -- the release notes of PythonWin's
current version even mention that, although
those of the other environments don't.

Perl is more widely installed, and more solid on 
/98 right now, but only a partial solution; to
reach a wider audience of bridge analysist and
theoreticians interested in trying out my ideas,
I really need to distribute a more "stand-alone"
packaging... OR, and that would, I think, be just
the ticket, I could place some programs as CGI
scripts (or other, more efficient ways of allowing
remote execution on the web).

But, apparently, this latter option does not exist
now, unless I'm willing to write my stuff in Perl,
or, I guess, to spend money to purchase some
"professional" web-serving (which apparently does
not come cheap).

This is a real pity from my POV.  Such a deployment
would be, not a "killer" app for Python, for sure,
but, maybe, some sort of "jaywalker" app, which
might let Python gain a foothold in some niche (you'd
be surprised at how many bridge players, particularly
within that subset interested in analysis, theoretical
questions, etc, are in the computer field:-).

I wonder if the Python community, or some individuals
within it, are interested in this issue, of "showcasing"
Python's abilities in this way.  Or maybe I'm the only
skinflint who balks at spending money for web pages
(programmable in Python) which I could get for free
(if I would program them in Perl instead)...?


Alex





More information about the Python-list mailing list