Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Advice to your younger self

by artist (Parson)
on Feb 21, 2003 at 21:06 UTC ( #237571=perlmeditation: print w/replies, xml ) Need Help??

Dear Monks
I just read at slashdot Advice You Would Give to Your 12 Year-Old Self?.

Many of us program in perl from many years. What advice you may have given to your beginner self about perl ? Keep in mind that this would be exteremly useful to the users who have not covered as many miles as you have.

artist Update: My Advice would have been to my self:

  • Learn Emacs and use perl with emacs
  • Concentrate on software engineering and methodology
  • Plan projects on paper first
  • Practice writing documentation
  • use Modules
  • use OO
  • Make use of data structures efficienty.
  • Keep an eye on different programming practices
  • Learn not only 'how' but also ask 'why' for programming.
  • Keep in touch with people who are going to use my program.

Replies are listed 'Best First'.
Re: Advice to your younger self
by Ovid (Cardinal) on Feb 21, 2003 at 22:49 UTC
    • Keep an open mind
    • Be patient
    • Be nice
    • Learn other styles of programming (logic, OO and functional)
    • Admit when I'm wrong
    • Remember that newbie does not mean 'stupid'

    One might be inclined to protest that much of that advice I mention is not applicable to learning Perl, but I submit that it's applicable to just about everything and is good advice nonetheless.


    New address of my CGI Course.
    Silence is Evil (feel free to copy and distribute widely - note copyright text)

      I wholeheartedly concur with Ovid's 6 points. I'd add a few more.

      • While you're young enough or lucky enough to have no deadlines, try to do it yourself first.
      • Look to nature, everyday tasks, childs toys anywhere except the computer books for your inspiration.
      • Try it on paper first.
      • When you're done, and have something, working or not. Then compare your approach to that in the computer manuals or texts. Mostly you'll find a better way, but you will have learnt a lot in the process. Occasionally, you'll be pleasently surprised. When this happens, it will give you the inspiration to go on, even with the mundane tasks, and when the ogre of deadlines enters your young life.
      • The joy of programming is in the doing, not in the finishing. If you find that each time you sit down to do a program, you can only think of finishing it, choose a different career.
      • Have fun.

      Examine what is said, not who speaks.
      1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
      2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
      3) Any sufficiently advanced technology is indistinguishable from magic.
      Arthur C. Clarke.
Re: Advice to your younger self
by thelenm (Vicar) on Feb 21, 2003 at 21:57 UTC
    Some advice off the top of my head to my beginner self, in no particular order...
    • Use arrays and hashes, not gazillions of variables with different suffixes.
    • Modularize your code. Learn to use modules. Or at least use subroutines instead of cutting and pasting, for goodness sake.
    • Make a conscious effort to do things in a Perlish way, e.g. prefer Perlish for loops to C-style for loops.
    • RTFM: Frequently consult `perldoc`, the Camel Book, and PerlMonks.
    • Use perl to run Perl, and never write PERL.
    • Understand that regexes cannot be mastered in a day. Understand what your regexes actually mean.
    • Try new things. It's okay to be wrong if you learn from your mistakes.

    -- Mike


Re: Advice to your younger self
by sschneid (Deacon) on Feb 21, 2003 at 21:18 UTC
    My three:

    1. Learn about objects, why they're useful, how to use them, and how to modularize your code in general.

    2. Plan ahead, don't just open up a text editor and begin writing. Think about what you want your program to do, the best ways to go about doing it, and how to write it so that it will be easily maintained in the future.

    3. Don't ignore CPAN. It'll make your life one hundred times better.
Re: Advice to your younger self
by dws (Chancellor) on Feb 22, 2003 at 00:04 UTC
    What advice you may have given to your beginner self about perl?

    Stay on good terms with at least two competent recruiters.

    All other things being equal, take the project that's the more visible. Building up a good reputation gets you more opportunities, and it's hard to build a reputation if you're working off in a dark corner.

    Always make sure that you're solving the right problem. That means listening and asking clarifying questions--even at the risk of sounding stupid--before reaching for the latest neat algorithm, design pattern, or technique. You don't get points for solving the wrong problem.

Re: Advice to your younger self
by feanor_269 (Beadle) on Feb 21, 2003 at 21:30 UTC
    4 words, (or sets of words, whatever):

