You're going to hate this suggestion. I already hate it.

Retype the program.

When reading code, it's too easy to skip around, to glance over a questionable section without realizing it. When you type it all, you have to pay attention to every single line. No exceptions. This is actually the way alot of programmers learned to program, in the late 70's/ early 80's, myself included. In my case, almost all my programs came from Compute! Magazine, and I typed them all in manually. This method gets you close to expert on a program's code, if you can do it.

Yeah, it's still a lousy suggestion.

My next suggestion, for what it's worth, and the one upon which I usually rely, is to rewrite it. "If the code's uncommented, it obviously cannot be good code, right?" "It's probably pure spaghetti! Not like you or I would write, if we were to do it ourselves?" "And it's bloated, too, right? I mean, who needs 2400 lines to do something like this?" Your boss will love those comments, right?

I'm not sure if either suggestion will help, but at least you have my sympathy, if not concrete assistance.


In reply to Re: Seeking advice about learning another's code by ginseng
in thread Seeking advice about learning another's code by E-Bitch

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.