Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
To all the Perl Monks in cyberspace:

use strict;

If I could give you one piece of advice, that would be it. Perl Monks around the world have proven that those two words will save you more headache than anything else you could possibly do in perl. The rest of this is my personal advice written from horrible software projects gone completely wrong. To you, I dispense this advice.

Enjoy learning Perl. Scratch that, actually. You will never actually realize that you are learing Perl. But trust me, in a few years you will be able to look at line noise like the Solitare algorithim in Stephenson's Cryptonomicon and think, "Wow. How the hell did I learn enough Perl to understand that." You are not as bad at Perl as you think you are.

Don't worry about performance. Well, you can worry about it, but realize that in 6 months your little script will be running on a machine twice as powerful and with ten times the ram.

Object Orient Everthing.

Check CPAN every day. Submit to CPAN every other day.

Memorize all the $ funky character variables.

Learn LISP. Then go back and read the docs for map, join, reverse, and all of the datastructure parts of perldoc.

Keep your old test programs. Delete your old datafiles.

Indent correctly.

Don't feel embarased for asking an "easy" question. Some of the best Perl programmers I know ask "easy" questions weekly. The best ones ask them all the time.

Be very kind to your hands. Someday you will have fond memories of pre-carpal tunnel life.

Maybe you will code CPAN modules, maybe you won't. Maybe you will use th $/ variable, maybe you won't. Maybe you will learn everything about Perl's internals, maybe you will never write a script more than ten lines. Whatever you do, remember this one thing. There is always more than one way to do it.

Program, even if you have no major projects.

Read all the documentation, even if you only remember one-tenth of it.

Do not compare your code to Tom Christiansen's. Someone's code has to be better than yours and it might as well be his. Just learn from it.

Be very clear on the fact that Perl programmers belong to a community. Try to learn about the others in this community.

Program using only $_ and @_ once, but remember that variables add to clarity. Program obfucsacted perl once, but stop before it makes you crazy.

Think about, until you get an intuitive understanding, why Larry says the three virtues of a programmer are Laziness, Impatience, and Hubris.

Respect the main developers.

Be careful about your coding style, but be patient with those who give you advice on how it should be changed. Monks get very into their perl style and it can be hard to read a program written in a different style. Asking it to be changed is only natural.

But trust me on the use strict;

With thanks to Mary Schmich, who actually wrote the first one
---
Crulx
crulx@iaxs.net


In reply to Perl Comencement for the 2000 Class by Crulx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (4)
    As of 2014-11-01 11:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (229 votes), past polls