Last Updated: February 25, 2016
·
442
· nirgavish

The law of existing code

Note: I've searched and asked, and no-one can point me to an actual "<something>'s law", that would describe this phenomenon. I fully realize that the first comment may well be a link to a wikipedia article, and I thank you in advance for the humiliation, Alex or Tomer.

The Law of Existing Code goes like this:


While going over code they wrote in the past or inherited, programmers will think or voice this opinion:

"This code is bad, I need to throw it away and rewrite it."


This opinion forms regardless of the programmer's experience or the quality of the code.

The feeling intensifies as the code gets older, regardless of the programmer's experience or the quality of the code.

Experienced programmers may be able to suppress the urge to rewrite on impulse, but practically all programmers can feel this compulsion slowly build.