Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Rewriting a large code base

by frag (Hermit)
on Jun 28, 2001 at 20:32 UTC ( [id://92358]=note: print w/replies, xml ) Need Help??


in reply to Rewriting a large code base

In a previous job I was on a team involved doing just this, only the original code was crufty but not really awful like yours. To improve things, a programmer on the team drew up a plan for a complete object-oriented redesign. This involved these steps:
  1. Breaking up the system into objects/classes
  2. Cataloging all of the scripts that would have to be re-written using the new design
  3. Formulating a plan/project schedule for completion of all of these modules and scripts, in a logical order based on what modules use what other modules
  4. Writing the API for each class, i.e. some basic POD for all the API calls, just listing what arguments are required/expected and what would be returned
  5. Writing tests for each API call
  6. Beginning to fill in the empty API methods with real code, and running tests as you go
  7. Constantly revisiting the OO API, tweaking it when it was realized that we forget something or that something was unnecessary or belonged to a different (or even new) class, and changing the tests to match the API changes
  8. When a module/script passed all tests, fully documenting the POD

This is, of course, very oversimplified, especially the order. The steps weren't done as discretely as this list sounds; the project schedule wasn't really done until after the basic API POD was written, and kept being adjusted; etc. We used CVS. The API POD was passed through a pod2html variant, so there was an easy reference to it all with a browser.

-- Frag.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-03-19 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found