Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: The Rules of Optimization Club

by petdance (Parson)
on Mar 30, 2012 at 23:58 UTC ( #962703=note: print w/replies, xml ) Need Help??

in reply to Re: The Rules of Optimization Club
in thread The Rules of Optimization Club

You're inferring a lot that I didn't say or imply.

You want to optimize for energy consumption and heat output? Go ahead. Just measure before and after so you know that it was worth your time.

While I didn't say anything about programmer vs. processor time, the rules about measuring apply there as well. Depends on if you're building a compiler or a one-time data conversion script. And how much does your programmer cost? Again, measure.

Measure measure measure so you know for sure.


Replies are listed 'Best First'.
Re^3: The Rules of Optimization Club
by JavaFan (Canon) on Mar 31, 2012 at 07:45 UTC
    one-time data conversion script.
    I would not write tests for a one-time data conversion script. There's only one test for a one-time script: its run.

      Arguably, feeding the head of the 25GB input file to your one-liner and checking the output displayed looks right, is a different one-time script to the feeding it the whole thing and redirecting the output to the results file.

      But it's definitely a test worth doing :)

      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

        Of course, no disagreement there. I certainly would not write a test suite using Test::* for that.
      I don't think anyone is advocating writing tests for one-time data conversion scripts. Certainly I am not.

      I think you've confused all the things that you think I said into newer meta-things that I haven't said.

      Rule 6, "Testing will go on as long as it has to." only matters if you're optimizing. If you're not optimizing (or any sort of refactoring) that data conversion script, then no testing need take place.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://962703]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2018-06-21 20:08 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (119 votes). Check out past polls.