in reply to Re: nmr comparison script
in thread nmr comparison script

That is truly a beautiful and impressive demonstration of code analysis and reduction. It reminds me of a very similar exercise I had to do in C about 15 years ago, taking someone else's War and Peace-sized copy/paste extravaganza and boiling it down by creating subroutines with appropriate parameters (so it could compile and run on MS-DOS, 15 years ago). I was appalled that the author of the original monster had presumably majored in Computer Science. I was only several weeks into learning C at the time, but had already spent a few years with FORTRAN, so successful code analysis was very much a matter of having practical experience.

Alas, in the current situation, the sad thing about NMRsucks's first opus -- whether reduced or not -- is the complete absence of a sensible algorithm, and the apparent lack of an appropriate spec for what the process is supposed to do.

Your repair work is inspiring and instructive, and I applaud (and ++) that, but the program itself is still basically unworkable, and the OP will be better off starting over from scratch, after he figures out how to explain the goal properly.

Replies are listed 'Best First'.
Re^3: nmr comparison script
by BrowserUk (Patriarch) on Jul 22, 2004 at 03:26 UTC

    Thanks. 4 hours of disconnected boredom :)

    I completely agree with your assessment of the underlying lack of algorithm, which is basically why I took it no further (that and the phone engineer calling to tell me the line was back). It actually took much longer to write up (badly) than it did to do.

    I hope that it will serve the OP in three ways.

    1. You don't become a programmer in a week.
    2. Copy & Paste is not the answer.
    3. Small is beautiful. If you can see what your doing, often as not see, you can what your doing wrong.

    ++ to opus!


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon