I don't understand the basic premise of this post.

Perhaps not. The basic premise is that if you are confident that you gain more utility (in the economics sense of the word) by doing it by hand, and are confident that you can do so in a way that safely meets your needs, you have passed the litmus test and should do it however you please, by all means. Particularly if your confidence is properly placed. The premise can be extended to assert that the test is yours to define. I suggested some talking points, but never claimed to know all of the criteria that you use in evaluating the benefits of reinvention versus reuse. I did assert that if you know enough about the problem and solution to do it better yourself, have at it.

The assertion I made is that many will fail to gain economic utility by doing by hand what has already been done in a well-written module. They will fail because their approach is not as robust, or because it took longer to implement and debug, or because it wasn't supported as future uses develop, or because it didn't benefit from the sharpening stone of mass-use, or because it is not extensible, or because of a number of other reasons.

But the person writing the code (and perhaps his superiors, customers, or shareholders) must be the final judge of whether it is a maximization of utility to invent his own wheel or try to make an existing wheel spin on his/her axle. I never intended to put myself in the position of saying yes or no to you coding however you please.

I pointed out that frequently, the wrong choice is made, favoring reinvention out of misguided lazyness. ...too lazy to figure out how a superior wheel works, not understanding that extra up front effort might lead to increased utility (free time, or better product) in the future. Certanly it's not always the case that code reuse is the best way to go. It is definately true that there are many instances where a new wheel works better. But just as certanly, there are way too many times that the wrong decision is made. This is particularly an issue for beginners, who may not yet have learned enough about the issues surrounding the chore they've set out to accomplish to write their own safe, robust, and effective solution. This is certanly the case with most of those who post questions about how to parse CGI or XML with regexps. They know enough to know that regexps are powerful tools in text manipulation. But not enough to know the shortcomings and downright dangerous pitfalls.

Your specific cases may well pass the litmus test, and you may even add or subtract items of your own criteria to that test. But every time you, yourself, use or don't use a module, you are in your own way weighing the alternatives. I only tried to bring to the forefront a few of the items that should be on ones mind as he weighs the pros and cons of using a particular module versus cooking up something altogether different.

Dave

"If I had my life to do over again, I'd be a plumber." -- Albert Einstein


In reply to Re: Re: Litmus test: It's ok to roll your own if... by davido
in thread Litmus test: It's ok to roll your own if... by davido

Title:
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, details, 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, summary, 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.