http://www.perlmonks.org?node_id=114680
Order Perl! I Didn't Know You Could Do That...

Item Description: A Showcase of Perl and Many CPAN modules

Review Synopsis: A Gimmick book. Don't Bother.

According to its introduction, "Perl! I Didn't Know You Could Do That... (PIDK) attempts to, "highlight some of the cool things you can do with Perl that you might not necessarily be aware of." Certainly the book's Table of Contents suggests that author Martin C. Brown covers a wide variety of topics in the book's 213 pages (not counting the index). However, I strongly suspect that your satisfaction with the book will depend greatly on how broadly you define "highlight."

PIDK isn't a traditional technical book; it's more of a collection of tidbits designed to showcase some interesting, perhaps even cool things to do with Perl and different CPAN modules. It provides 51 separate essays loosely grouped together in various topic areas. There's a little bit of CGI, a little bit of system administration, a little bit of Perl internals, and even a little bit of platform specific stuff for PalmOS databases, Mac interface design, Microsoft Office integration, and (of course) Unix tools.

Given the number of topics, you might be afraid that Brown isn't able to cover his material very well or very deeply. This is a valid fear, given that each topic has an average of four pages of material devoted to it, including code fragments, tables, and screenshots.

Brown resorts to a number of unsatisfying tricks to achieve this. First, the book doesn't provide complete code listings in the prose itself. While each topic comes with one or more code samples, they're only available on the book's CD and frequently un-commented.

