Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Seven habits of highly careful coders

by bwelch (Curate)
on Sep 15, 2003 at 15:08 UTC ( #291573=note: print w/replies, xml ) Need Help??

in reply to Seven habits of highly careful coders

Relating this to recent projects involving updates and additions to other people's code, it reminds me of ways to both test legacy code and document my own.

In testing legacy code:
- Is it still in use? If not, why?
- What's the scope? Exactly where will this work and where will it fail?
- Is the author still around so I may ask questions?
- Is it worth figuring this out and updating it, or would I be better off starting over?

In documenting my own code:
- What does this code do and why was it created?
- Include a history section that documents changes and dates.
- Add a simple outline if it's complex so it's easy to understand it without studying all the code.
- Document the code assuming you'll be trying to understand it two years in the future and you don't remember anything about it.

  • Comment on Re: Seven habits of highly careful coders

Replies are listed 'Best First'.
Re2: Seven habits of highly careful coders
by dragonchild (Archbishop) on Sep 15, 2003 at 15:54 UTC
    - Include a history section that documents changes and dates.

    Isn't this what change-control (such as CVS or SourceForge) is for? I would use CHANGES sections for release notes and keep version changes relegated to source control. Otherwise, the source file gets too cluttered up!

    We are the carpenters and bricklayers of the Information Age.

    The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://291573]
[marinersk]: I saw that you could post it on the Personal Nodelet, but you have to provide the content also. No way to auto-populate it. Not that this would solve my distraction problem...
[LanX]: there are template variables to "Auto-populate" it
[marinersk]: Yeah, someday I might become interested enough to poke around PerlMonks more internally. Most of the fancy stuff is way down on my to do list.
[LanX]: Yeah ...
[LanX]: no variable for votes_left
[marinersk]: Ah, well. I will continue to deal with it, as I have. Thanks for poking about, though.
[LanX]: you are welcome! :)
[marinersk]: LanX, your link to Darmstadt on your Home Node is broken.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-05-29 14:29 GMT
Find Nodes?
    Voting Booth?