Monday, December 12, 2011

On naming files

Last week I renamed my files containing the slides of my lectures for this past semester. I had started the semester by naming them: "lecture1", "lecture2", "lecture3", etc. At some point I lost track, and started using dates instead: "october25", "october28", etc. Now I wanted to given them a name that would be helpful, should I look them up again in the future.

Should I call them by their number - lecture1 through lecture35? Not so good, because I may want on some future day to look up the lecture about, say, quick sort, and with that labeling I have no easy way to know where those slides are.

Should I call them by their topic - "Ocamlpatternmatching", "quick sort", etc.? Not so good, because there is a logical order that is lost when I do that.

Should I call them by a combination - "15_higherorderprocedures", "25_runtimeanalysis", etc.? Pretty good, except for one minor flaw: when I list the files in the directory, they do not appear in the correct order: 12blabla precedes 2blabla.

So I ended up calling them by a combination, by started the numbering at 100: "115_higherorderprocedures", "125_runtimeanalysis", etc.

The result looks pretty good. It only took me 25 years of professional experience to figure that out. How come no one has ever taught me how to organize my files? Did I miss a class on "remedial organization" at some point?


  1. I use leading zeros: 00-intro, 01-sorting, etc.

  2. Windows 7 will index your files so that you can easily find your document about "Ocaml pattern matching" regardless of the file's name. I think Spotlight in MacOS does something similar.

  3. The title thing in the name of the file has the problem that it must be short and basically single-topic.

    You can always just number them lect01, lect02, ... and add a file index.txt where you write what file has what in whatever length you like.

  4. JeffE: since that is not the way in which I write numbers in real life, your system has the risk tat I will not adhere to it consistently. I may forget to put the extra zero in front of the number.

    NickH: not if your document is handwritten and in the .jnt format!

    Anonymous: it takes self-discipline to update the file index.txt whenever you change the list of files. I can do it some of the time, like a New Year's resolution, but I can almost guarantee that I won't do it consistently. Only Programming Languages researchers have the discipline to decide on a rule and stick to it. Algorithms researchers take shortcuts all the time.

  5. I used 00intro.tex, 01misragries.tex, 02amsdistinct.tex, etc. for my just-concluded Data Stream Algorithms course. Yes, that _is_ the way I write numbers which I expect to lie in the range [0-99]. :)

  6. Is there a way of tagging individual files with keywords (without putting them into the file name)?

  7. Well, anonymous, you won't be surprised to hear that I have not the faintest idea. But some other reader might know the answer to your question.

  8. Leading 0s? FYI, Macs know how to sort numbers correctly and have for many years.

  9. Apparently, OneNote will search your handwritten text, and it seems to work surprisingly well:

    It also imho dominates journal is every dimension (ok by default, journal gives you more real estate to write on, but that can be fixed by going to full screen mode in onenote). Plus you can enable syncing with the cloud and with other machines. There also exist tools to convert jnt's to onenote.

    So there: technology has once again given you a way to avoid getting more organized.

    Full disclosure: I work at MSR. :)

  10. Re: tagging individual files: On Mac OS, if you right click a file and do "get info", you can add keywords to the "spotlight comments". Spotlight will find them. That of course takes discipline, and I have never done it myself (except to confirm it works just now). There may be a quicker way to do it. There are also apps that will easily "tag" mail messages, but I have never used those either since they didn't work over IMAP (at that time).

  11. Kunal hit the nail on the head. Claire, I strongly recommend giving OneNote a try. It is far, far superior to Journal.


Note: Only a member of this blog may post a comment.