(Personally, I prefer to see code samples presented and discussed in a book's prose, as is done in CGI Programming with Perl, Effective Perl Programming, Writing CGI Applications with Perl, and in the periodical columns of a certain monk of note.)

Placing the code only on the CD has other drawbacks. You're not able to determine its quality until after you've bought the book and broken the no-refund seal. Only then are your worst fears realized.

It's not that the code samples are necessarily bad or poorly written; however, they're not well-written. Few use strict or -w and none of the CGI examples use -T, though they do use CGI.pm. Not deeply, but they do use it.

Brown also avoids any depth in his topics, preferring an anectdotal style that can be charitably described as "breezy." While it makes for readable prose, it doesn't provide much in the way of value or education. Sometimes, these introductions border on the inane. For example, consider the opening sentence of Item 8, Using SQL with Text Databases:

E-commerce is the buzzword of the moment.

When I first read this, my initial reaction was, "Duh!" While the next few paragraphs build a case for creating database-driven web sites, he concludes his argument with the following:

Even though mySQL or PostGresSql (sic) are free, they still need maintenance and support, which a simple text file does not.

As you might expect, he uses this to demonstrate DBD::CSV; however, any capable database programmer will tell you that while text files can be easier to maintain and support than proprietary database formats, all databases require maintenance.

A few pages later, Brown provides an adequate introduction to the main SQL DML statements. However, as is typical for the book as a whole, he ignores the DDL statements. (If you're looking for an introduction to SQL and/or effective database programing techniques with Perl, I highly recommend O'Reilly's Programming the Perl DBI: Database Programming with Perl, which contains a far superior introduction to SQL and a more relevant introduction to DBD::CSV.)

On the other hand, there are a number of topics that could be of interest to nearly everyone. Item 37, converting POD Files on the Fly is an interesting read for folks that are still coming up to speed on the Unix mindset and Item 28, Searching a Search Engine, shows whether or not (as of the book's writing) various WWW::Search modules were working. (I assume that things have changed in the interim, but that list is a good starting place.)

This "half a loaf" approach is seen throughout the book. For every interesting thing shown, there are a host of issues that are sidestepped or ignored. Frankly, I suspect you'll get more out of the POD of the CPAN modules involved than you will from Brown's keen insights into their use. Similarly, I suspect that many of the best ideas are already in the archives.

Now, I admit that it's possible to argue, "it's not that type of book. It's just a showcase of cool tricks." However, the book's "concept" is in itself a problem.

You may know that IDG's "Dummies" books are considered the most successfully marketed series in technical publishing. As we've seen in various knock-off series that've appeared over the years (Idiot's Guide to Foo, Teach Yourself Foo in a Ridiculous Time Frame, Foo for Smarties, and so on), books designed around marketing concepts rarely succeed in providing satisfactory experiences for anyone other than the publisher. The same is true of Sybex's I Didn't Know You Could Do That... series, each of which sports photos of monkeys and lots of bananas.

PIDK is part of that series, which also contains titles covering MP3's, iMacs, basic Internet useage, and other introductory titles. Clearly, this isn't a series targeted at programmers, which is too bad because the lack of useful specifics in the prose means a lot of people are going to think Brown's code samples are idiomatic and should be studied for good programming practises. Ouch.

As with other "concept" books, PIDK follows a certain formula. Each page contains one of nine different photographs of monkeys, a banana appears on the back cover, and so on. It's meant to be clever and approachable; unfortunately, it's tiresome, distracting, and (eventually) annoying--like a good joke told too many times.

Please understand that I agree that there is a place for the various series and that selected titles in those series are quite good. This isn't one of them. It's not overtly bad, just limited and--frankly--mediocre. Given the quality we get with most of O'Reilly's titles (and notable other titles), mediocrity just isn't good enough for the Perl market.

To be completely fair, there's enough material in the book to provide at least one helpful tidbit. Just be aware that you're going to put up with a lot to get to it. Given the number of quality titles available, I can't see many people thinking their $25/U.S. will be well spent.

PIDK isn't as bad as some of the titles we've reviewed previously, however, it's nowhere as useful as others. It was written to fit a marketing concept and--frankly--I'd rather see people support Perl authors that teach what you need to know rather than pander to some marketing gimmick.

Your mileage may vary, of course. I can see some appreciating the high level overview that Brown provides to various topics. I can see others taking and building on the framework he provides. If nothing else, it's nice to learn more about some of the better modules on CPAN. However, you'll need to make that decision for yourself.

Because of this, I strongly recommend you not buy this book online--unless you like to gamble. If you happen to see it in a bookstore, then certainly take some time to leaf through it and see if there might be something interesting. Keep in mind, however, that the book's breadth also means there are going to be topics that will not interest you.

If I graded books using letter grades, I'd probably give this one an "E" for effort. It may help one monk out of a hundred; however, I personally find the prose too superficial, the code samples too limited, and the marketing ploy too cheap to give this anything more than Two out of Five Camels.

Table of Contents

  1. Introduction
  2. Data Manipulation
    1. Storing Numbers in Less Space
    2. Creating Graphs in Perl
    3. Using Minimal/Maximal Matches
    4. Parsing an Apache Log File
    5. Reading and Writing Audio Files
    6. Playing Audio CDs
    7. Handling PalmOS Databases
    8. Using SQL with Text Databases
  3. Text Manipulation
    1. Talking HTML
    2. Checking Web Pages
    3. Talking XML
    4. Creating a Searchable Index
    5. Searching/Replacing Text Information
    6. Generating RTF Files
    7. Writing PostScript
  4. CGI Tricks
    1. Using the CGI module to write HTML
    2. Better Table Handling
    3. Setting up a Cookie
    4. Reading a Cookie
    5. Using Sessions to track a User
    6. Sending binary Files
    7. Cooperating with Apache
    8. Using Apache Authentication
  5. Networking
    1. Resolving DNS Information
    2. Getting E-mail from a POP Server
    3. Getting Usenet Messages
    4. Searching a Search Engine
    5. Running a Socket-Based Server
    6. Accepting Multiple Connections
    7. Remote Procedure Calls
  6. Development Tools
    1. Compiling your Perl Scripts
    2. Using the compiuler for More than Compiling
    3. Writing Perl Xtensions (sic)
    4. Installing Modules from CPAN
    5. Writing POD Documentation
  7. System Management
    1. Monitoring Performance
    2. Monitoring Uptime
    3. Communicating with syslog
    4. Reading and Writing Tar Archives
    5. Using Perl to Control Your Home
  8. Platform Specialties
    1. Communicating with Applescript
    2. Developing a MacOS Interface
    3. Checking Windows NT Performance
    4. Talking to Microsoft Word
    5. Talking to Microsoft Excel
    6. Talking to Microsoft Outlook
    7. Windows NT Service Management
    8. Creating Stand-Alone Windows Applications
  9. Index

--f

2001-09-25 Edit by Corion : Added missing </OL> tag

Update: fixed various typos. (thanks, grinder!)

  • Comment on Perl! I Didn't Know You Could Do That...
Replies are listed 'Best First'.
Re: Perl! I Didn't Know You Could Do That...
by Hanamaki (Chaplain) on Sep 28, 2001 at 20:28 UTC
    Additional information:

    Part 3 -- covering the 34 pages of Chapter 16 Using the CGI Module to Write HTML to Chapter 24 Faq Management -- is available online as a free sample pdf file at the publishers Product page.

    Hanamaki
    ...who wishes all reviews were written like this one.
Re: Perl! I Didn't Know You Could Do That...
by initself (Monk) on Dec 10, 2005 at 06:45 UTC
    From an advanced users standpoint, your points are valid. But that's not who this book was written for. It was written for newbies who might read some of the potentials of Perl, salivate, and then start trying to learn the techniques to enable them to actually code some of the ideas in the book. Hey, it worked on me!