Live data from Hacker News

Naming things (2015) [pdf]

www2.stat.duke.edu

21–30 of 60 posts

Re: Naming things (2015) [pdf]

#21
The problem I've found with file names like those described as "awesome" in the fifth slide is that if you have a bunch of them open at once, your taskbar/switcher/windows menu truncates them all to something like "2013-06-26_BRAFWTNEG...", making finding the one you want a bit more burdensome.

Jakob Nielsen had a post (a link for which I cannot find) recommending that web-page titles put the most specific information at the beginning. Doing something similar with file names (e.g., calling them "H01_MutantFraction...2013-06-26.csv", etc) would trade some of the advantages of the proposed scheme for speed of finding and switching between files when you're actually using them.

Re: Naming things (2015) [pdf]

#22

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...

When you have a long list of numbered filenames with no padding, pipe the list through "sort -V" for "version number" ordering.

Edit: Glitchmr has a better solution below, "ls -v".

Re: Naming things (2015) [pdf]

#23
I'm constantly harping on everybody to pay attention to their file naming.

I'm a graphic designer, so for me everything is Client/YYMM-Project/_FINAL/YYMM-COLLATERAL-NAME

Within each project there is a _PROCESS folder with a _ELEMENTS subfolder for pieces the client has given me to work with.

For invoices I do YYMMDD-ClientName-Project-Sum.pdf. When the invoice is paid, I rename the file to add -PAID- before the client name. Its simple, but its allowed me to easily track and maintain projects and billing over the years.

If I end up working for another 83 years, I guess I'll pad the year with a 0...

Proper file management is an undervalued skill and should be taught both in school and in corporate environments. In an old tech job we had a public folder on the server that was total chaos. So many people insisted on naming their files MAY-%day%-%contents%-%personsname% -- and, as you'd expect, people spent countless hours per year trying to hunt down that one file so-and-so worked on before they left for another job.

Re: Naming things (2015) [pdf]

#24

I'm constantly harping on everybody to pay attention to their file naming. I'm a graphic designer, so for me everything is Client/YYMM-Project/_FINAL/YYMM-COLLATERAL-NAME Within each project there is a _PROCESS folder with a _ELEMENTS subfolder for pieces the client has given me to work with. For invoices I do YYMMDD-ClientName-Project-Sum.pdf. When the invoice is paid, I rename the file to add -PAID- before the clie…

> I'm a graphic designer, so for me everything is Client/YYMM-Project/_FINAL/YYMM-COLLATERAL-NAME

> Within each project there is a _PROCESS folder with a _ELEMENTS subfolder for pieces the client has given me to work with.

Out of curiosity, why do you have the year/month in the names of both the project folder and the collateral file?

And why do you start the names of your final/process/elements folders with underscores?

Re: Naming things (2015) [pdf]

#25
If you look at the filename examples, there seems to be an implicit suggestion of naming a group of related files using a common prefix.

If one needs to distinguish groups of files, why not just put them in directories? That's the reason directories exist, no?

I can somewhat understand if some (bad) software is written to look for files only in a single directory and you have to put everything there. But otherwise, it seems pretty pointless to use a common prefix and make filenames longer.

Re: Naming things (2015) [pdf]

#26
post #24

I'm constantly harping on everybody to pay attention to their file naming. I'm a graphic designer, so for me everything is Client/YYMM-Project/_FINAL/YYMM-COLLATERAL-NAME Within each project there is a _PROCESS folder with a _ELEMENTS subfolder for pieces the client has given me to work with. For invoices I do YYMMDD-ClientName-Project-Sum.pdf. When the invoice is paid, I rename the file to add -PAID- before the clie…

> I'm a graphic designer, so for me everything is Client/YYMM-Project/_FINAL/YYMM-COLLATERAL-NAME > Within each project there is a _PROCESS folder with a _ELEMENTS subfolder for pieces the client has given me to work with. Out of curiosity, why do you have the year/month in the names of both the project folder and the collateral file? And why do you start the names of your final/process/elements folders with undersco…

Including the year and month on a project file means it can stand independent of it's directory for easy distinction in search, meaning you can find relevant files in a way that is uncomplicated and easy to understand.

[Edit] As dkarl mentioned more elegantly: this system helps map a project in time.

YYMM on project files is shorter and less ambiguous than using a project name for the same function.

I'd imagine the sub-directory underscore is also used to aid searching. You can easily visually identify (or filter) sub-directories.

> The initial underscore helps by (a) keeping those directories sorted [separately] and (b) providing a visual clue that they are 'special'. [0]

0. https://www.sitepoint.com/community/t/why-do-some-folders-ha...

Re: Naming things (2015) [pdf]

#27
post #24

I'm constantly harping on everybody to pay attention to their file naming. I'm a graphic designer, so for me everything is Client/YYMM-Project/_FINAL/YYMM-COLLATERAL-NAME Within each project there is a _PROCESS folder with a _ELEMENTS subfolder for pieces the client has given me to work with. For invoices I do YYMMDD-ClientName-Project-Sum.pdf. When the invoice is paid, I rename the file to add -PAID- before the clie…

> I'm a graphic designer, so for me everything is Client/YYMM-Project/_FINAL/YYMM-COLLATERAL-NAME > Within each project there is a _PROCESS folder with a _ELEMENTS subfolder for pieces the client has given me to work with. Out of curiosity, why do you have the year/month in the names of both the project folder and the collateral file? And why do you start the names of your final/process/elements folders with undersco…

I can't speak to stevewillows' answer, but my girlfriend uses a similar naming scheme in her architecture work. The project folder contains a year-month prefix indicating when the project started, and any year-month prefixes below that indicate when that part of the project was initiated. It maps the project in time for her: this folder tells her when she first talked to the client, this folder tells her when design started, this folder tells her when she got the first construction bids. The date on the top-level folder is extremely useful when looking through old projects. Just from consulting those files so often, she knows when most of her major projects were started and finished and how long each phase took, which is something I don't remember (and can't reconstruct) for most of the projects I've worked on. She has folders like this going back ten years. I can't even imagine what that would look like for my projects. I'm a bit jealous.

Re: Naming things (2015) [pdf]

#28
post #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 inconsisten…

Right, very good point about the endianness of the year. Makes sense now.

Re: Naming things (2015) [pdf]

#29
post #25

If you look at the filename examples, there seems to be an implicit suggestion of naming a group of related files using a common prefix. If one needs to distinguish groups of files, why not just put them in directories ? That's the reason directories exist, no? I can somewhat understand if some (bad) software is written to look for files only in a single directory and you have to put everything there. But otherwise,…

You loose the information in the directory title if the file is downloaded or from viewing the title in an application title bar.

Re: Naming things (2015) [pdf]

#30
The pdf didnt mention the most important point - keep it short and to the point

Its so hard to use CI interface and type that filename every time or navigating to in file explorer when its so long to read and the important bits of info should always be at the start.

Iso date conventions arent necessary since most files have metadata associated with it (create and modified date) so adding ISO date format is redundant for human made files . As you can always use a bulk renamer at any point.

But my point still stands just sort regularly and add some sorting identifier at the front of the file. Depending on who is working on file and what context it is a simple number at front suffices 01, 02, 03, etc or it can be a word and version number at end

Lastly the author didnt mention foldernames. Those need to be one or two words at most to help segregate information if theres lots of files in that one folder

If your creating machine made / autogenerated saved reports following a standard ISO state convention makes sense though, with regexable slugs, etc

Post reply on HN