Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
OK... Here I am, sharing my not-always-popular opinions. First of all, I would like to point out that I HATE using the term script when referring to any programming I write. I will try to always use the term program because no matter what the intent or the size of the project we have, it still involves programming. It also helps to legitimize the use of Perl and other 'scripting' languages to others.

When I first started writing perl programs, I would write a small program to perform a specific task or set of tasks and then forget about it. I guess this is fine if we were only to use it once but this never seems to be the case. I would often find myself, about two or three months later, looking for this now obcure little program that I wrote and hoping that I didn't throw it out because I need it again to perform a similar task. After about a year or so of programming in this way (yes, I'm a slow learner) I decided that I should build a library of these utilities that I can use them whenever I needed to. This made it much easier for me to find them and I also found that I was using them more often because I was able to find them so easily. Every time I would write something new, I would place it in my library and have it ready for the next time I wanted to use it.

This led me to the next step:
I took about two weeks and converted my little utilities into modules, sometime combining several that were related into one package. This was the point where I took a giant leap in my knowledge of Perl and my appreciation for the efforts that others had put into their modules.

I guess the moral of the story here is that there is no such thing as a one-off. You will never write a program that will be used only once. Always write it as though you were going to use it many times and keep it handy so that you can find it and use it.

Does everyone here do this? Did it take me longer than most to realize what was definitely a timesaver?


In reply to The Illusion of One-Offs by mrmick

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (3)
    As of 2018-05-26 18:31 GMT
    Find Nodes?
      Voting Booth?