in reply to Litmus test: It's ok to roll your own if...
I don't understand the basic premise of this post.
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.
If my boss says do this, and I say I can grab a module from CPAN and having it running in 10 minutes, and he says--No. It would take me 3 months to go through all the IT, Purchasing, SysAdmin and Security departments red tape and associated BS, do it "in-house"--then I might grab that module, pull it apart, re-write it in my own or the house style making sure that I understood exactly how it worked, add a note at the top pointing to the original upon which it was based.
Or if I didn't like the method of implementation, then I might re-implement it.
As I currently don't have a boss, I tend to look at whats available on CPAN, read the sources, and then sit down and write my own. With some modules, I get so far into the project and decide I can't improve on what I saw on CPAN and revert to that. Tie::File is one such module, IMO it is pretty close to perfect, I couldn't improve on it, leastwise, not until I get my asychronous IO version going anyway.
Many other modules I have written my own version and I prefer them. Note: That doesn't mean mine are better and should replace the CPAN versions, it just means I prefer them. As an example, there are many cases of modules on cpan that are entirely procedural, but the authors have wrapped them up in a pseudo-OO interface. This invariably bugs the hellck out of me. The are others that I dislike for a variety of reasons. Some I've written my own versions of bits of them. Many of these are "one-liners" that get stuck into My::Utils.pm.
The most frequent problems I have with cpan (and core) modules, are not their implementation but the interfaces. This is kind of illustrated by your comment
...when I don't bother with figuring out how to apply the module in question to my script....
The absence of a cohesive design overview means that if my application could be written by importing say 3 different CPAN modules (suites), and gluing them together, the resulting "glue code" spends much of it time coersing the output/storage formats of one module into the input/storage formats of the next.
If the script is a simple step1/module1, step2/module2, step3,module3 progression, then you can sometimes get away with this, but if the script loops around a lot, the mapping back and forth between formats into and out of each of the different modules, is a pain and ultimately undoes much of the realiablilty and testing that you proffer as reasons for doing it that way.
Anyone with an eye to the history of software development will know that using tried and tested components does not make for less bugs unless the components have been previously integration tested together. In large systems, more bugs result from the (unintended) interaction between subsystems, than from within the individual subsystems. This is a well-known and document fact of life of systems integration. There are entire companies that make a living from simply integrating other peoples tried and tested components.
We have all either experienced the situation, or heard of those that have, where the OS vendor blames the RDMS vendor, who blames the Transport Layer vendor who blames the Messaging API vendor who blames the Network vendor who blames the OS vendor....
The bottom line is, it's my code and I'll code it my way. I don't know why anyone else would give a flying fuig about the way I choose to go about it, but I can tell you that I don't give a flying fuig for what they think.
If there is one thing about this place, which in every other way I love, it is the pervading attitude that there is "one true way" and the propensity for people to answer OP's questions with
"Stupid man, "How do you do X!", why do ask such a stupid question when it perfectly obvious that you shouldn't be trying to do "X" in the first place. You should be installing Cygwin, learning a completely different set of OS commands so that you can download the latest set of patches and rebuild sources so that you can use the latest, greatest installer that would allow you to install this bundle of CPAN modules. When you've done that, one of the dependancies that will automatically installed, will allow to you use`yayacc --thisenormouslongcommandlineparameterdoesntserveanypurposeoth +erthantoinformthecommandthatthenextvalueshouldbeusedliterallyandnotau +tomaticallyinterpolatedglobbedandreversepolishized +2`which means you wouldn't need to do X in the first place!.
Update: Er....{grin}!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Litmus test: It's ok to roll your own if...
by perrin (Chancellor) on Sep 19, 2003 at 04:31 UTC | |
by Abigail-II (Bishop) on Sep 19, 2003 at 13:01 UTC | |
by perrin (Chancellor) on Sep 19, 2003 at 15:58 UTC | |
by Anonymous Monk on Oct 15, 2003 at 14:45 UTC | |
by BrowserUk (Patriarch) on Sep 19, 2003 at 05:04 UTC | |
|
Re: Re: Litmus test: It's ok to roll your own if...
by davido (Cardinal) on Sep 19, 2003 at 05:04 UTC |