"Old" is the New "New"

Do you have a software project littered with now-old items named "XxxxNew"? If you're determined to avoid doing it the right way, here's a less terrible approach.

"Old" is the New "New"

Who among us has never updated an item using the following approach?

  1. Make a copy of the item
  2. Add the suffix "New"
  3. Make the necessary changes to the "New" item
  4. Come back five years later and still see a now-old item named "New"

I'll admit, I've done it more than once.

A Less Bad Way

The best approach is to use version control so you can safely delete the old item while maintaining access to it and avoiding building up a bunch of cruft.

But, at the end of the day, we're still programmers, and we're still lazy, and not everything can go in version control (despite my best efforts).  So there are still times when the rename-a-copy-as-"New" approach will tempt us.  When it does, allow me to suggest a Less Bad Alternative™:

  1. Add the suffix "Old" to the original item
  2. Make a copy of the item and restore the original name
  3. Make the necessary changes to the copied item
  4. Come back five years later and see a now-old item named "Old"

Seriously, though, just use version control and you can avoid this problem altogether.

Scraps of Wood and Code
Resisting the packrat mentality.

All original code samples by Mike Wolfe are licensed under CC BY 4.0