Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: What's missing in Perl books?

by spiritway (Vicar)
on Nov 16, 2005 at 04:01 UTC ( [id://508889]=note: print w/replies, xml ) Need Help??


in reply to What's missing in Perl books?

One thing I'd like to see is clear, unambiguous examples. Time and again I encounter examples of some concept, done in a Perlish way that wholly obscures the intended point by including features besides the one being shown. As a brand new Perler (but a long-time programmer), I find this quite frustrating. I bought just about every O'Reilly book on Perl I could get my hands on, and they all seemed to have this problem to some degree.

I think part of the problem is Perl's unique ability to do so much with so little. It's tempting to write multi-faceted examples - in fact, it's hard not to do otherwise. This is great when you're writing a program. It's not good when you're illustrating a point.

So, what I missed were simple examples that displayed one single aspect, and didn't combine several tricks into one short expression. The various tricks are important to know, and often will save time once you know how things work. But from the standpoint of a newbie, they simply confuse, making it that more difficult to grasp the one concept under discussion.

One other feature I missed in books was a simple listing of the various functions, operators, etc. in Perl with a short summary of how they work. This is easily taken care of in perldocs, but it would be nice to have it in book form. I like to read this stuff, and sometimes I don't have a computer handy.

Replies are listed 'Best First'.
Re^2: What's missing in Perl books?
by bradcathey (Prior) on Nov 17, 2005 at 02:44 UTC

    I couldn't agree more. I can't think of one Perl book with decent examples. They are always snippets out of context, or the exception. I am not a full-time professional programmer, but I use Perl in my web work. I'm too old to go back to school and get all the theory, so I need step by step how to's.

    CPAN docs are about as bad. I would never have made it without the good monks at the Monastery.


    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot

      The Perl Cookbook is chock-full of examples. Other than that, read the source. You've got all the examples on how to program (and sometimes how not to program) on CPAN, download a module that deals with your problem space and read through it, you're bound to gather some insights that way.


      Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan
Re^2: What's missing in Perl books?
by brian_d_foy (Abbot) on Nov 17, 2005 at 06:53 UTC

    If you want the perlfunc in book form, print it out and put it in a binder (or buy Perl in a Nutshell).

    If you're a long time programmer, you shouldn't have trouble reading "multi-faceted" examples in other languages. You already have the concepts of variables, data structures, control structures, and so on. You've probably already run into some of the same tasks, too. This time, it's just in Perl. Either way you go, people complain.

    --
    brian d foy <brian@stonehenge.com>
    Subscribe to The Perl Review

      I've got Perl in a Nutshell. It suffers from the same problem as the others, though perhaps not quite as badly.

      The problem is that many authors work hard to show off the great points of the language, but they sometimes present too many new features at once. For example, I wanted a simple explanation of the 'split' function. One explanation I found showed a clever way of combining split and join to perform some interesting task. Unfortunately, it wasn't clear how to use split or join, nor even what was happening. A better way, I feel, would have been to say: "This is what split does...", and then "This is what join does...", and then combine them together into something interesting and fancy.

      No book or author is going to please everyone. As you said, whatever you do, someone will complain about it. Still, I think it helps to hear what people have to say.

        If you want to know what split() does, read its entry in the perlfunc man page. People don't write books to explain what other people have adequately explained elsewhere. If you want to know what a builtin function does, you don't need a book. Once you've read the entry in perlfunc, the next step is personal experimentation. Take the function out for a spin and see what happens.

        --
        brian d foy <brian@stonehenge.com>
        Subscribe to The Perl Review
Re^2: What's missing in Perl books?
by awohld (Hermit) on Nov 17, 2005 at 04:59 UTC
    Yes, more examples!!! "Learning Perl" is the best book I've ever read, (I have about 20 books) multiple examples explaining each thing is great. And all the foot notes keep it interesting (i.e. I don't fall asleep so easily)

    With "Programming the Perl DBI" I'd like to see more examples.

    And I agree that a lot of the O'Reilly books are ambiguous to me.

    I need a lot of pictures and diagrams, I'm really a visual learner. The diagrams in "Learning Perl" that explain Hashes and other data structures are helpful. But I'd like to see a thick book with many diagrams and pictures on data structures. I'm having a really hard time figuring arrays of hashes, hashes of hashes, references of hashes... and ways to access/manipulate the data elements.
Re^2: What's missing in Perl books?
by davebaker (Pilgrim) on Nov 17, 2005 at 02:59 UTC
    I second the motion: EXAMPLES, EXAMPLES, EXAMPLES.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://508889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-19 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found