PrevIndexNext

What this course is really about

This course is ostensibly about the language Perl. It is about several other important things as well: Studying Perl (or any programming language) is like a combination of learning Spanish, Mathematics, Linguistics, Cooking, and Automotive Troubleshooting!

The exercises may have an element of repetiveness to them. Doing something over and over is a way to get its knowledge into the body (i.e. muscle memory) as well as the mind and hence make that knowledge more solid. All of the concepts learned in this course are fundamental to doing almost anything in Perl. You will use them again and again on a daily basis. Learning them well is critical.

How to Become an Expert

In 1986 I read a book called "123 Command Language" by Darien Fenn published by Que. It taught one how to use the macro language in Lotus 123, the original killer app. There was a section entitled "How to Become an Expert" which I have adapted here for learning Perl:
    Think of learning Perl as learning a new spoken language. You may be able to get your point across to a Frenchman even if you speak only a dozen words of French, but you will expend a great deal of effort and be limited in your eloquence. Such is the case with the language of Perl. The more familiar you are with the details of Perl's operation, the more sophisticated and eloquent your programs will be. Here is a suggestion for improving your expertise:
    HEAR AND FORGET SEE AND REMEMBER DO AND UNDERSTAND
    I found these words of wisdom (covered with cobwebs) somewhere in the dark reaches of my brain. People have told me repeatedly that when they first read the Perl books, they seemed complete gibberish. Later, after some practice with the language, the books begin to make sense. I have therefore developed this following tip for becoming a Perl expert:

    1. Read the book
    2. Try everything once
    3. Read the book
    4. Read the book

    You may notice a certain theme to this tip. Although it may look humorous, the advice is serious and derived from experience. The more of Perl's powerful features you are aware of, the more tools you can use when the need arises.

    Reading the manuals in one sitting can turn your brain into oatmeal, a phenomenon called "information overload". After a while, you just can't assimilate any more material. Skimming the books once gives you a broad picture that you can apply to specific needs. Trying everything gives you more in-depth knowledge. Frequently, after I try using a specific command, function, or language element, and I see it in action, the explanation in the book suddenly becomes clear. ("So that's what the writers meant!") When you read the books a second time, you probably will be surprised at how much clearer they are, and the points you missed on the first reading will stand out. Discovering that Perl does tasks you wish it did but thought it did not can be a lot of fun.

    When you read the books for the third time, which will probably occur several months after the second reading, the details that will stand out will be subtleties in the language that you missed the first two times around. Knowing these subtleties is what differentiates the true experts from the merely good. You are also likely to find that this level of knowledge compared to the basic information you learned previously, saves you more time and enables you to create more complex and elegant programs.

A relevant quotation from the Preface to the English Edition of Mark Twain's Sketches.
    If I were to sell the reader a barrel of molasses, and he, instead of sweetening his substantial dinner with the same at judicious intervals, should eat the entire barrel at one sitting, and then abuse me for making him sick, I would say that he deserved to be made sick for not knowing any better how to utilize the blessings this world affords. And if I sell to the reader this volume of nonsense, and he, instead of seasoning his graver reading with a chapter of it now and then, when his mind demands such relaxation, unwisely overdoses himself with several chapters of it at a single sitting, he will deserve to be nauseated, and he will have nobody to blame but himself if he is. There is no more sin in publishing an entire volume of nonsense than there is in keeping a candy-store with no hardware in it. It lies wholly with the customer whether he will injure himself by means of either, or will derive from them the benefits which they will afford him if he uses their possibilities judiciously.
So, with all that said, let's begin in earnest!

Exercises

  1. Read this page again.

PrevIndexNext