The last big code review I did optimized for developer time and lost so poorly on execution time and memory that it ended up killing them later.

IMO this illustrates a problem I've long felt existed in the "optimise for maint/development time" school of thinking. I call the problem "death of a thousand cuts". Each decision in writing a program when answered with "do whatever is easiest to code" adds a tiny of bit of fat to the code. Once the app is complete the code becomes like a nice steak, marbled with fat. And just as its nearly impossible to remove the fat without turning the steak into something rather different (groundbeef) its nearly impossible to remove the fat from such a program without a pretty much complete rewrite.

I really think that the "optimise for maint/development time" needs to always be tempered by "so long as unnecessarily wasteful constructs are avoided" and "as long as the dev/run time benefits are aligned". It is possible to write reasonably maintainable code that is also lean and efficient. It just takes a little care and knowledge. The problem is that a lot of this knowledge is what most people (even me) would call premature optimisation when looked at in isolation.

---
$world=~s/war/peace/g


In reply to Re^2: [Quote] When should I use Perl? by demerphq
in thread [Quote] When should I use Perl? by blazar

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.