< Previous
Next >

: This entry is stored in the file nycb/2001/7/7-3 (because it's my fourth entry today). The problem with this scheme is that sorting the filenames, which Python can do relatively quickly, doesn't sort the entries. I've changed it in new NewsBruiser to be nycb/2001/07/07-3, but that still won't sort properly if there are more than ten entries in any given day (which has happened for NYCB eight times in the past three years). I have a custom sort which will sort that properly, but even optimized it's 20 times slower than a straight filename sort. I'm going to leave it at that for now, but would it make more sense to violate the zero-one-infinity rule and make it nycb/2001/07/07-03? Then I could use the filename sort, but if for some reason a notbook got more than 100 entries in a day, it would break.


[Main] [Edit]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.