Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I agree in principle with most of what you've said, but there are a few qualifiers that I would add:

If I am forced to pick a "most important" measure of quality, I would argue for program completeness and correctness. In other words, the program should correctly do everything that it is supposed to do and do nothing it's not required to do. Once you have correctness and completeness down then, if performance is still an issue, profiling should be considered.

In some cases, such as real time programming, responsiveness is completeness. It's no help to have the brakes activate with the optimal number of newtons of force after the car has already hit the tree. It's better to have a "wrong" solution that applies the brakes a bit too hard or too soft than too late.

Focus on performance after you know the code is right.

In practice, this is easier said than done. What if the fundamental data structures and design decisions are the inefficient part? If the design gets too abstract, this can happen. I've seen it happen many times in the past.

Whenever you need to change the fundamental assumptions of a program, you're either looking a massive refactoring project, or possibly even a total rewrite. Just try telling management that the expensive new program you spent months writing for them is too slow and needs to be totally redone from scratch. That's pink slip territory for a lot of us.

Sometimes, it's better to design efficiently in the first place, and worry about abstraction later. It's nice to solve problems that you might not have, but a clean design that solves your current problem might well be smarter and cheaper in the long run.
--
Ytrew Q. Uiop


In reply to Re^2: Performance, Abstraction and HOP by Anonymous Monk
in thread Performance, Abstraction and HOP by pg

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others scrutinizing the Monastery: (17)
    As of 2014-07-29 17:46 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (225 votes), past polls