Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Sub-initiate needs help getting started

by qq (Hermit)
on Aug 26, 2003 at 22:36 UTC ( [id://286884]=note: print w/replies, xml ) Need Help??


in reply to Sub-initiate needs help getting started

Good luck, first of all.

There is a lot of good advice given so far about how to write better code than you've been given, but I'd be wary of making large structural changes given your deadline. It certainly needs it, but I doubt its feasible in the time frame.

So here is a quick and dirty approach:

Do the subs all look roughly the same - if you squint? It may be that there is just one main sub per report and some helper functions. Given that the code is so long, its probably not well structured and may be very repetitous. If the new reports you need to create are similar to the existing ones, you can just copy and paste one of the existings subs and make modifications until it works.

If the subs don't all look the same, and aren't 'one per report', this approach won't work at all.

Another possible route is to not change the existing code at all, but write any new report code from scratch. In the .pl file have a simple exit clause near the top so that if one of the new reports need to be processed, you use the new code, or else fall through to the original mess.

If the existing code is considered broken, this won't work.

Two more random points:

  • If confidentiality clauses permit, feel free to post bits of code here for explanation.
  • If you are not already use an editor with syntax highliting (TextPad, UltraEdit, anything). It makes a lot of difference, even if you don't use a full blown IDE.

And again, good luck.

qq

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-29 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found