Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-23 14:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found