I am a big fan of conventions, as long as they are justified. The one thing I have been confronted with lately and it is very annoying is the idea that we should do something a certain way simply because we have been doing it that way for a while now. I am a firm believer of reasoning and have been trying to get my work colleagues to follow suite. After all, if you’re going to do something it helps to have a justification for doing it.
In the light of my fight for reasoning I would like to share a convention of mine for naming copies of files. The scenario goes something like this…
I am working on an application which has some configuration files. These files are cached in the operating environment based on its name, so to test changes in the configuration file we need to change the name temporarily to something which has not been used in the last few hours. The convention I use is “[OriginalName]_[hour][minute][second]_[increment].ext” where [OriginalName] is the original file name, and the rest you can figure out. It is very generic and has a few applications. With the addition of date values it can be used for backup purposes. Even if you create a few versions in one minute, you can increment the last value and everything will carry on happily.
I call this Dawsons Convention. This convention is not necessarily just this implimentation, but is the general idea of using local file names.