Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
But many of us are inclined to do thing right. We know that today's requirements are incomplete and will probably grow anyway, and that we'd better plan for the future by building solider solutions than are asked for, leveraging tested, off-the-shelf code where possible to save effort.

"The right way" to me is based more often for the situation I'm using my code in than basic programming advice given to me. If a user says "I don't have access to module X, I'm not going to tell them 'use module X', or ask 'why can't you use it', but instead try to give them a possible solution. The advice of using modules is helpful, if the person intends to use modules, but I find it more important to have a viable solution.

The conventions of cpan, and of a dbm are there to perl easier to use. However, the zealous 'use module X', and 'don't roll your own' point out another use of modules: to impel users to refractor their code. This is only helpful when a user is programming with the intent to find the best solution! Most perl-monks write code built for programmers, instead of code built for basic distribution to the perl-illiterate masses.

Why use mySQL, when you don't have access to it? Or when a simple flat file system will suffice? Why force your users to download tons of modules, when you can incorporate your own code? It's interesting to observe that many web-hosting companies now offer 'developer packages', specifically designed to allow for these conventions. (Hard linked perl libs, pseudo-root access, access to the apache binaries.)

Sometimes facing reality, and understanding that if you're making a widely distributed package, your users may not have the same access to modules, or programming abilities as you is necessary. All web hosting companies aren't up to allowing mySQL access, and not everybody is smart enough to understand the conventions of use lib; or @INC. If you orient your code towards them, the best solution may very well be unconventional means. (an example of this is a package I'm creating that dynamically loads tons of modules, and even assigns to @ISA, so that users will have very little to deal with, when using it.)

You'll find a lot of widely used software makes similar amenities to users; catering to an Aristotelian sense of the lesser of two evils, by sacrificing conventions for ease of use for the average Joe. Is that bad or good? I don't know.

Gyan Kapur
gyan.kapur@rhhllp.com

In reply to Re: Simplicity vs. Doing It Right by Revelation
in thread Simplicity vs. Doing It Right by dws

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 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?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-28 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found