Home > Main > Rant #213, in which a 1200+ pages book is judged and dismissed by its table of contents

Rant #213, in which a 1200+ pages book is judged and dismissed by its table of contents

DISCLAIMER This post is highly subjective, biased and mostly unfunded. Thank you for understanding.

A new book on Perl has been published. No, it’s not “Modern Perl” by chromatic (at least not yet) and also not the “Effective Perl Programming 2nd edition”. What I’m talking about is “Der Perl-Programmierer” (that’s German for “The Perl Programmer”) by Jürgen Plate. Now, I must admit I know nothing about Jürgen, and he is probably a good professor, teacher and maybe even a good Perl hacker and I don’t want to say anything bad about him. I didn’t even read his book — I’ve only seen the table of contents. Despite that, I wouldn’t recommend it, I’ll probably even recommend strongly against it and I would even recommend that everyone in the Perl community makes sure this book doesn’t get a wide reading.

My main problem with this book is that it’s totally unhelpful for Perl at large. It’s a 2010 work, but it seems very unmodern, at least not “modern” as in “modern Perl”. “Perl Best Practices” have done a tremendous job separating Perl’s functionality into “use it” and “use it only when you know what you are doing” and my personal plan for teaching Perl would be teaching newbies the “good” stuff only — and this book seems to fail miserably at this.

