Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Bad Karma = Bad Code

by seattlejohn (Deacon)
on Aug 13, 2002 at 17:56 UTC ( [id://189896]=note: print w/replies, xml ) Need Help??


in reply to Bad Karma = Bad Code

Sounds frustrating. Perhaps you just wanted to vent (understandable enough ;-), but here are some practical suggestions that might make your life easier:
  • Use source control.
  • Use bug-tracking tools.
  • Build (and use!) automated test cases.

Source control is absolutely indispensible when the PHB says "put it back the way it was before", or when you realize your change broke something, or that you mistakenly nuked some important comments. CVS isn't the most user-friendly solution IMHO, but it's in widespread use and is free.

Bug-tracking tools help you keep track of change requests -- whether they come from the boss, from one of your users, or from yourself ("I know this will be a maintenance nightmare later") -- in a logical way. If Bugzilla or something like that is overkill, at least open up a spreadsheet so you have all the bug/change requests in one place and can prioritize them.

Automated test cases will let you sleep soundly at night -- and will likely give you a huge productivity boost too. Assuming you do eventually get around to cleaning up the messy code created in the urgency of the moment, how do you know it still works properly? (For that matter, how do you know it worked right in the first place?) If you have solid tests, though, you can feel confident replacing the hacks in your code with better-thought-out solutions -- and doing things like refactoring, too.

Sorry if I'm preaching to the converted here, but I suspect there are at least some monks lurking around here who haven't yet experienced the thrill of adopting these techniques and seeing them mitigate what could've been a really painful situation...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found