Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Submission + - What are the Unwritten Rules of Deleting Code? ( 3

Press2ToContinue writes: I came across this page that asks the question, "what are the unwritten rules of deleting code?"

It made me realize that I have seen no references to generally-accepted best-practice documents regarding code modification, deletion, or rewrites. I would imagine /.'s have come across them if they exist. The answers may be somewhat language-dependent, but what best practices do /.'s use when they modify production code?

This discussion was created for logged-in users only, but now has been archived. No new comments can be posted.

What are the Unwritten Rules of Deleting Code?

Comments Filter:
  • just delete the code, and keep the old versions in a version control system, like git, svn, cvs, mercurial, whatever.
  • If they were written down they wouldn't be the "unwritten rules of deleting code," would they?

    • I believe in two unwritten rules of deleting code:
      1 - Beware of the ego of whoever wrote that code, specially if he or she is your Boss
      2 - Most people in this world don't quite accept the KISS principle, deleting code might go against that majority that believes a simple thing is a bad thing
      Those rules are specially important when you're replacing a whole module of the old code
      There are many exceptions of course.

Nothing is faster than the speed of light ... To prove this to yourself, try opening the refrigerator door before the light comes on.