Review of "Minimal Perl: For UNIX/Linux People"

Oakland.pm

Reviews

Review of "Minimal Perl: For UNIX/Linux People"

author: Tim Maher

reviewer: George Woolley

Title: Minimal Perl 
Subtitle: for UNIX/Linux People
Publisher: Manning Publications
Author: Tim Maher
Foreword by: Dr. Damian Conway
Publication Month: October 2006 
Pages: 504 
ISBN: 1932394508
Price for Softbound Print Copy: $44.99
Price for PDF ebook: $22.50

Note:

Short Review

Smiley Rating: Very good :) :) :) :) of 5.

This is a very good book on Perl especially tailored for Unix/Linux users who wish to learn some Perl. If you don't know Unix/Linux at all, this book is probably not for you.

The body of the book consists of two parts, each 6 chapters long. Part I is called "Minimal Perl: for UNIX and Linux Users"; Part II is called "Minimal Perl: for UNIX and Linux Shell Programmers".

If you have some experience with Unix but no experience with Shell programming, you can still benefit from this book. Part I of the book should work for you. If you've used grep, sed, awk or find, Part I should be especially interesting to you.

If you have experience programming, you'll benefit from Part I of the book but really get into Part II. If you have experience with Shell programming with Bourne shell, Korn shell or Bash (or some other like shell), you'll find Part II especially interesting.

Do you want more detail? If so, you could check out my somewhat longer review.

George Woolley of Camelot.pm and Oakland.pm

Miscellaneous

Chapter Titles

  1. Introducing Minimal Perl
  2. Perl essentials
  3. Perl as a (better) grep command
  4. Perl as a (better) sed command
  5. Perl as a (better) awk command
  6. Perl as a (better) find command
  7. Built-in functions
  8. Scripting techniques
  9. List variables
  10. Looping facilities
  11. Subroutines and variable scoping
  12. Modules and the CPAN

Notes:

  • To view the full table of contents, visit the Manning Publications' page for the book.
  • The chapters are divided into two parts: "Part I - Minimal Perl: for UNIX and Linux Users" (chapters 1-6) and "Part II - Minimal Perl: for UNIX and Linux Shell Programmers" (chapters 7-12).

Calculation of eBook Page Numbers

Note: If you don't get the ebook, this section is irrelevant.

Given a page number p in the paper book (e.g. the page numbers in the table of contents, the list of tables and the index), you can easily calculate the corresponding ebook PDF page number e. Just use the following formulas:

  • For a Roman numeral page number p: e = p + 1.
  • For an Arabic page number p: e = p + 39.

I found it quite useful to be clear on the above.

But perhaps you wish to look up a word or phrase in the index. You could use the following table:

initial letter(s)first ebook page
symbols 482
numeric options484
A 484
B C 485
D E 488
F 489
G H 491
I J K 492
L M 493
N 494
O P 495
Q 496
R S 497
T 500
U 501
V W 502
X Y Z 503

Notes:

  • Symbols here begin with punctuation. E.g. $_
  • Numeric options begin with a - followed by a digit.

Online Watch

e-Book

Last I checked the price for the eBook was about 1/2 the cost of the paper version.

What you get is a time window for downloading a PDF. You can then read the PDF at your leisure.

Publisher's Page

There are a number of useful things on (or accessible from) the Manning Publications' page for the book including:

  • the table of contents
  • sample chapters: chapters 3 & 8
  • the foreword, the preface
  • a brief author biography
Website for the Book

There is a whole website for the book. There you will find (among other things):

Other

I found some other interesting things doing simple searches such as perl "Tim Maher". One thing I found especially interesting was:

Diversion

Random Perl Fun

The following is included with the hope of getting some people to slow down and lighten up: Perl and other random fun. And since Crocodile Hunter is in the book, how about Crocodile Invented Game.

Fun in the Book

While there is much to learn in this book, the book is also fun. One part of the fun is simply the terms used.

The following are some of the fun terms that occur in the index:

  • AWKish
  • Crocodile Hunter
  • forehead markings of Perlistani
  • jalebi (confection)
  • JAPHly
  • Laziness
  • Perlistan

