[boulder.pm] Snowshoe outing/awful Perl book

Jonathan Conway rise at frii.com
Wed Nov 8 12:12:48 CST 2000


On Wed, 8 Nov 2000, Walter Pienciak wrote:

> This weekend, Sunday works better for me.  Brainard/Sourdough sounds good.

Ok. Do you want to meet at the snowshoe rental place?  
BTW, if anyone decides they want to go at the last minute my cell number
is 303-664-1639 and I don't lose all signal until around Ward.
 
> But do tell us about that "awful Perl book" . . .

That was the ObPerlReference that I then forgot to write...

"Debugging Perl - Troubleshooting for Programmers"
Martin Brown
McGraw Hill Publishing [pad] 0-07-212676-0

Sample chapters are available at:
http://www.alphabetstreet.infront.co.uk/computing/pdfsample.jhtml

"Debugging Perl shows you, step-by-step, how to fix buggy code and prevent
errors from ever slipping into your programs. All the details you need to
know are here--from avoiding syntax, logic, and variable problems as you
program to troubleshooting with the Perl debugger, profiler, and
compiler. Plus, you'll get design tips,..."

Fine in concept - an in depth guide to writing less buggy perl and tracing
and fixing the ones that have slipped in - but it fails in execution.
There's some pretty decent material, but it's submerged in a mass of
typographical errors and misstatements that a halfway decent editor could
have caught and one familiar with perl couldn't have overlooked. At one
point the construct "$hash{key}" is referred to as a key. Anyone
reasonably familiar with perl would know what was intended, but given that
it's in a section on basics that's aimed rather squarely at someone new to
the language it's a little less forgivable. In other places mistakes like
"$hash{[0]" (from memory, but a close approximation) appear in discussions
of references.

My second problem with the book is that the organization is decidely iffy.
The second chapter is a nice little discussion of perl's internals and the
functioning of the lexer/parser that belongs somewhere near the midpoint
or the end, not as the first technical material the reader hits. It's
relevant and does help frame some of the concepts (though once again with
notable errors), but I really don't think it needs to come before coverage
of references and operators. Part of this is the book's split personality:
it's simultaneously trying to be a ground up introduction to both good
perl style and debugging and a technical guide to the same for experienced
programmers and it never quite manages to paper over the split. 

Good points: coverage of the debugger, profiling, and basic debugging
techniques.

Bad points: riddled with minor (and occasionally major) errors, bad
organization, statements that make one doubt the author's basic
competency*


Jonathan Conway
Senior DBA
ipoPros.com/TheStreet.com


* 
<rant type="personal peeve">
	"Most modern editors will match parentheses and help you indent
your code to make it more readable. Emacs, probably the most popular
programmer's editor, does this automatically and almost enforces the
option for scripts that it identifies as Perl based[1]. More advanced
editors[2], such as BBEdit (for Mac), EditPlus (for Windows), and the
modified xemacs (for Unix), can also color[3] the code according the
individual elements. "

[1] Apparently Mr. Brown had some trouble with the fact that emacs by
default starts perl-mode for certain extensions, a basic customization
that's rather trivial to extend, disable, or adjust after skimming the
info pages.

[2] I must admit I've never heard the complaint that emacs isn't advanced
enough. Overgrown, stupifyingly complex, arcane, and near-AI levels of
counter-intuitive interface I've heard, but never insufficiently
advanced. When was the last time _you_ saw an editor with dynamic
in-buffer tab completion based on the contents of other buffers (my
current favorite gee-whiz feature).

[3] Apparently Mr. Brown doesn't read FAQs or the manual or the info pages
or use apropos or check deja or flip through any of the printed books. I
haven't been able to locate the introduction of font-lock-mode (the
current method of syntax hilighting) but it was significantly revised in
1997 and was a mature feature at that point. As far as I can tell it's had
the feature since before there was an EditPlus.

</rant>




More information about the Boulder-pm mailing list