Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I have often seen (sometimes rude) responses to people asking questions that say, "Just install module XYZ". This may not always be the best option, and I cringe when I see that. Here are my reasons for resorting to other peoples' modules last.

  1. LEARNING I won't learn anything new if I just reuse code. Like the old Proverb, "Give a man a fish, and feed him for the day. Teach a man to fish, and you feed him for life.".
  2. PERFECTION I'm a perfectionist, and fear someone else's code may be sloppy or not as fast as it could be. Since I often have most of my code written already, I don't want to spend time combing through something else.
  3. PURPOSE The code does something similar to what I want, but not exactly. I'd spend just as much time to parse the output as I would to rewrite the bits I need.
  4. APPEARANCE I don't own any of the boxes I'm trying to do something on. "Installing" a module is a bigger perceived change than to just craft a simple script to use. For some of those boxes, the system owner who gave me temporary access may not like me adding a ton of stuff and may be less willing to share a shell next time. Since this is more often than not my customer, I do what I can to work within their preferences.
  5. PORTABILITY I like to keep everything in one file so that I can move it to another box that may or may not have the same modules, and who knows what versions. If I share my script with someone, I may forget its dependencies when moving it.
  6. CPAN ACCESS (And this is a big one) Every system that I use is behind numerous firewalls that all restrict access to everything. To install a Perl Module, I'd have to copy all text from each file, and paste it on the target system via an xterm in a similar file structure. Cumbersome.
  7. COMPILING Most systems I use don't have compilers. Cannot use Perl Modules that need to be built, which for me has been about half of them that I've tried.
  8. COMPLEXITY It is counter-intuitive to me to install a Perl module for a one-time script. I don't often write Perl code, as much as I run one-off perl commands. Installing a Perl module in a subdirectory of $HOME, then remembering to "use lib qw(/home/me/lib/)" every time I run a command is a lot more work that it is worth.
  9. SIZE Requiring lots of Perl modules can eat up memory. You may say memory is cheap, but these are government boxes, again not in my control. We have to run MySQL and Apache for 200+ concurrent users at all times in 2GB of memory. Each PM eats up memory and takes time to load.
  10. LICENSING If the module is GPL, and I'm delivering this as a finished system under a restricted license, I have to get a review from Legal. Ugh.
  11. JOB I'm paid to write code, not download modules. If I'm asked to write something but get stuck, it would be cheating if I just downloaded something else. I'm not looking for the answer, I'm looking for a hint.

Off the soapbox and back to work.


In reply to Top 11 (GOOD) reasons not to use someone else's Modules by miketosh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-01-22 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?