Re: Advice to your younger self
by BazB (Priest) on Feb 21, 2003 at 23:08 UTC

    Not so much Perl advice, but people advice:

    • You will have good ideas and bad ideas.
    • Other people will have good ideas and bad ideas.

    • Shut up and listen to those who've been around longer than you - they know stuff.
    • Just because they've been around longer than you, they're not always right.

    • Know which ideas are good, and which are bad.

    • Things aren't always just technical problems.

    If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
    That way everyone learns.

Re: Advice to your younger self
by davorg (Chancellor) on Feb 22, 2003 at 10:43 UTC

    I'd actually like to go back a bit further and spoken to my myself in 1987 just as I was going into my final year of college. My advice would have been:

    • Don't waste the next four years working on Windows software. Brush up your Unix skills and start using them prfessionally as soon as you can.
    • Take a look at this new language "Perl" that has just been released. Give yourself a head start by not waiting until 1996 to discover it.
    • Look out for the start of the World Wide Web in a few years time and pay particular attention to the introduction of the CGI protocol. It would be really good if nms came into existance before Matt's Script Archive.

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re: Advice to your younger self
by Wysardry (Pilgrim) on Feb 22, 2003 at 02:47 UTC

    In general:-

    • Visit PerlMonks
    • Read the Perl Black Book
    • Install Perl and (optionally) web server software on your own machine for test purposes
    • Install MySQL
    • Perl comes with documentation, so read it
    • Find a text editor with Perl syntax colouring features
    • Learn to plan programs before writing any code
    • Ignore the hype about PHP and decide whether to use it based on its real strengths and weaknesses

    If using Windows:-

    • Install Apache instead of using the web server included with Windows
    • Install ActivePerl from ActiveState in C:\usr instead of the default C:\Perl (so the path will work on most UNIX hosts too)

    "Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work." -- (Author Unknown)

Re: Advice to your younger self
by Nkuvu (Priest) on Feb 21, 2003 at 22:24 UTC

    Advice about Perl? But I have so much other advice to give to my 12 year old self... (like "You'll meet this one girl -- avoid her" ;) )

    I'm not really sure. I started programming Perl after I graduated from college with a BS in CS, so my style was alredy pretty much set. It took me some time to learn the Perlish way to do certain things (and I am still learning), but for the most part I think my code has been pretty good so far.

    I can always think of PerlMonks, though.

Re: Advice to your younger self
by theorbtwo (Prior) on Feb 21, 2003 at 23:12 UTC

    Hm. Keeping it vaugely on topic: you /can/ code that project yourself. Don't make Mark find somebody else to do it. He'll write bad code. He'll also cause you and your friends legal headaches. Come to think of it, I'm getting to far ahead of myself (literaly). Try this language called perl. You might need to write this compony you've never heard of called O'Reiley to get a book and a CD, since you don't have internet access. And I'm not sure there's a port to DOS. Hm. You might want to look into Linux too. Do you even have a computer yet? What the hell am I talking about. Oh, and ignore that part about on-topic. Um. It will get better. Then it will get worse again. And up. And down. And down. And down some more. You might want to just kill yourself. But you can't, since that would cause a huge paradox, and possibly destroy the universe.

    You might want to just forget about this. Here, down this bottle of Robitousin, then you can just call this all a bad dream.

    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Re: Advice to your younger self
by toma (Vicar) on Feb 22, 2003 at 08:37 UTC
    When you want to use something new, don't try it first as part of a big project.

    Instead, write a little test program to make sure that you know what you are doing. Then use your learnings in the big project!

    It should work perfectly the first time! - toma

Re: Advice to your younger self
by greenFox (Vicar) on Feb 22, 2003 at 01:14 UTC
    Without repeating some of the other great suggestions, I would add "look at solving the general problem not the specific one". Could have saved myself much time if I had learned that sooner :)

    Life is a tale told by an idiot -- full of sound and fury, signifying nothing. William Shakespeare, Macbeth

Re: Advice to your younger self
by Steve_p (Priest) on Feb 22, 2003 at 02:56 UTC

    My main advice would be:

    A History major? What are you ever going to do with a History degree when you've worked with computers all your life?

    Seriously, my real Perl advice is:

    After years of thrashing about, I've gotten the first three done. The last one is for the me of a few minutes ago.

