Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
User Journal

Journal zappepcs's Journal: PERL and The Ten Commandments

PERL and the Ten Commandments

This is PERL *AND* The Ten Commandments, not the 10 commandments of PERL.

Disclaimer:
1 - There is a reason that I don't have a column in DDJ.
2 - I barely qualify as a PERL programmer, whether that is good or bad. I
can hear you .net programmers snickering - stop it!
3 - I am not affiliated with Mr Wall

Now, on to the codecis http://en.wikipedia.org/wiki/Codex as that sounds
the most apprapo lead in. I don't care if you don't like Wikipedia.

I'm taking some base material from Wikipedia http://en.wikipedia.org/wiki/Ten_Commandments

0 - I am the Lord your God
So sayeth Linus Torvalds, all hail his code!
What about PERL you ask? PERL gave us CPAN, there is need of nothing else.

1 - You shall have no other gods before me
I told you .net programmers to stop snickering... see? Just remember, it it's good enough
for the human genome project, it will handle your piddly little report. http://www.ddj.com/184410424

2 - You shall not make for yourself an idol
I know PERL is a kind of do-it-yourself language, but PERL gave us CPAN, use it!
Your library function list is not to be considered it's equal, infidel!

3 - You shall not make wrongful use of the name of your God
Yes, this means you have to learn to pronounce Linus' name correctly!
So that you have a more clear understanding of this, read http://perl.about.com/od/gettingstartedwithperl/p/whatisperl.htm
Honestly, hearing someone yell "PERL damn you" in a status meeting would be fun... but, it's against the law.

4 - Remember the Sabbath and keep it holy
This is a general law, applying to all programmers. http://en.wikipedia.org/wiki/Sabbath
As there is some question about when the Sabboth is, you pick a day, keep it always.

5 - Honor your father and mother
Now, when you write a subroutine, and feel it necessary for that subroutine to put something in the
log file, it must not complain about parameters passed to it from the parent. It's the law.

6 - You shall not murder
If you want your PERL code to die, that is your business, but it must not cause other programs to die, that is
unless your PERL code is monitoring running processes with some authority to stop them.

7 - You shall not commit adultery
This is a bit more tricky that it would first appear. If your code is going to use a system resource, it should check that the resource is free, and not simply trust some gossipy status flag from another process. Remember, the penalty for adultery is to be stoned to death:

sub adultery_simple
{
    my $adulterous_code = shift;

    die;
    die;
    die;
}

8 - You shall not steal
Ok, I hear your complaints. This does not mean that F/OSS code is against the law. It does mean
that you shall give proper attribution. always. period. Read your licenses, know them, obey them. always. http://www.opensource.org/licenses

9 - You shall not bear false witness against your neighbor
Never ever let your code give false status. never. for any reason. If your code is called to get a directory listing on some distant machine, don't just make up a list of file names. That's not nice, don't do it.

10 - You shall not covet your neighbor's house
Yes, you .net programmers are stuck with Windows. Deal with it. Dual boot? Dual boot!! Sacriledge. Stone the infidels!

sub stone_infidels
{
    my $infidel = shift;
    if($joint){
        my $smile = TRUE;
        &pass_joint($infidel);
    }
    &proselytize_linux() if($smile);
    return $smile;
}

10.1 - You shall not covet your neighbor's wife
Brethren, this is a most important commandment. Apparently, this law has been said to also include your
neighbor's ass. I don't know if the two are the same, or they meant his wife's ass. In either case, they are not yours so you many not sit around desiring them to be yours. Translation: Pr0n is okay, stalking Hollywood starlets is not.

If your program/user has restricted access to a file, honor this, leave it alone, it is not yours, no matter how clever your code might be, you are commanded to leave it alone.

I understand that keeping the commandments is not always easy. So I give you these study group sites to help and assist you in keeping your programming life holy:

PERLdoc http://perldoc.perl.org/index-language.html
CPAN http://www.cpan.org/
O'Reilly http://search.oreilly.com/?q=PERL
PERL http://www.perl.org/ and http://www.perl.com/
Activestate http://www.activestate.com/Products/ActivePerl/ - for .net converts
More PERL http://use.perl.org/ and http://www.perlmonks.org/

You may also use Amazon to find PERL programming books to assist you in your daily PERL prayers.

And finally, a heart felt plea to http://www.ddj.com/swaine.htm Michael Swaine and Della Wyser.
If you find it in your soul to randomly pick someone from the universe to write utter jibberish in some
small part of your publication, well... I'm your man :) -three second John McCain smile

This discussion has been archived. No new comments can be posted.

PERL and The Ten Commandments

Comments Filter:

"Experience has proved that some people indeed know everything." -- Russell Baker

Working...