Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: (OT) Generated Code vs. Libraries

by jordanh (Chaplain)
on Oct 21, 2004 at 13:45 UTC ( [id://401159]=note: print w/replies, xml ) Need Help??


in reply to (OT) Generated Code vs. Libraries

Without knowing more about this, I'd say your biggest challenge here is what's known as design recovery. It doesn't sound like you have a lot of design docs or requirements beyond what is implicit in the system that "sort of works". You're going to have to recover the design from this implementation.

I would suggest not doing anything too drastic, not right away. I would attempt to build up your common library that does as much of the common functionality of the generated CGIs and migrate the generator to use these modules in the generated CGIs. Only when you have the code factored in such a way will you be able to see the true requirements.

You'll need a good test bed and the ability to migrate individual projects over to your new common libraries to ensure you don't break anything. Set up your development and test environment first. You need a dev environment where you build your new modules and a separate test environment where you field your changes in an environment as close to 'real world' as you can. If you can't afford building up this kind of infrastructure, perhaps you can't afford to rework this system.

If you can't afford to rework the system, then I'd propose that you spend all the time trying to understand and document what you've got so that you can maintain and debug it as it is currently structured.

Be very clear in your goals. I believe you when you say it's a mess, but have clear ideas about what you hope to improve. Is extending it too inflexible? Performance poor? Remember that your various goals might be cross-purposes to one another. You might increase flexibility and decrease performance.

You stated that debugging is too difficult, which suggests comprehensibility is a big problem, which is why I suggest the approach of improving it slowly with stepwise refinements. Don't be afraid of building up something that you'll eventually throw away in favor of a new architecture from the ground up. You might be building up these modules only for the purpose of understanding the system better so that you can intelligently rebuild it.

Updated: Grammar and spelling.

Replies are listed 'Best First'.
Re^2: (OT) Generated Code vs. Libraries
by rje (Deacon) on Oct 22, 2004 at 18:26 UTC
    Jordanh is right. A test bed is critical.

Log In?
Username:
Password:

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

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

    No recent polls found