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

Why the hell should anyone else give one flying fuig for whether I choose to re-invent a wheel, or legs, or mucus-lubricated, muscular wave locomotion?

Many apparently do, but why they do I have not the vaguest concept.

I can give a couple of simple reasons why I care enough about this issue to bother at least pointing people towards a publicly available wheel and encouraging them to have a go at it.

First, there is self-interest. If people are reinventing wheels, they are usually not contributing useful patches and ideas to CPAN. A strong CPAN makes my life easier. Also, it has been my experience that despite what you say about integration problems, reinventing wheels usually leads to wasted time, less functionality, and more bugs, all of which makes Perl look bad. I want Perl to look great, so there will be lots of fun jobs for me.

In a slightly wider sense, but still out of self-interest, I want it to be accepted that using open source components is a reasonable way to write applications because it's the way I like to write them. If everyone just rolls their own all the time and that becomes the norm, managers will think it's strange when I tell them I don't want to write the ten thousandth template engine from scratch.

Obviously you and every other Perl developer can do whatever they want to, but there are some simple and sensible reasons why I (and others) will continue to encourage people to use CPAN and not reinvent wheels.

  • Comment on Re: Re: Litmus test: It's ok to roll your own if...

Replies are listed 'Best First'.
Re: Litmus test: It's ok to roll your own if...
by Abigail-II (Bishop) on Sep 19, 2003 at 13:01 UTC
    If people are reinventing wheels, they are usually not contributing useful patches and ideas to CPAN.
    Really? If someone reinvents a wheel by creating a module that does X, while there is already a module doing X, he basically made a patch the size of a module. Reinventing wheels is usually done because someone didn't like the original wheel. It's often more efficient to reinvent a round wheel, than to submit patches for a square wheel (if only the creator of the square wheel likes squares, or because round wheels aren't compatible with the vehicles equipped with square wheels).

    A strong CPAN makes my life easier. Also, it has been my experience that despite what you say about integration problems, reinventing wheels usually leads to wasted time, less functionality, and more bugs, all of which makes Perl look bad.

    There are no quality requirements for CPAN. Anyone can already load any crap on CPAN, and many already do. Non-overlapping functionality doesn't make CPAN stronger, it probably makes it weaker. Choice is good (remember one of the slogans of Perl: there's more than one way of doing it?) Your reasoning would mean that the first module doing Y that was uploaded to CPAN is necessary the best one. Good heavens. Had Matt Wright made his formmail.pl available on CPAN, you would have preferred noone else would have created a form to email utility, but they all had used Matt's script.

    Abigail

      Reinventing wheels is usually done because someone didn't like the original wheel.

      From what I've seen, it's usually done because someone is unwilling to deal with the politics or technical issues of installing a module at their site. Sometimes it's because they're too lazy to check CPAN or to spend any time trying to understand the documentation for existing modules. Or sometimes it's because the perfectly workable API that comes with the module doesn't match someone else's fantasy of the perfect API. Every now and then it is done because someone looked at the existing modules and they didn't meet the project's requirements.

      It's often more efficient to reinvent a round wheel, than to submit patches for a square wheel

      I have nothing against someone making a new module if the existing modules are not good. Often though, a patch is all that's really needed.

      There are no quality requirements for CPAN. Anyone can already load any crap on CPAN, and many already do.

      The cream rises. I would never tell anyone to use a bad module from CPAN.

      Your reasoning would mean that the first module doing Y that was uploaded to CPAN is necessary the best one.

      Certainly not. I never said such a thing.

      Had Matt Wright made his formmail.pl available on CPAN, you would have preferred noone else would have created a form to email utility, but they all had used Matt's script.

      Matt's script was not good. Someone would have fixed it or replaced it by now.

      I don't advocate people blindly using whatever is on CPAN and never questioning the quality, but you'd be a fool to write your own HTML parser these days without a very good reason.

      On my site http://jokubonis.20megsfree.com I present idea - The Square Wheel. At first I want surprise You that roll of Square Wheel is very restful and lenitive! I invite You to see videoclip on this page how a square wheel roll equal as easy round wheel. Be surprised and surprise Your friends.
Re: Re: Re: Litmus test: It's ok to roll your own if...
by BrowserUk (Patriarch) on Sep 19, 2003 at 05:04 UTC

    ...at least pointing people towards a publicly available wheel and encouraging them to have a go at it.

    I've no problem with people "pointing to and encouraging" the use of CPAN--I've even been known to do this myself surprisingly. I do take umbrage at being told that the "solution" to my problem is in doing something completely different to what i am trying to do (and about which I hadn't asked for advice) just so that I can utilise a CPAN module I have no interest in.

    My re-invented solutions have caused noone any "wasted time, less functionality, and more bugs", nor made "Perl look bad", because I've not made any of them available on CPAN nor anywhere else.

    The only module I've so far uploaded to CPAN, was withdrawn within 1 day. I uploaded it because 3 people seperately encouraged me to do so. I withdrew it because one person, who views I respect, suggested that it "polluted the namespace" because I had named it as a pragma, rather than deeply nesting it in some obscure namespace where it would never been seen. Reserving namespaces is well and good, but if they are never allowed to be used, then they become wasted space. C'est la vie!

    As for the rest of my modules. I re-invent for my own learning purposes. As and when I have something that I think is of sufficient quality to warrent inclusion, I will do so.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.