Live data from Hacker News

Naming things (2015) [pdf]

www2.stat.duke.edu

11–20 of 60 posts

Re: Naming things (2015) [pdf]

#11
post #9

Considered that most of the world uses "little-endian" format for date writing ( https://en.wikipedia.org/wiki/File:Date_format_by_country_(n... ) how comes ISO 8601 was set on "big-endian"? Not so practical for anything else but file naming IMHO...

A little pain converting to a non-stupid-date format now would result in less pain for rest of the history of humanity (so hopefully thousands of years). I think it's worth it.

Re: Naming things (2015) [pdf]

#12
Those filenames look terrible to me.

BRAFWTNEGASSAY doesnt make any sense. To distinguish between the filenames you actually have to read the full filename, and with such long filenames chances are they won't fully be displayed, so that you have 2013-06-26_BRAFWTNEGASSAY_Plasmid-Cellline-100-1MutantFrac... For the first four files.

Keeping cruft out of your filenames seems like a much, much better way to name files. Also, most systems keep track of the creation data, no need to keep it in the filename. I think it's better to give files an id.

Re: Naming things (2015) [pdf]

#13

Those filenames look terrible to me. BRAFWTNEGASSAY doesnt make any sense. To distinguish between the filenames you actually have to read the full filename, and with such long filenames chances are they won't fully be displayed, so that you have 2013-06-26_BRAFWTNEGASSAY_Plasmid-Cellline-100-1MutantFrac... For the first four files. Keeping cruft out of your filenames seems like a much, much better way to name files.…

> most systems keep track of the creation data

True, but often it makes sense to put date into the filename as well. For example, notes for an event that happened on a certain date. You might write the first draft at that date and then edit/move it later. It's still strongly related to the date the event took place, but the filesystem ctime and mtime will be different.

Re: Naming things (2015) [pdf]

#14

My only real concern is with left-padding numbers with 0s when you don't know in advance how big the numbers are going to get. Do you pad to 2 or 3 digits or...

Another annoyance is sorting hostnames, which reasonable sort right-to-left with period-delineated fields.

Re: Naming things (2015) [pdf]

#15

Those filenames look terrible to me. BRAFWTNEGASSAY doesnt make any sense. To distinguish between the filenames you actually have to read the full filename, and with such long filenames chances are they won't fully be displayed, so that you have 2013-06-26_BRAFWTNEGASSAY_Plasmid-Cellline-100-1MutantFrac... For the first four files. Keeping cruft out of your filenames seems like a much, much better way to name files.…

BRAFWTNEGASSAY would make sense to the owner of the file or someone working in that particular project. Consider it a project name, or a keyword that is relevant in that particular context. If you're working with files from different sources with multiple contributors this sort of approach works brilliantly.

You could have named it differently: 2013-06-26_KUTKLOON7_Plasmid-Cellline-100-1MutantFrac

Creation date can sometimes be lost if you copy/move the file between different mediums

Re: Naming things (2015) [pdf]

#16

Those filenames look terrible to me. BRAFWTNEGASSAY doesnt make any sense. To distinguish between the filenames you actually have to read the full filename, and with such long filenames chances are they won't fully be displayed, so that you have 2013-06-26_BRAFWTNEGASSAY_Plasmid-Cellline-100-1MutantFrac... For the first four files. Keeping cruft out of your filenames seems like a much, much better way to name files.…

> Those filenames look terrible to me.

I agree. Maybe at some point, and in his example I think it makes sense to just change some of those '_' to '/' and boom, you now have folders.

Re: Naming things (2015) [pdf]

#17
post #9

Considered that most of the world uses "little-endian" format for date writing ( https://en.wikipedia.org/wiki/File:Date_format_by_country_(n... ) how comes ISO 8601 was set on "big-endian"? Not so practical for anything else but file naming IMHO...

First off and most importantly ISO 8601 is a standard for data interchange so being easy to parse visually and with a computer is a feature. ISO 8601 groups and sorts well without needing special rules and remains consistent all the way from the year to the millisecond. It is easier to parse visually when you are looking at a list of values, especially if they are similar.

Second "little endian" dates are inconsistent because the year is still big endian. If you want to remain consistent you would have to write the current year as 1720 (or even 7120!) because the years (or decades) are smaller than the century. To achieve the consistency of ISO 8601 with little endian time you would also have to write seconds before minutes and minutes before hours.

Re: Naming things (2015) [pdf]

#19
post #10

> avoid [...] accented characters It's certainly good advice and I definitely avoid using non-ASCII characters in filenames in practice. But I can't help thinking that advice like that is why support for Unicode is still buggy in many places. I see nothing fundamentally wrong with using non-ASCII for filenames (and the slides don't give any reasoning), if only random software wouldn't mangle encodings, sorting order,…

In my view the main problem is in sharing those files with others. Other systems may not support those chars or the other users may not be aware of how they are sorted and even how to type them in a search.
Post reply on HN