[TIP] Python Testing book review

Tarek Ziadé ziade.tarek at gmail.com
Sat Mar 6 11:25:05 PST 2010

On Sat, Mar 6, 2010 at 7:55 PM, C. Titus Brown <ctb at msu.edu> wrote:
>> However, in my experience Packt's books tend to suffer from some
>> pretty bad editing / checking. All it takes is a good reviewer to *run
>> the code* in the book. All of their books are feeling rushed, and I
>> feel bad for the authors, since it reflects on them.
> All it takes is a *good author* to run all the code in the book, first ;).
> I wrote some hacky little doctest-style code to make sure that the
> basic examples in my book worked.  Highly recommended approach.

It's not enough.

I've done that with my latest book for most examples, but you cannot
have a fully-covered book because some code snippets cannot be
doctests. You would need to write test fixtures that would be longer
than the book itself to have a good test coverage because a book is
simply not an application.

Plus, in the process of writing a book, you have most of the time a
tight schedule and the
editor pressures you to return chapters on due dates, telling you that
a bunch of reviewer will check
everything on their side.

At the end, when you get back all the reviews, and have a gut feeling
that you need to do more reviews yourself, the editor tells you that
it needs to be published asap, it's hard to tell him:
"no, I don't want it published now, I want to have 2 months to review
everything again".
(and you are also really tempted to finish the project because its exhaustive.)

The best editors out there won't do that: they will make sure the book
is properly reviewed before its published, and "force" the authors to
review and review again their work until its perfect.

I've suffered from that and the latest book I've written was not
enough reviewed imho, and could've been a much better book if I had
more time to review or if I had better reviewers maybe. So I have a
lot of empathy for the author of this book and I kinda agree with

Last, FWIW, I must admit that Packt does a much better work than any
french editor I worked with, where there are *no* technical reviewers,
or when they have one, it's someone who barely take a look at the code
examples. The only techical reviewer I had on a french book was not
familiar with Python :)

My 2 cents, as an author of 3 books about Python


Tarek Ziadé | http://ziade.org

More information about the testing-in-python mailing list