Original date:2016-07-13 05:04:38 Edited by: petelomax Subject: Re: RedyCode 0.9.3

Couple of points, but first a bit of history:
Ten years or so ago, when I added backups to Edita, I went with YMDDHHMM.exw as the file names:
Y was a single digit 0-9, M was 123456789ABC, and it artificially "clocked on" for >1 save per minute.
[That actually meant a limit of 10,000 saves of a particular file per day, reducing to 7640 if you started at 23:59:00!]
The backups were mapped back to a real file name via a database, and a primary goal was that the database key was a single (31-bit) integer.
Anyway, all that is just history now, but it is a starting point for the rest of what I am about to say.

Over the years I occasionally regretted the difficulties of rummaging around the backup directory manually, but probably much rarer than you might think.
Being able to (very) quickly pull up an ordered list of all backups of a particular file, without filtering through tens of thousands of filenames, proved far more important.
However, as it happens I am likely to re-implement this soon, and I think human-readable filenames will probably win out this time, and the database might well go.

One thing that became very clear, very early on, was that it was perfectly normal to have misc.e, misc.ew, and misc.exw.
If the backup name had the right extension it was a great help when syntax colouring it, and obviously when restoring it.

There are two dates to consider: the date of the file you are backing up, and the date on which the backup was made.
If you are going to have a date-encoded filename (as well as the system date on the backup file), you need to decide which is which, and stick to it.
In an ideal world you would restore the former(/original timestamp), but in practice that never proved as critical or as useful as I first imagined.
It is probably better, or at least sufficient, for the editor/IDE to flag/colour those it has recently restored.

Version numbers is an interesting option, I'm still cogitating on the benefits it might bring, but already leaning toward forgetting all about timestamps.
Do you have filea.001.exw, filea.002.exw, fileb.001.exw, and fileb.002.exw, or fileb.001.exw, filea.002.exw, fileb.003.exw, and filea.004.exw?
I suspect the latter has more merit, and when you breach 999 just start a new directory, and as a bonus purging old backups should become a breeze.

Ah, I think I just remembered why I went with the obfuscated filenames thing: you can have misc.e in loads of different directories,
and (for reasons long lost in time) I had some idea of backups being "owned" by Edita, all in the same [hidden] directory.
I will always dislike anything that clutters up my working directory with dozens of backup files, but I've nothing against backup subdirectories appearing everywhere.

Anyway, just some thoughts,

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu