Chapter 2. The Zen of Perl Developing

“Wild nights are my glory.”

Mrs. Whatsit in A Wrinkle in Time, by Madeleine L'Engle

We've come to realize there are two sides to programming: the left-brain, formal minutiae of creating smart code; and the right-brain, soft, touchy-feely stuff that goes on in your head.

Most programmers would rather ignore the touchy-feely stuff because it's just Not Their Thing. However, we've found that it's more important than the rational left-brain information, because it affects everything you do. So we're going to cover the soft stuff first, because it's what happens first in your head. This leads us to a touchy-feely Perl of Wisdom:

First know yourself; then your programs will be easier to know.


Go out and about among programmers, and soon you discover some are better than others—a lot better. It has been a source of fascination to us as to why there is such variation in performance—we're talking about orders of magnitude differences in speed, accuracy, and maintainability between the best and the worst for any given task—and we've come to learn that most of that difference is due to attitudes, beliefs, and behaviors that set them apart from the rest.

Yes, talent and innate intelligence count for a lot, but less than you might think. Yes, knowledge and experience are required for creating quality programs, but they can be enervated by poor attitudes and limiting beliefs.

This isn't just psychobabble; I see it all the time in my classes. It's common to see people with a problem freeze at the keyboard, unable to take any action. They're afraid that if they experiment, they'll break something. They're suffering from a limiting belief that the computer is more fragile than it really is.


This is good news! Because wise people know that they can change their attitudes, beliefs, and behaviors, and know how.

Where does Perl fit in here? Perl is designed to put your convenience above abstract notions of aesthetics or elegance. Perl is designed to make it as easy as possible for you to go from an idea for solving a problem to creating the solution itself, no matter what computing background you hail from. There are so many Ways To Do It in Perl because Perl is a polyglot. Other computer languages are like your eighth-grade French teacher:

You: “Miss, miss, there's a fire in the stockroom!”

Them: “Ah-ah-ah-ah! Et, maintenant en Français, s'il vous plaît!”

Whereas Perl will go out of its way to understand you:

You: “Yo, fraulein mine, yon edifice hast une conflagation, eh wot?”

Perl: “Sounds like you're saying there's a fire over there … I'll get help!”

Let's look at which attitudes, beliefs, and behaviors best serve us.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset