[Tutor] Python Programming Books

wesley chun wescpy at gmail.com
Sat Jul 15 01:08:48 CEST 2006


(LONG... you've been warned ;-) )

> > andre wrote:
> >
> > I don't know about others, but I think it might be of benefit if you
> > could give an assessment that would include a description of the
> > weaknesses of the book
>
> I'm no expert since I've only browsed Wesley's book in a store
> a few times but it seemed to be solid introductory material and
> a fair reference. It gets good reviews from readers.
>
> My only negative comment was that it was a very big book for
> its content, mainly because the layout had a biggish font and
> a lot of white space. But some folks like that. And I'd definitely
> prefer too big a font over too small (cf Beasley's Essential
> Reference,
> its just too small for comfort for my ageing eyes)


andre,

good idea.  i should have done this in my earlier post.  Core Python
is definitely targeted at programmers already knowledgeable in one
other high-level language, so it is not the right book for the
absolute beginner and/or those with no programming skills.  the main
goal of the book is to get someone up2speed with Python as quickly and
as deeply as possible, because teaching Python's syntax isn't that
hard, but getting someone to be as *effective* a Python programmer as
possible in the shortest amount of time is the challenge.  (you know
that feeling, after you've just learned a language, where you can sort
of write code in it but doesn't feel like 2nd nature yet?  i want to
shorten that time as well as minimize the number of bugs by teaching
not to write them to begin with.)

as alan has mentioned, the book is rather large and a burden to carry.
 this was partially my fault, and for the second edition, *definitely*
my fault.  let me explain with a short anecdote:

for the 1st ed, the publisher wanted 500 pages, and i said, "what, are
you crazy?  i can't write that much! how about 300?"  they repled with
something to the effect of, "ok, how about 350 and we'll order the
extra thick paper."

so i wrote and wrote, and came up with something around the original
500 pagecount they wanted, but this was plain text and images without
any formatting.  so when they took the manuscript
and reformatted everything to conform to the "Core" series, margins,
logos, paragraph types, etc., it suddenly exploded to 800 pages, and
the thick paper had already been ordered.  so apologies to alan and
everyone for the fact that this book was so thick.

for the 2nd edition, the plan was to split up the book like Core
Java... a Vol1 with the main core material and Vol2 with the advanced
stuff.  the publishers didn't feel there was a market need for
advanced books so they canned my idea.  so now, with every edition, i
will continually add more and more materials until they have no choice
but to split it up.  :-)  so that's why it's my fault for the upcoming
edition.  hopefully the publisher will order then thinner paper this
time.

back to weaknesses...

i want to have full chapters on XML, Win32 programming, XML,
Java/Jython, web frameworks (Django, TuroboGears), content mgmt
systems (Zope, Plone), Embedding Python, web tools (Cheetah,
SQLObject, Kid, Myghty, FormEncode, CherryPy, etc.), Web Services/APIs
(REST, XML, SOAP), other GUIs (wxWidgets, GTK+, KDE/Qt), etc.  but
sadly i don't have the time or expertise to have done all of those
chapters -- this is definitely for future editions.  for the 2nd ed.,
at least i was able to add full chapters on Internet Client
Programming (FTP, NNTP, POP3, SMTP) and SQL/Database Programming
(various topics like SQL review, DB-API, MySQL, PostgreSQL, Gadfly,
sqlite, SQLObject, and SQLAlchemy) as well as ramp everything up to
2.5 and even some 2.6 and 2.7 features that have already been set in
stone.

another "weakness" -- i'm not sure it's is really a weakness as
opposed to a preference -- is that some folks have told me of their
desires of having lengthier code samples, i.e., complete applications
as well as cover advanced topics even deeper.  while the book does
indeed cover the core stuff deeply, i don't have enough room to pound
into advanced topics.  i do have chapters on regular exprs, network
programming with sockets, multithreaded programming, GUI programming,
web/CGI programming, and extending Python, but i guess after learning
the core stuff, they really want to get as deep into these advanced
topics, which i don't provide.

perhaps that wasn't the goal of the original book, which was to teach
the core parts of Python.  i only added the advanced topics chapters
after completing the first part of the book, but was thinking, "gee,
i've taught people Python well, but haven't shown them what they could
*build* with it yet!" so that's where those chapters came from.

as far as the lack of longer code samples goes, as a technical
trainer, my experience has shown that short and concise examples are
better for the reader.  they can absorb smaller examples completely
and learn the material better than wading through 5-10 pages of source
code for a larger application.  furthermore, the exercises i have at
the end of each chapter let's the *reader* write the full-size
applications, which again, is better for learning purposes.  you
master any language (not just Python) faster if you're the one writing
the code, not just passively reading it.  there's no substitute for
experience.

i've posted both good and not-so-good reviews on the book's website,
so feel free to check out the reviews page for any more weaknesses.

i would rather talk about the strengths of the book, which are:

- prose: i write in a very conversational style; the book reads as if
i was speaking to you at one of my courses... it's not even close to
being a "dry college textbook."  because of this, the reading is fast
and easy.  i also respect the reader.  i am not your guru and won't
insult you if you don't know C or Java.

- exercises: tons of problems at the end of every chapter.  the more
you practice, the faster you learn and the better you get at Python.

- version-independent: i am aware that different ppl use different
versions of Python.  i also know that Python continues to have
releases adding new or changing existing features. in the book, i
carefully "tag" features indicating which version(s) of Python they're
applicable for so you can either read material or skip it, based on
its relevance to you.

- organization: the book is put together in a very deliberate order.
the flow is very logical.  yes, chapters can be skipped, but you won't
be lost even you do.  we don't jump around.  we cover the basics then
go deeper.  that's how each chapter works as well as how the book is
put together as a whole.

- background: i hope that my combination of being a software engineer
by trade plus my experience as a teacher make the book compelling for
those wanting to learn Python.  i've been an engineer since 1989, been
teaching and writing since 1983, and began programming back in 1981.
i know what technical people need to pick up a new language and how to
teach it effectively. i don't believe full-time authors and trainers
can deliver the same stuff if they are not engineers or programmers by
profession too.

- editing: i'd like to think of the editing as very good.  i'm very
paranoid about mistakes, code errors, grammar, and spelling.  i make
strong attempts to minimize the Errata pages as much as possible.  i
can spot 2 spaces between words. this doesn't mean that the book will
be error-free or that the editorial staff will clean up every single
mark i make during the editing phase.  i just means that i care.  i
like to scope the competition and find weaknesses with other books and
capitalize on them.  (this is sort of how Python is like a "greatest
hits" of the languages that Guido has studied... he picks their best
features for Python.) writing a book is hard... writing a *good* book
is even harder, and i want *you* all to say that i wrote a good book,
so i try to put some effort into it.

ok, enough time on the soap box... back to your normal tutoring schedule....

hope this helps!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
    http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com


More information about the Tutor mailing list