Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

What are the Unwritten Rules of Deleting Code?

Press2ToContinue (2424598) writes | about a year and a half ago

Programming 3

Press2ToContinue (2424598) 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?"

Link to Original Source

cancel ×

3 comments

Sorry! There are no comments related to the filter you selected.

use version control systems (1)

Janek Kozicki (722688) | about a year and a half ago | (#42497489)

just delete the code, and keep the old versions in a version control system, like git, svn, cvs, mercurial, whatever.

Well, duh! (1)

2muchcoffeeman (573484) | about a year and a half ago | (#42497721)

If they were written down they wouldn't be the "unwritten rules of deleting code," would they?

Re:Well, duh! (1)

macpacheco (1764378) | about a year and a half ago | (#42499349)

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.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>