Book Reviews

The following book reviews are the copyright of their respective authors and no part should be reproduced without the express permission of the author. Publishers and Authors of the books reviewed may reproduce the whole or extracts of a review for their book. To request copyright permission please email webmaster@birmingham.pm.org.

All the reviews herein are the opinions of the reviewer and are not necessarily the views of Birmingham Perl Mongers and its members. If you feel a review or comment has been made in error, please contact webmaster@birmingham.pm.org to rectify the situation.

Perl Books

Static Link: http://perl.grango.org/reviews/54

 
Minimal Perl
Title:Minimal Perl
Author(s):Tim Maher
ISBN:1932394508
Publisher:Manning
Reviewer:Andrew Ford

I really tried to like this book, but each time I tried to look at it objectively I felt my blood pressure rising again (I read it first from cover to cover on a long train journey and went back to it several times later over the next couple of months). I know that Tim Maher is a respected member of the Perl training community, and the book comes with a foreword by Damien Conway, but I would be wary of anyone who said that they had learned Perl from this book. I am surprised by the foreword, as the style of coding presented here flies in the face of much of Conway's "Perl Best Practice".

My main issue is that the book teaches some very strange habits, such as omitting whitespace around equals signs in assignment statements to make the code look more like Shell code. To me this is specious - the syntaxes of Shell and Perl are quite different and I don't believe that beginners need crutches like that. I was also surprised at the lack of any mention of testing given how seriously it is taken in Perl culture. I am also not convinced that there are so many users of Shell, sed or AWK, who do not also have some understanding of more conventional programming languages.

My other gripes are that the book is too wordy, and that the examples make me cringe. I'm sure the content could have been cut down to half its current length without any significant losses. Maher rails in his introduction at other books for their "tired formula" of silly chapter headings and dumb jokes". He does avoid the silly chapter headings but his choice of characters and scenarios, such as "Rambo's Shopping Card" and "Britney's Jewelrey Database", or "Diggety Dog, a rapper ... who validates his lyrics with Perl", just turn me off. And I'm not even going to get started on his running joke of "Perlistan".

I know that there have been some quite positive reviews of this book on slashdot, Amazon and elsewhere, so maybe it is just me. However I would rather recommend the O'Reilly "Learning Perl" title by Schwarz and Phoenix, or the free "Picking up Perl" by Bradley M. Kuhn (http://www.ebb.org/PickingUpPerl/).

----

Following the publication of the above review, I have been contacted by the author of Minimal Perl, Tim Maher, who asked that the he have the opportunity to follow up the comments Andrew made in his review. As such, what follows is Tim's response:

  1. Mr. Ford says, "I am surprised by the foreword [by Damian Conway], as the style of coding presented here flies in the face of much of Conway's 'Perl Best Practices'" [PBP].
    • I (Tim Maher) believe, as does Damian (see PBP p. xv), that Perl "best practices" are not absolute mandates, but instead a particular collection of coding suggestions intended to help the majority of Perl programmers write better code.

      As a historical note, there was some discussion in the Perl community about whether Damian's PBP book should be called "Perl Programming Guidelines" instead. I made this suggestion to avoid the unintended implication (see PBP p. xv) that the book's recommendations were "written in stone", and that Perl's TMTOWTDI era had abruptly come to a close. Obviously, the more grandiose title won out, leading to the anticipated confusion.

      In any case, Minimal Perl (MP) generally follows the "guidelines from the book Perl Best Practices, but only where they don't conflict with the 'prime directive' of catering to +UNIX and Shell sensibilities." (MP, p. xxxii).

  2. "omitting whitespace around equals signs in assignment statements to make the code look more like Shell code ... is specious — I don't believe that beginners need crutches like that."
    • As one of the few people on the planet who's targeted his Perl training solely to individuals coming from a UNIX (and/or Linux) background — and who's successfully taught many thousands of such people to program in Perl — please believe me when I tell you:
      • There's little that a Perl instructor could do that would have a more lethal effect on the (non C-) Shell programs subsequently written by novice Perl programmers than to teach them to use whitespace around "=" in Perl assignments!
      As I stated on p. 27 of the MP book, Perl novices "have enough trouble dropping the Perlish leading $ symbol when assigning to Shell variables without also remembering to omit the whitespace around = that Perl allows."
  3. "I was also surprised at the lack of any mention of testing ..."
    • Like you, I consider testing skills to be valuable to professional programmers writing production code. However, like authors of other introductory Perl books, I chose to spend my ink ration on topics of greater import to beginners. (After all, most of the programs in the MP book are under a dozen lines in size! Testing is most commonly needed only in larger or more complex programs.)
  4. "his choice of characters and scenarios, such as 'Rambo's Shopping Cart' and 'Britney's Jewelry Database', or 'Diggity Dog, a rapper ... who validates his lyrics [as containing 4-letter words] with Perl', just turn me off."
    • I respect your right to be turned off by whatever you choose, but let's be clear that Rambo and Britney are only mentioned in passing (on p. xxv) as characters I've featured in my training classes — they aren't ever used in the book!

      On the other hand, "Diggity Dog" does indeed appear in the book — as do Felix and Oscar, Yoko, and the "wily Bell Labs veteran" who wins bets by writing impressively powerful one-line scripts on napkins in bars. Many readers have enjoyed the exploits of these characters (see http://MinimalPerl.com). But YMMV!

  5. "I know that there have been some quite positive reviews of this book on Slashdot, Amazon, and elsewhere, so maybe it's just me. However I would rather recommend ..."
    • I'm glad you have beginning Perl books that you like enough to recommend. But many others have been unhappy with what's been available thus far, and have enjoyed the fresh approach taken by the MP book well enough to make it a top-seller on Amazon (see http://manning.com/maher). This demonstrates that "There's More Than One Way to Do It" applies not only to Perl coding practices, but also to Perl training strategies. 8-}

Tim Maher, CEO
Consultix, Seattle WA
Author of Minimal Perl