Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

"When code reuse turns ugly"

by BrowserUk (Patriarch)
on Mar 29, 2016 at 22:11 UTC ( [id://1159054]=perlnews: print w/replies, xml ) Need Help??

A lesson I've given up preaching here comes home to roost!

My favorite quote from the article: "Yes, code reuse is a virtue, but dependency addiction is a sin."

Replies are listed 'Best First'.
Re: "When code reuse turns ugly"
by Your Mother (Archbishop) on Mar 30, 2016 at 13:40 UTC

    The great thing about predicting doom is that if you just keep doing it long enough you are guaranteed to be right.

    Is a week of broken builds and surprise scrambling all over the world less than or greater than the uncountable commits, arguments, and shipped bugs of splitting out an ostensibly simple little block of code to 50,000 projects and 39,273 developers who couldn't get it right the first few passes? Legitimately curious but it's rhetorical since there is no way to measure it. I wish there were. The cold water of individual prerogative v corporate assumption in open source was worth something in the whole show, at least to me.

    Turning things we like into virtue and things we dislike into sin should be a bit of a red flag on an opinion piece.

      The great thing about predicting doom

      I'm not sure that I ever "predicted doom" so much as railed against the logic of substituting a dependency for a 1 or a few lines of code you write and maintain yourself.

      Would you call this "predicting doom"? Or this? Or this?

      Is a week of broken builds and surprise scrambling all over the world less than or greater than the uncountable commits, arguments, and shipped bugs of splitting out an ostensibly simple little block of code to 50,000 projects and 39,273 developers who couldn't get it right the first few passes? Legitimately curious but it's rhetorical since there is no way to measure it. I wish there were.

      The other paragraph in the article that stood out for me was: "Is it possible that we've become too lazy? Rather than write one-line functions, folks are pulling in outside code, and thus overly relying on dependencies. Here's some widely used open-source NPM modules that caught our eye:"

      I see people pulling in whole (large and complex) packages in order to use 1 or 2 lines. Eg, Sub::Exporter

      Turning things we like into virtue and things we dislike into sin should be a bit of a red flag on an opinion piece.

      I think the keyword is balance. Not writing your own DBI from scratch is obvious; Math::Round to get round() less so.


      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". I knew I was on the right track :)
      In the absence of evidence, opinion is indistinguishable from prejudice.

        I'm totally on board with the "we've become too lazy" point. Partly because I don't know Perl modules well enough, and partly because of that exact issue - I don't want additional dependencies beyond CORE in my modules unless I absolutely can't help it - I find myself reinventing some "simple" wheels to make it easier for others (like me) who object to never-ending chains of recursive dependencies when installing what *should* be a simple module.

        I hadn't thought of the consequences of someone removing an open source Perl module on which one of mine depends, but I *guess* it *could* happen - luckily I've been under-reliant on external module use within mine.

Re: "When code reuse turns ugly"
by Anonymous Monk on Mar 30, 2016 at 02:13 UTC

      Different article. Entirely different viewpoint. LW even gets a mention.

      But then that would all be lost upon someone who makes such excessive use of the 3rd virtue.


      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". I knew I was on the right track :)
      In the absence of evidence, opinion is indistinguishable from prejudice.

        Different article. Entirely different viewpoint. LW even gets a mention. But then that would all be lost upon someone who makes such excessive use of the 3rd virtue.

        *yawn*

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-24 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found