Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
This is one version of the "What do I do with this old code?" question. Basically, you're looking at maintaining cruft and how to do that safely. Personally, I would go through the following steps:
  1. Document the assumptions you find. At least review the documentation. We're going through this right now with some old VB code. We have no idea what language the app will end up being in, but at least we have some idea of what's going on, in case the primary maintainer gets hit by a bus. Twiki is good for this, and easy to set up. Plus, management can read it, if they care.
  2. Start adding unit tests. Add tests for everything you touch, plus one additional test. The tests may start out being stupid, but at least you'll have something. Plus, you're only testing those items you change. Stuff that isn't broken and isn't being touched, theoretically, doesn't need to be looked at ... at first.
  3. Eventually, you'll end up with a critical mass of documentation and unit tests. At that point (3-9 months down the road), you'll be able to make better decisions about what to do with the code. You might have accidentally rewritten some of it by that time. At the very least, you'll be able to make better cases to management for whatever decision you choose to make.

Basically, you need to triage based on need for new functionality. Most applications tend to have between 50% and 90% of the code touched every 18 months, or so. This is a rule of thumb, based on my experience.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested


In reply to Re: Howto best review code that has not been reviewed before? by dragonchild
in thread Howto best review code that has not been reviewed before? by gumpu

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 learning in the Monastery: (4)
As of 2024-04-19 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found