Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

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

Mick

In reply to The Illusion of One-Offs by mrmick

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 rifling through the Monastery: (5)
As of 2024-03-29 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found