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.


In reply to Re^2: nmr comparison script by graff
in thread nmr comparison script by NMRsucks

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.