Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I am new to Perl and the monastery, but I want to extend a heartfelt thanks to all the monks that have helped and guided me. What I am about to write is meant for others like myself (newbies), but I believe it could benefit everyone at one point or another.

As you learn a language, what you are learning is the vocabulary (nouns, verbs, modifiers, etc) and the syntax. You are not learning how to "program". Sure, you may learn to emulate how someone else programs by looking at their code or by reading a book, but you are still just taking the vocabulary and matching another's template. For some, the story ends here, for others the story is just beginning....

When you decide to venture out on your own, you will be truly like a child experimenting with language for the first time. You will make minor mistakes at times, at other times you will seem to be babbling to the adults. Just as the naive child will touch the hot stove that the adult warned them not to, you will try and re-invent the wheel. If we are lucky, we do not stay children forever.

I have always been elated when I figured out code that solved my problem. Some time in the future, I discover a new technique that would have reduced the number of iterations in the loop by a thousand fold and I feel like a fool. IMHO, it is time to "RE"-code the original. In doing so, you will assimilate the new technique so that you don't make the mistake again. Most likely, you will reduce the size of the original and make it run faster. Almost definately, you will learn more new techniques in the process.

What is the single hardest about doing this? If you write code as one long run-on sentence and not in properly formed paragraphs and sentences. It is easy to correct English papers that have headings, sub-headings, paragraphs, sentences, etc. Each piece stands by itself and can usually be changed without having to change the entire document.

  • Learn the use of subs.
  • Learn proper indentation.
  • Listen to the adults, but don't be afraid to experiment.
  • Remember that every time someone gives you an answer, if you do not understand it, you are just learning how someone else programs that solution. Make sure you fully Grok it.

    Limbic~Region


    In reply to Value of "RE"-coding for the newbie by Limbic~Region

    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 scrutinizing the Monastery: (3)
    As of 2024-04-25 16:25 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found