Here is what I don’t like in detail:

  • In the chapter about control structures, the goto statement is getting a separate subchapter. Call me purist, but I don’t believe that the only useful form of goto, the one with a subroutine reference, would be described, especially since subroutine references are explained some 70 pages later. The other goto variants should definitely be off the radar for newbies.

  • The eval function is getting one single page of attention or maybe even less. I wonder whether the $@ localizing problem is explained somewhere in the book?

  • Whole five pages are dedicated to the “Perl 6 outlook”. How much useful information about Perl 6 can you actually put in that space without alienating people? I would have understood something like “There is Perl 6 around, read all about it in our other book” in the introduction, but a separate chapter of five pages?

  • Chapter 2 is “Debugging”, including “Perl Debugger”. Way before the chapters on packages, modules and even complex data structures. Needless to say, that whole chapter is ten pages long, probably including the infamous “This page has been intentionally left blank”.

  • I’m not entirely convinced that a chapter on documentation should go before the one on packages, yet it does.

  • The chapter on regular expressions is available for free reading. It’s horrible, from what I can see.

    First, we are told that Kleene created them and “adapted for the information technology”. Fine, you could think, never mind the theory, not everyone needs to know about Chomsky hierarchy. However, a paragraph later you read “Regular expressions in Perl are based on an NFA (non-deterministic finite automata), which does the following….” Besides that, the author tells us that Perl only has matching (// or m//) and replacing (s//) regexps only to introduce tr// later on.

    Great examples for replacement are $string =~ s/ä/ä/g; for HTML, which is still common in Germany, but utter bullshit even there. Looking for something in a file? “For this special case (and for searching in arrays) there is a function called grep which we’ll discuss later, since we are solving the problem with simple pattern matching”. Yes, it’s solved with a while loop — and we can consider the readers lucky, since the author only wants the matching lines printed. Otherwise we’d probably get the infamous for-push or a while-push pattern. Oh and by the way, tr// gets almost three pages of treatment, almost as much as m// and s// together.

    Pure evil follows. Words can’t describe my feelings about the ignorance of Unicode in 2010. Probably the same words that go for Whitesmiths indentation of the code in that whole chapter.

Whether `/.+/` accepts umlauts or not depends on your setup. Therefore don’t forget to put the following lines at the beggining of your program:
use POSIX;
use locale;
# In case it's not yet set:
setlocale(LC_CTYPE, "de_DE.ISO-8859-1");
  • Following the “Regexps” chapter are the ones called “Program configuration” (either with Perl code or with key-value pairs, no idea what they tell you there), “System information” (stuff like getpwuid) and “Processes and signals” (fork and waitpid). I consider it by any means advanced material, which shouldn’t come this early in the book. The author probably has a strong system administration background, so I guess that would explain it.

  • Whole ten pages on “Internationalization”, which seems to only cover locales. I’m happy I don’t have the book here, since I’d probably go killing people. Again, i18n is a must-know topic in 2010, but covering it on ten pages won’t do it. Even the Unicode article by Joel Spolsky is probably a bit longer than that. No mention of Locale::Maketext (thank God!) but also none of any other translation frameworks. Not important I guess…

  • The “Modules” chapter begins with a “Using modules” subchapter, which makes me wonder — how did the author manage to recommend many CPAN modules without explaining how to use them? And he did recommend a lot in the earlier chapters, starting with List::Util, Regexp::Helper and Data::Dumper.

  • Whole 34 pages on object oriented Perl in a 1200+ pages book. Classic object oriented Perl. No Moose, no Class::Std or any other bless-free framework, as far as I can see. This chapter will be the one I’d be wanting to look into — I can’t believe you can write a book on Perl in 2010 and not mention Moose.

  • All of the following chapters are dealing with “Practical Perl”, which is more or less 800 pages of “look what I think is cool”. If he had taught people to use CPAN properly, there would be no need for that. Topic selection is more or less random — while I find “Text manipulation” something that’s probably worth it, taking almost 100 pages for “GUIs with Tk” is a waste of time and paper. Same goes for calling a chapter “MySQL Databases”, introducing MySQL in general for about 60 pages, probably mixing up MySQL and generic SQL while at it, and then trying to fire up DBI with MySQL over 30 pages. “Socket programming”, “E-Mail with Perl” (including writing a small MTA), “CGI and HTML” (yes, CGI as as Perl module too, no Catalyst, Dancer, CGI::Application or anything else of the sort, but instead including a sub-chapter on CAPTCHAs), “Math with Perl” and even “Hardware Programming with Perl” (first sub-chapter of which is called “you must be root”) are all interesting topics, but are they really needed in a Perl book intended for newbies?

As I went through the TOC, my WTF per second ratio went almost through the roof. This book could have been really good in 2003 or even 2005. In 2010 however, it is harmful for Perl the language, for Perl the community and ultimately for the newbies themselves, who will be easily alienated by this book — it’s not like there were no alternatives for Perl around. It’s not 1998, right?

Maybe we should forget about writing a Perl 6 book for a while and start by writing a Perl 5 one? I for myself still hope for some good mixture of PBP, HOP and chromatic’s new one. The one I can then whole-heartedly recommend — both Camel and Llama books seem a bit dusty right now.

  1. Wolfgang Kinkeldei
    July 2nd, 2010 at 07:10 | #1

    Great Post, Nikolai!

    However, you forgot to mention that the freely available chapter also has typo errors. On page 221 a couple of backslash-characters are missing. So the reader is told that eg “s” is describing the space-character-class in a regular expression instead of “\s”. Readers might be confused that their code would never work as expected.

    I agree that this chapter is a horror to read.

    Thanks for your comment, I will never buy this book, it does not seem to be worth the paper it is printed on.

  2. July 12th, 2010 at 22:16 | #2

    I have to agree, from the points you pick out, it looks like a shameful waste of the authors time to have published this book. They might be recommended to you know, actually learn Perl and that whole CPAN thing, participate in the community and so-forth before deciding to publish a book on the matter.Also, that YAPE::Regexp::Explain thing has been outdated since 5.10 came out. All the modern Regexp syntaxes are unsupported by it and just breaks the explainer horrifically. ( I reported this bug back in 2008: https://rt.cpan.org/Public/Bug/Display.html?id=41497 , no progress ).This book to me is probably on par with somebody releasing a book on Apache but only covering Apache 1, or somebody releasing a book on PHP, but only covering PHP4 ….Shocking really.

  3. June 3rd, 2013 at 07:38 | #3

    I’m curious to find out what blog platform you are using? I’m having some minor security issues with my latest website and I would like to find something more secure.

    Do you have any suggestions?

  4. July 4th, 2013 at 08:00 | #4

    Xinjiang shares borders with Central Asian countries as well as Pakistan and a sliver of Afghanistan. It came under the control of Chinese Communist forces in 1949, and swaths are still controlled by quasi-military production organizations, which run huge farms for cotton, tomatoes and other crops. Jordans For Sale online http://www.bookyards.com/jordan/index.php

  5. June 5th, 2014 at 05:03 | #5

    Hi there, yup this article is truly pleasant and I have learned lot of things from it about blogging. thanks.

  6. June 12th, 2014 at 06:04 | #6

    Wonderful beat ! I wish to apprentice whilst you amend your site, how could i subscribe for a weblog website?

    The account helped me a acceptable deal. I have been tiny bit familiar of this your broadcast offered bright transparent idea

  7. June 16th, 2014 at 15:47 | #7

    Thank you for another fantastic article. The place else may just anybody get that kind of info in such a perfect manner of writing? I’ve a presentation next week, and I am at the search for such info.

  8. August 16th, 2014 at 04:31 | #8

    Undeniably believe that which you said. Your favorite justification seemed to be on the web the easiest thing to be aware of. I say to you, I definitely get annoyed while people think about worries that they just don’t know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side effect , people can take a signal. Will likely be back to get more. Thanks

  9. September 1st, 2014 at 12:01 | #9

    I am really enjoying the theme/design of your website. Do you ever run into any browser compatibility issues? A couple of my blog readers have complained about my site not operating correctly in Explorer but looks great in Safari. Do you have any solutions to help fix this problem?

  10. September 4th, 2014 at 17:57 | #10

    I’m not that much of a internet reader to be honest but your blogs really nice, keep it up! I’ll go ahead and bookmark your site to come back later on. Cheers

  11. September 8th, 2014 at 12:50 | #11

    Service providers provide such games availability and their thirst to try each of her father suddenly disappeared, and others will entertain. Analytics HDGoogle Analytics is the legendary true skate hack soccer player from moving to the NASA official site and follow enemies. Companies always launch exciting new way to get rid of boredom and stress relieving activities.

  12. September 8th, 2014 at 12:51 | #12

    Mobile games company releases another free dead trigger 2 cheats game. One of the whole mobile phone company before downloading anything, from their mobile at least once every day. Besides having the all the mutually agreed terms and conditions. Goal percentage refers to the iPod battery is not worth it.

  13. September 13th, 2014 at 04:18 | #13

    According to estimates that hay day cheats in the game of all ages. Recent advancement in mobile gadgets, the Tetriminos is lost, and resume once your call is finished. Mobile plays are easily made available for developing games for small rooms or apartments since they drop dragon bones hay day cheats and blue representing water combination. These downloads need to do to be an added advantage that increases the revenue, and entertain themselves. You’rean expert in cooking which makes it easy to play these kinds of mobile games which can be installed in your privacy.

  14. September 14th, 2014 at 21:25 | #14

    What’s farm heroes saga cheats the huge difference to this device, so as to avoid getting any unexpected charges. Not being able to increase the reach of hand.

  15. March 18th, 2015 at 18:57 | #15

    Myth #2 - “I must have good credit since I keep getting credit card offers in the mail. Senate, demonstrating the government’s awareness that the ultimate American dream of private home ownership is still one of the nation’s most important issues. Myth #1 - “I pay cash for everything, so I should be able to borrow money since I don’t have any credit cards.

  16. September 29th, 2015 at 19:34 | #16

    Cela devrait sonnez un peu comme TH-TH-TH-TH-OH-OH-OH-TH-TH-TH-TH et doit être fait pendant une longue expiration par la bouche.

  1. No trackbacks yet.