++dws, and thankyou for saying it. This is a similar point to the one I was trying to make in Being a heretic and going against the party line..

It's not that I have anything using modules, nor that I don't appreciate the long term benefits of the tested-ness (sorry for that but I simply couldn't think of a better way of putting it) that comes from using the proven solutions and would probably do so in most cases for production work or anything that I had to revisit more than once.

However, even assuming that you know the right module to use rather than needing to go through a long list of possibles to determine which one is right, it can still be a pain.

As an example, in this post, I set out to 'do it the right way' and use CGI.pm. After nearly 2 hours of trying, I gave up and hand-rolled my html output because I could not work out the right combination of maps, anonymous arrays and CGI functions to produce the output I wanted. I came close a couple of times, but as soon as I tried to add the final peice to the puzzle it just crashed around my ears.

So I opted for a loop and some print statements and it worked first time (honest!) and took less than 5 minutes. When I chose to add an extra (left-hand) column to my table, it was obvious exactly where and how to do it. I gave up completely on the idea when was trying to using CGI.pm.

I admit, by the time I got to writing the homebrew version, I had the benefit of a lot of thinking that I had aquired trying to do the CGI/maps/distributive function method. Even so, a 24:1 ratio of time taken to achieve a solution (actually higher as I never did) would pay for a lot of maintainence were that ever necessary.

I guess you pays your money and makes your choice, but if I am paying the bills, I will opt for the 'simple solution' over the 'right way' every time.


Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring!

In reply to Re: Simplicity vs. Doing It Right by BrowserUk
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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.