Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Book Idea: The Golfer's Handbook

by japhy (Canon)
on Dec 03, 2001 at 23:30 UTC ( #129151=perlmeditation: print w/replies, xml ) Need Help??

This would have a very specific (read: small) audience, so it is probably not a viable "book" in the usual sense of the word, but I'd be happy to devote some of my graciously granted space to a Perl-golfer's guide. The phrase I used on the "Fun With Perl" mailing list was "I'd appreciate it if [everyone] showed what drivers, putters, and wedges they used to squeeze every last yard out of Perl."

With golf being a popular pastime of seasoned and apprentice Perl programmers alike, it only seems fair that the Tiger's and Nicklaus' among us should impart some of their knowledge of the shortcuts in Perl, helping less experienced golfers avoid the sandtraps of routine programming. Think of it as a pro-am.

Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Book Idea: The Golfer's Handbook
by Masem (Monsignor) on Dec 04, 2001 at 00:04 UTC
    This is a great idea, and we could easily sell the idea to O'Reilly. There's already the perfect animal for the cover: the Gopher ;-).

    You could also demonstrate some of the simplications with examples that we've already posted here (making sure that if you really do publish it, to get permissions for those that participated).

    Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain
    "I can see my house from here!"
    It's not what you know, but knowing how to find it if you don't know that's important

Re: Book Idea: The Golfer's Handbook
by footpad (Monsignor) on Dec 04, 2001 at 00:09 UTC

    This would be educational; I think you should call it The Duffer's Guide to Perl Golf.

    Naturally, there would be companion volumes:

    • The Duffer's Guide to Perl Obfuscation

    • The Duffer's Guide to Perl Idioms1

    • The Duffer's Guide to Perl Modules

    • The Duffer's Guide to Useful Perl Regular Expressions....(wait, you're already writing that).

    ...and so on...

    --f (being only slightly facetious)

    1 - Yes, I'm well aware of the, um, er...Pearl book, but this would be geared for those of us still learning which clubs to swing and when.

      How about a book, comprised of many units, titled "The Perl Programmer at Play" or "The Playful Perl Programmer"?

      Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
      s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Re: Book Idea: The Golfer's Handbook
by VSarkiss (Monsignor) on Dec 04, 2001 at 01:53 UTC

    Sounds like fun. But you're right that it would have a small audience, so how about broadening the material? Maybe "Perl Golf" would be a chapter in a larger book called, say, "Perl for Sheer Fun". Other chapters could be things like

    • Obfuscation (get Erudil and BooK to contribute their code!)
    • The Acme:: modules.
    • Poetry (? Dunno about this: I don't think there's much to be learned here.)
    • Writing quines, by means fair and foul (I'm thinking of World's worst Perl quine.)
    I'm sure there's more stuff in the same vein.

      How about games?
    • Games::Rezrov and a few other Games:: (the specific ones not generic classes?)
    • Lingua::Romana::Perligata and some other Lingua::*?
    • var'aq Klingon language programming (currently) implemented in perl?
    • Text::FIGlet not to toot my own horn
    • And I'm sure there are a few others tucked away...

      As for poems Coy might be a good thing for that.

      perl -p -e "s/(?:\w);([st])/'\$1/mg"

      Although I don't know what the Acme modules are (and believe me, I'm going to look them up after this post), the others are definite must haves. ++'ng your node simply didn't express my approval enough. ;)


Re: Book Idea: The Golfer's Handbook
by belg4mit (Prior) on Dec 04, 2001 at 00:22 UTC
    I would imagine -p, $\, and $/ can come in quite handy? Of course in my last game I had a handicap of 80...

    perl -p -e "s/(?:\w);([st])/'\$1/mg"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://129151]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2018-06-24 12:41 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.