Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

I feel a motto coming on...

by japhy (Canon)
on Jan 13, 2002 at 21:54 UTC ( #138443=perlmeditation: print w/replies, xml ) Need Help??

I'm curious what my brethren (and sisthren) feel of the motto Make Perl yours, without taking it away from others.

I came up with it after seattlejohn thanked me for my code. He said "seriously, your code does some really slick stuff to make it easier for the caller, which i really like..." This statement prompted me to think of what I'd done. I'd allowed the module to be used very simply:

use Tie::Scalar::Watch; my $x = 10; watch { $x > 5 } $x;
instead of the clunky:
use Tie::Scalar::Watch; my $x = 10; tie $x, 'Tie::Scalar::Watch', $x, sub { $_[0] > 5 };
I'd used Perl to my advantage to create a pseudo-syntax (thanks to the "&" prototype). The code is easy to read and makes sense with little explanation. The fact that you can use the variable you're watching in the assertion-function itself is nifty.

So my motto means "make things easy for yourself, while keeping them easy for other people too." Don't use convoluted syntax because you can (that doesn't mean "don't use idioms") or because it shows you're elite. Use syntax that you are proud of, and that other people can appreciate. It is to that end that I created a module (to be released soon) called Tie::Array::Unique -- it ensures the elements of an array are unique, so you don't need to keep track with a hash (it does it for you).

Tie-modules are a very good example of this motto. They keep the icky internals away from the implementation, and produce a syntax that is quite normal (since it's just overloading the standard operations on data structures).

So that's my motto. Any feelings? Any personal mottos out there for the sharing?

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: I feel a motto coming on...
by tretin (Friar) on Jan 13, 2002 at 23:31 UTC

    "Make Perl yours, without taking it away from others."

    I think your motto goes along (to a certain extent) with "Making easy things easy & hard things possible". The easiest of problems can be made difficult, or the hardest of problems can be made easy (as in your code ex. japhy). It's totally up to the programmer; only he/she can decide to make a straight-forward solution, or create one that requires a mastery of the language. Your motto goes well with PM and sites like it, because it is their goal to make the Q&A forum as painless and easy for it's users as possible. I see that to an extent your motto applies to another of the mottos of Perl: "There's more than one way to do it", or, the programmer must chose how much he/she really wants to confuse the reader of his/her code.

    Your motto is a pretty accurate representation of Q&A geared sites like PM. It conveys that Perl allows it's users a 'freedom of choice' to make the solutions to their problems easy, or difficult, in the never ending journey to obtain eliteness through producing code that only you (the programmer) understand.

    I like your motto (in case I hadn't ever made that clear; it is early and my coherence level is still low because of lack of sleep, so if something does not make sense just remember, it is everyone's fault but mine!).

Re: I feel a motto coming on...
by n3dst4 (Scribe) on Jan 13, 2002 at 23:06 UTC
    It's a fantastic sentiment and perfectly describes good Perl - so props for that. But may I humbly suggest:

    Make Perl yours, but don't hog.

    A bit more direct :)
      That is more succint, and I like it. "Make Perl yours, but don't hog it" sounds good to me.

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

        Make Perl your love slave, but don't flog it?

        Regards, Helgi Briem

Re: I feel a motto coming on...
by jonjacobmoon (Pilgrim) on Jan 13, 2002 at 23:30 UTC
    That might be okay, but do I have drink 7up while coding in Perl?

    How about Perl, have it your way?

    Or, Perl, just do it?

    Or...... (you get the idea)

    (Sorry, japhy I couldn't resist.)

    If we have to have a motto the obvious one is Perl, Use it.

    I admit it, I am Paco.
Re: I feel a motto coming on...
by petral (Curate) on Jan 14, 2002 at 18:36 UTC
    Make perl yours by giving it away.  ?

Re: I feel a motto coming on...
by tamills (Acolyte) on Jan 15, 2002 at 01:43 UTC
    Or from the Buddhist Monk brethren to our Perl Monk brethren:

    Upon reaching Satori, you will Realize that Perl was yours all along. With compassion you will help others to reach Perl Satori for themselves.


    Be careful what you wish for... (Mr. Limpet)
    For where you treasure is there shall your heart be also (Christ)

      not really pertaining to the motot at hand but... has anyone seen the Birdcage?

      "work perl, own perl, make perl yours! (but be nice and share)".

      not quite as poetic as previously posted mottos, but I could not resist pulling in a Robin Williams reference (that I butchered, but then, who cares?).

Re: I feel a motto coming on...
by seattlejohn (Deacon) on Jan 15, 2002 at 13:02 UTC
    I must've heard Sting singing on the radio at some point today, because the thing that keeps going through *my* head is:
    One Perl is enough for all of us

    but I would never suggest anyone adopt that as a motto, because I wouldn't want The Police coming after me for copyright infringement... ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://138443]
Approved by root
[LanX]: Rat or newest nodes
[LanX]: I think there are RSS feeds you could use, but never used them
[Eily]: LanX how does the first link work, should I send a message to rat? :D
[LanX]: yes, or click the second link

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2018-03-19 09:55 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (238 votes). Check out past polls.