Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^10: Order in which grep/map receive elements

by abufct (Initiate)
on Oct 07, 2012 at 10:35 UTC ( #997671=note: print w/ replies, xml ) Need Help??


in reply to Re^9: Order in which grep/map receive elements
in thread Order in which grep/map receive elements

If you wrapped the code you posted in a function and used it, you would be the author.
then i would make my code bigger (and hence harder to maintain) without reason. the maintainer would need to read the code of my function, while he might be familiar with wide-spread library already. i do not like to add to this world's entropy. :-)
Or worse those same attributes of the latest maintainer, who may decide to take the module in a completely different direction. Something that has happened to me at least 4 times in the last 5 years.
Sounds quite sad. Why have such large amount of libs if you are afraid to use them? Maybe you're right and I will change my mind when I use perl for more time.


Comment on Re^10: Order in which grep/map receive elements
Re^11: Order in which grep/map receive elements
by BrowserUk (Pope) on Oct 07, 2012 at 11:29 UTC
    then i would make my code bigger (and hence harder to maintain) without reason.

    Sorry, but that is a crock. Ie. a spurious justifiction.

    Whenever you use a library, you add its entirety to your codebase. If you get a bug as a result of a maintenance change in that library, or interaction between a change in your application(s) and that library, it is you that will have to track it down; as often as not it is you that will have to provide a patch before it will get fixed; and in the interim, it is you that will need to provide a workaround in your application to get past it -- even if that just means reverting to an older release; and adding code to detect if your users have the newer breaking version installed.

    And not just its functions you use either. But also all of its functions you do not use and all of their dependencies. In the case of List::MoreUtils that includes these 40 modules; not to mention the C compiler and all of its libraries, tools and other paraphernalia.

    Sounds quite sad. Why have such large amount of libs if you are afraid to use them?

    I'm not afraid to use them; nor am I advocating that you should not. I'm not afraid, because I do not infer guarantees where none exists.

    CPAN modules are peoples best-efforts developments, freely shared with us on a "if its useful, use it" basis. Only.

    My caution to you is against inferring guarantees were none exist and then basing your development and maintenance strategy upon that.

    Your own five-line function -- derived from tested code in a well used module -- is far less risk of becoming a maintenance problem in both the short and long term; than the near 2000 lines of code you need to add to your codebase in order to use those 3 lines that you need from List::Moreutils.

    That is still not advocation for you not to use the module; just do so for the right reasons; not wholly specious ones.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

      Whenever you use a library, you add its entirety to your codebase.
      No. Library is a black box. I don't have to maintain its code. New developer does not have read its code and understand how it works. I only add its interface to the codebase.
      My caution to you is against inferring guarantees were none exist and then basing your development and maintenance strategy upon that.
      I did not infer that guarantee. It is directly stated in the lib's interface. As opposed to grep which has nothing similar in its doc and I have to infer guarantee from the fact that lots of people use that undocumented feature of grep.
        No. Library is a black box. I don't have to maintain its code.

        Until it goes wrong. To believe otherwise is naive to the point of ostrichism.

        I did not infer that guarantee. It is directly stated in the lib's interface.

        As I pointed out back up here -- the docs give a statement of the current reality; not a guarantee!

        If you doubt that, consider the implications of clause 10 of the Artistic licence under which the module is distributed:

        10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        As opposed to grep which has nothing similar in its doc

        List::MoreUtils::uniq() can make its statement of reality, because it is known that grep behaves that way.

        The module takes no action -- beyond using grep -- in order to enforce the ordering; nor does it do any tests to verify that ordering.

        If grep's output ordering changed, then so would List::MoreUtils::uniq(), and believing that when your code that relies upon that ordering starts to fail, it will magically get corrected without any maintenance effort by you, is not just naive, but bloody-mindedly self-delusional.

        We're done now.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        RIP Neil Armstrong

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997671]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2014-07-30 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (230 votes), past polls