Textbooks on Perl/Python

Alex Martelli aleax at aleax.it
Sat Nov 2 04:55:31 EST 2002


Alessandro Bottoni wrote:

> Alle 23:53, venerdì 1 novembre 2002, Jalab ha scritto:
>> Greetings all,
>> Any help in finding a university level textbook on the subject of
>> "Scripting languages" I am mainly looking for a book that covers Perl
>> and Python only as the 2 main scripting languages and that is written
>> for students, i.e. chapter summary, exercises, etc. I hate to force my
>> student to buy and study from two separate books.
>>
> 
> I do not know about Perl (I just keep myself away from it, if possible).
> Regarding Python there are at least two very good
> beginner's level books:
> 
> Learning Python
> Mark Lutz + David Ascher
> O'Reilly
> 
> Learn to program using Python
> Alan Gauld
> Addison Wesley
> 
> Neither one of them includes exercises or any other feature specifically
> intended for university students, unfortunately.

One that does include exercises and IS slanted towards university
students, particularly ones just learning to program with Python
as a first language, is Deitel and Deitel's "Python How to Program".

I'm ambivalent about it -- I was a tech reviewer so cannot be
unbiased, I guess.  On the minus side (from my POV), it's HUGE
(I like smaller books better than larger ones) and some of the
advice and framing it gives is more appropriate to other
languages (more "static" than Python) than to Python itself.  On
the plus side, it's quite thorough and, well, didactic.  I'm
helping a friend, bright but not a programmer, learn programming
with Python, and she tells me that, while she liked Gauld's book,
when it was done she felt still far from secure with Python and
with programming -- good on the overall view, scarce, from her
point of view, on the nitty-gritty.  She's now proceeding with
"How to think like a computer scientist" (Python edition) from
the net, and so far is pretty happy about how it complements
Gauld's text, with more details &c.  But if one wants just one
book, this seems to count as a defect of Gauld's text; Deitel
and Deitel, I think, would not suffer from it -- if and when a
student manages to work all through it, I think the student WILL
feel pretty confident in their mastery of the subject.

Another book worth mentioning in this context is Magnus Lie
Hetland's "Practical Python".  Again I can't be unbiased about
it (because I was a technical reviewer for it, too, AND because
I think of Magnus as a friend though we've never met face to
face).  It does lack chapter exercises, and it IS a pretty big
book, but I like the informal, communication-rich style, and I
think it's didactically very valid.  Half the book (the half I
didn't tech-review) is made up of completely worked-out
*significant* examples: if one appreciates this didactical
device, it's hard to find it better used than in Magnus' book
(personally, I'm of two minds about it; overall I think I prefer
many small toy examples rather than fewer larger significant
ones, but I surely know many people whose preferences are for
examples that are actually useful working programs).

But this still doesn't answer the OP's request for a book that
teaches BOTH Perl and Python, particularly one with all the
typical devices used in university textbooks, such as per-chapter
exercises.  I don't think such a book exists, and for a good
reason: tiny demand.  Not for the 'exercises' part, which would
be a good thing to consider for anybody writing textbooks, of
course.  No, the problem is with having a single book teach two
disparate languages.  I have a few such books and invariably they
gather dust somewhere in the back rows of my shelves... by
trying to do two things at once, they generally can't do either
as well as a book that focuses on just one of them.


> BTW, this would be an opportunity to write such a book, maybe as a
> collective effort coordinated by the educational SIG (special interest
> group) of python, maybe starting from the very good book of Alan Gauld.
> This approach could cope with the small market available for the book.

And where would you find the volunteers, experienced AND happy
with both Perl and Python, to do the writing?  Quite a few
Pythonistas do have Perl experience, but few have any _liking_
for it (there are surely exceptions, such as our homonym who's
now working for our previous employer, but I have my doubts that
there are enough of them...).

> (Here, I suppose you need a book devoted to programming with Perl or
> Python, not a book on creating language interpreters).

A book with a definitely-tiny market BUT perhaps enough enthusiasm
level among prospective authors to make it a reality would indeed
be one explaining how to write interpreters in C and Java, using
Classic Python and Jython as the worked-out examples;-).


Alex




More information about the Python-list mailing list