Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
This is more of a conceptual question, so it probably needs to be moved (such is my luck), but here goes:

So, I'm at work right (all the good stories start out this way... stop me if you've heard this before) when my supervisor says, "Hey, <insert division name here> has this really cool database verification script that checks the lines of a pipe delimited file for accuracy / formatting, and if each line passes, puts it into the database, and if it fails, emails the owner of the particular line of the file. Here is the script, can you figure it out, and get one like it running by next week for our database?"

<insert foot into mouth>Uh... (fearing job security) Sure!</insert foot into mouth>

So, now I'm pouring through this 1200 line perl script with another 1200 lines of sql scripting standing behind it going, "Uh... damn... shouldnt have said that."

My question for the monks around here is this:
I have figured out other's code before, but never on this scale before. I have begun to write / draw the UML diagram for this (I think this is UML, at least, but if not, its the diagram that has conditional statements in the diamonds, with lines to show program flow...) and have gone through pages. (Yea, I can hear you already, use a program that does the UML diagram for you... but I want to draw it... :)

So, does anyone have any tips on figuring out large blocks of uncommented code? <shiver>
I see a lot of stuff that I know about, and many things that I can figure out (like perl's database access routines), and a few things that I have no clue on (like this: $pipecount = tr/|//;). I have only known perl for like 5 months, and havent had too much time to devote to it for pleasureful programming. I have the camel, but what are good ways to go about this (by next week?)

thanks!
E-Bitch

In reply to 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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found