If you write for maintainability, then you will have written your code in such a way that optimization is very easy to do. That's because you wrote it in a decoupled fashion where it's easy to drop in a replacement section for a slow spot. For example, Class::DBI allows the coder the flexibility to change how a given class is working. Instead of doing discovery, you can have it use custom SQL.

After you have profiled why the machine is dying on 1000 hits/hour, you'll find that there are 2-3 specific places that the code is choking on. That means you only optimize 2-3 specific places. This is contrast to optimizing the whole damn application because you don't know where the slowdowns are going to be.

That results in a much lower overall cost to the owner of the application. What you haven't described is the differences between Frobnitz.com and Squonk.com. For example, what about

It may be that Frobnitz got up and running in 2 weeks with 2 developers as opposed to Squonk in 16 weeks with 5 developers (4 man-weeks vs. 80 man-weeks). Additionally, Frobintz only requires 2-3 hours/month in maintenance vs. Squonk who needs a full-time maintainer. That's because Frobnitz's bug-queue has never gotten beyond 2 bugs (total) and Squonk has 4 high-priority bugs in it at all times, two of which impact a large segment of the userbase. The complexity of the codebase means that it takes 2-3 months to get up to speed on Squonk, but we can have a random contractor come in for 2 weeks at a time and deal with the Frobnitz issues. Oh, yeah, and Frobnitz depends on a bunch of webservices (which aren't under our control) while Squonk is completely self-contained.

Admittedly, this is a somewhat contrived example, but you see where I'm going with this ...

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.


In reply to Re^5: Strange behavior: Class::DBI with CGI::Application by dragonchild
in thread Strange behavior: Class::DBI with CGI::Application by johnnywang

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.