Re: Advice to your younger self
by rozallin (Curate) on Feb 22, 2003 at 23:23 UTC
    My "Perl" of wisdom:

    Be aware of the fact that people can be extremely loyal to their text editors, and that this can sometimes escalate to something of a flaming holy war of vi(m) users versus emacs users. There will be many people trying to advocate the benefits of both text editors to you as you begin to learn how to program and try and navigate your way around a *nix system.

    My advice is use vi for a week. Use emacs for a week. Get to know them well enough to be able to use both and choose for yourself which one of the two, if at all (contrary to wha it seems, there are alternatives), you want to use. And use what is best for you and what you are most comfortable with.

    Rozallin J. Thompson
    The Webmistress who doesn't hesitate to use strict;

      Emacs sux0rs, vi r0Xors!

      Really though, I'm aware the original post asks a completely absurd question, but what kind of reply is this? You'd rather have tried out both vi and emacs than known every single movement of the stock market, winning lottery numbers, etc? I'd personally rather be the richest person on earth and have plenty of time to learn (useless) things like emacs.

      Just a thought.

        See what I mean little Rozallin? The hatred of emacs is strong with this one.

        >You'd rather have tried out both vi and emacs than known every single movement of the stock market, winning lottery numbers, etc?

        This question is every bit as "absurd" as the original question. Are you saying that instead of sitting in front of a computer learning emacs (or anything else for that matter) I could be predicting winning lottery numbers? Either you think too highly of yourself, or you think too highly of me...

        Rozallin J. Thompson
        The Webmistress who doesn't hesitate to use strict;

      It is good to try a new editor once in awhile, too. As far as the editor wars go, some of this is just play. For example, I am always a warrior on the side of emacs, because I use it for all my programming, which is what my emphasis is. But I also am doing sysadmin tasks daily, and I use vim exclusively for that. And I read my mail in PINE, which means I'm using PICO. So I use the three main *nix editors daily. Each one, IMO, is better than the other two at what I use it for. And I have used all three, for all three tasks.

      But sometimes, cat > FILENAME is just faster, better, cheaper...

      Snazzy tagline here
Re: Advice to your younger self
by Jenda (Abbot) on Jun 20, 2003 at 15:12 UTC
    • methods and functions should return undef if they fail in Perl! Returing an error code is only good for C.
    • learn C before you learn ML. It would be painfull to go back those 30 years of programming language development!
    • Sure people are stupid, spend more time with them anyway.
    • Exercise. Two years will not always be that a big age difference, you might give your brother the well deserved kick sooner. Besides we all know looks is what the chicks care about despite what they say.
    • When someone is talking she might just talk to talk (99.9% likelihood), stop looking up problems to solve in the babble. A nod at the right places is all that's needed.
    • Never, ever start working for McCann!!! !!! !!! !!! !!!
    • They are paying you for 8 hours a day, not 15! If they don't see they need another IT guy it's their problem.
    • Don't be shy to ask for more money.
    • You can get her (whoever she is). Just believe it and it'll be true.
    • Never say no to an invitation. You might not like the film, but ... you might not see much of it anyway.
    • It's OK to have a shrink!

    Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
       -- Rick Osborne

    Edit by castaway: Closed small tag in signature

Re: Advice to your younger self
by Anonymous Monk on Feb 22, 2003 at 07:02 UTC

    Don't listen to anything people claiming to be you in the future have to say, including this.

    Have a nice day.

Re: Advice to your younger self
by Aristotle (Chancellor) on Feb 24, 2003 at 15:21 UTC
    Twelve year old? Not exactly, but maybe sixteen or eighteen. I didn't get into computers before fourteen (well, didn't own one anyway).
    • Tasks are often much harder to get right than they seem to. Roll your own for the sake of excercise and to delve into a subject for better understanding, but use modules when actually getting things done. Read the code of CPAN modules.

    • Concern yourself with algorithmic efficiency. Don't microoptimize. Always keep in mind the information inherent in your data; there may be more than apparent at first sight. Though redundancy should usually be avoided as far as possible, a homeopathetic dose of it can work wonders so don't be afraid to make use of more memory where appropriate.

    • Study Ruby or Smalltalk.

    • Get a good understanding of what closures are and what they can be used for. Learn when it is appropriate to use dispatch tables, objects and closures, in any combination.

    • Your strength is in abstraction. Concentrate on honing that skill, but remember laziness is important, too. Keep your hubris in check when you're trying to get things done.

    Makeshifts last the longest.

Re: Advice to your younger self
by csuhockey3 (Curate) on Nov 12, 2004 at 07:51 UTC
    find a university with perl in the curriculum! It's been fun to teach it to myself (with the help of PM of course) and use perl at work, but sometimes I wish my school had a course in perl. I certainly prefer to write 10 lines of perl than 200 of Java.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://237571]
Approved by ChemBoy
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2022-05-21 22:05 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (78 votes). Check out past polls.