Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Seeking advice about learning another's code

by ginseng (Pilgrim)
on Aug 02, 2001 at 02:48 UTC ( [id://101516]=note: print w/replies, xml ) Need Help??


in reply to Seeking advice about learning another's code

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.

  • Comment on Re: Seeking advice about learning another's code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://101516]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found