Oh, and in the text, but not in the index :(, you'll encounter such terms as:

  • AWKologists, AWKoholics, AWKsome
  • Perlistani, Perlicious

Two characterizations of Perl referenced in the book that I particularly enjoy are:

  • Perl is executable line noise.
  • Perl is a Swiss-Army chainsaw.

Somewhat Longer Review

Contents

The Title

Minimal

My understanding is that Minimal in the title means the author:

  • is going to presuppose some familiarity with Unix
  • is not going to teach redundant options
  • is not going to teach advanced aspects of Perl (e.g. object oriented Perl)
Perl

Well, hopefully you already have some idea what Perl is. But just in case here are some characterizations of Perl:

  • Perl is a programming language.
  • Perl can stand for "Practical Extraction and Reporting Language".
  • Perl is widely used for writing CGIs, for system administration, and for all manner of text processing.
  • Perl has the motto TMTOWTDI (i.e., "There's More Than One Way To Do It"); and, indeed, Perl often does provide many ways to do the same thing.
  • Perl runs on most OSs you are likely to encounter.

Note:

Unix/Linux People

The author intends for Unix/Linux People to be interpreted broadly in two ways:

  • Unix here includes Mac OS X, FreeBSD and even Linux.
  • People includes users from people who know just a few basic things (like how to use ls and cd) to people who are experts.

Notes:

  • Given the author's definition of Unix, one could say including Linux in the title is redundant.
  • However, for someone who has not yet read the book the inclusion of Linux makes sense since they presumably don't yet know the author's definition of Unix.
  • The author has a narrower definition for UNIX.
Does the Title fit the Book?

Well, I'll deal with the easy points first:

  • The book is certainly focused on Perl. :)
  • The book is definitely directed at Unix/Linux people. :)

But what of the use of the word Minimal? On the one hand:

  • Few people would consider 500 pages minimal. :(

On the other hand, at least if the reader gets the book at a book store:

  • the reader presumably sees that the book is not small and that he/she will have to wait to learn what Minimal means in this context. :)
  • The author is successful at doing what he intended to do, i.e., teach a manageable subset of Perl. :)

All in all, I'd say the title fits the book. :)

About the Reviewer

Unix/Linux Experience

I've been using Unix since 1989.

I worked for several years at a Unix training company developing self-teach course materials. I was the project manager and one of a number of author's for the first edition of "Unix Made Easy".

I taught an intensive course focusing on basic Unix commands as part of a certificate program at San Francisco State Extension.

I've used many different flavors of Unix. Currently I primarily use Linux.

awk Experience

I've never used awk much. It never seemed intuitive to me. Once I learned Perl, it seemed pointless to learn awk.

find Experience

I don't use find a lot, but I've used it from time to time ever since I learned it. I see it as a valuable tool.

grep Experience

I still use grep (and egrep) regularly. Often I use grep to explore a particular set of data. Sometimes this is preliminary to writing a Perl program.

I often use grep with other Unix commands such as cut, sort and wc.

sed Experience

At one time I used sed a lot. Currently I don't use it at all.

Shell Programming Experience

My first shell as a command-line user was the C shell. However, when I wrote shell programs I used the Bourne shell.

Since I learned Perl, what few Shell scripts I write are typically incredibly simple. It's been years since I wrote a shell script that used any control structures.

Minimalist Experience

I think of myself as a minimalist, a postmodern minimalist, but still a minimalist.

Here are some examples of things I've done that I consider minimalist:

  • I co-created a role playing game called FateRole that doesn't require dice, manuals or other props and that you can play more or less any time and anywhere.
  • I created a course called "Unix in a Day".
  • I co-created a dance club called East Bay West Coast that didn't have explicit members and so didn't have membership dues.

One of the things I found especially rewarding about these adventures was that I became really clear about what I considered essential in the domain. The simplest example was the creation of FateRole; I became super clear that what I valued the most was role playing as opposed to all the complex mechanisms (dice, manuals, character sheets, etc.) that supposedly support it.

Perl Experience

I began programming in Perl in 1994 and it has been my favorite language since then.

I learned Perl from a 110 page (when printed) man page.

Perl One Liner Experience

For a short period of time I used Perl one liners intensively. I haven't been using them at all recently.

I don't have the habit of using many options on the shebang line. More specifically I don't take advantage of the options I learned to use in Perl one liners.

Expectations

What I wanted (and expected) from reading the book was:

  • to feel right about recommending the book to Unix/Linux people who wish to learn Perl.
  • to learn a few things about Perl.
How I Read the Book

I read all of the book including:

  • all of Part I and Part II, i.e. chapters 1-12 and the intros to the two parts
  • everything before Part I and after Part II

The version of the book I read was a PDF ebook.

I downloaded the source for the examples. However I didn't generally run them.

The Anatomy of the Book (sort of)

The Head

By the Head I mean simply that which comes before the body.

For me, the most important parts of the Head are:

  • the foreword by Damian Conway
  • the preface
  • the element called "about this book"
The Body

By body I mean the chapters and the parts that include them.

There are two parts. Each part consists of:

  • a brief introduction
  • 6 chapters

There are 12 chapters. The shortest chapter is 13 pages long; the longest chapter is 57 pages long; the average chapter length is 35 pages. Each chapter consists of:

  • a chapter table of contents consisting of top level sections only
  • a brief introduction
  • a number of sections which contain the meat of the chapter
  • a chapter summary which usually ends in "Directions for further study"
The Tail

By the Tail I simply mean that which follows the Body.

The Tail consists of an epilogue, 2 appendixes, a glossary and an index.

The index is 22 pages long.

Reference Elements

Certain elements, especially, support the use of the book as a reference:

  • contents
  • list of tables
  • tables
  • index

Likes

I now have a Perl Book I can recommend for Unix/Linux People.

Based on the title and the reputation of Manning and the author, I expected that once I read the book I'd feel comfortable recommending it to Unix/Linux people who want to learn Perl. I do now feel comfortable recommending the book to such people. :)

I learned some things about Perl.

I also expected to learn a few things about Perl. I did. :)

IMO the most important thing I learned was that insights for one liners are often relevant to small Perl scripts. I expect my approach to small scripts will change significantly. I'll also likely begin writing Perl one liners again.

I enjoyed the Book.

I didn't have any expectation that I'd enjoy the book, but I did. :)

The author intended the book to be entertaining as well as informative. It was for me. I particularly enjoyed the characters the author used in his examples which were entertaining and also helped me to see the relevance of the examples.

I also enjoyed the author's use of the English language, especially his choice of terms.

I learned some things about specific Unix Commands.

I learned a few things about specific Unix Commands I can use at a shell prompt that may come in handy, e.g.:

  • grep -L
  • xargs
  • col

What I learned may turn out to be useful later.

This was an unexpected bonus. :)

I like the Author's Strategy focusing on Unix/Linux People.

I like the author's approach of focusing on Unix/Linux people. :)

I believe that one of the reasons Perl seemed so intuitive to me (when I was first learning it) was because I had a background in Unix.

It makes sense to me to have a Perl book focused on Unix/Linux people. The author takes excellent advantage of this focus in his presentation.

I like the Author's Strategy of Teaching a Subset of Perl.

I like that the author teaches a subset of Perl. :) To do otherwise would be a daunting task. Perl is too vast to teach without some such strategy.

It's helpful to me as a reader (and I would guess to the author as a teacher) that the author is aware of teaching a subset of Perl and makes that explicit.

Gripes

Given the title, the book is too long.

Over 500 pages for a book that has Minimal in the title. That doesn't work for me. :(

The author gives good reasons for including what he did in the way he did. But my gripe isn't about the content of the book; my gripe is with the title.

I would like more emphasis on Perl Culture.

Generally, Perl culture loses out in this book. I take it back. Certainly, the importance of Laziness is conveyed. And the author's sense of humor which is consistent with Perl culture pervades the book.

However, certain aspects of Perl culture are not emphasized enough for my taste, e.g.:

  • programmer's viewed as artists and magicians
  • TMTOWTDI ("There's More Than One Way To Do It")

:(

I do understand the author is somewhat limited by the title, but personally I consider these aspects of Perl culture to be essential to Perl.

I would like to see more on Testing.

Most beginning texts on programming particular languages that I've encountered seem to assume that it makes sense to do so without teaching the novice to program. Based on my experience, I disagree.

I'd at least like to see a chapter on testing. :(

I would like to see more Cross References in the Index

The index is rather good, and it actually includes quite a few cross references. Still, I wasn't always able to find things easily. :(

Here are two examples of the kind of cross reference I'd like to see added

-
See -e under E, etc.

one liner
See commands (Perl)

Disclaimer on Gripes

You may very well not care about any of my gripes. No problem here.

Who's the Book for?

For

This book would be good for people who have all of the following characteristics:

  • They already know the basics of using Unix.
  • They want to learn Perl.
  • They are willing to put forth a little effort to learn it.

For Part II of the book, in addition to the above, the following characteristic is needed:

  • They have written Shell (or some other kind of) programs.
Not For

This book would not be good for people with any of the following characteristics:

  • don't have basic experience with Unix
  • don't have a desire to learn Perl
  • are not willing to put any significant effort into learning Perl

Final Thoughts

If you are a Unix/Linux user and wish to learn Perl, I recommend this book.

Complete Draft Available on Web: 2006-10-27q

A few minor changes: 2006-10-28b

Small addition and change to Short Review: 2006-11-02b

Small changes re font-size, font-weight, color: 2006-11-02d

Removed draft status: 2006-11-04