7 ms·
I am also that age, and kebab-case is the best case for filenames. 2021-01-01-some-important-document.pdf gives me the warm fuzzies. On the off chance that som
by hardwaresofton 5y ago
I am also that age, and kebab-case is the best case for filenames.
2021-01-01-some-important-document.pdf gives me the warm fuzzies. On the off chance that some more differentiation is needed, throw in an underscore and a whole new world opens up
- apricot 5y agoI'm of the opinion that kebab-case is the best case for all identifiers, because it's easy to read and to type. As always, Lispers were right all along.
- tambourine_man 5y agoI go one step further: 2021-11-11_client_project-name.ext 2021-11-11_client_projectName.ext is also OK. But underscore separates fields, hyphens for space replacement.
- ridaj 5y agoMaybe you mean `2021-11-11_client_project-name_v2_final.ext`
- whatusername 5y ago2021-11-11_client_project-name_v2_final_ridaj(1).ext
- eurasiantiger 5y agoCopy (2) of 2021-11-11_client_project-name_v2_final_ridaj(1)__FINAL-v2.ext
- hardwaresofton 5y agoI see and applaud your use of the underscore there, but I must reject the premise! work/client/project/2021-11-11-file.ext is more or less how I lay stuff out. I’d say client/project is a folder level distinction (arguably dates too). [EDIT] Realistically most of the stuff under <project> is git repos and I usually make a “home” repo where I keep org files for tracking hours, notes, and resources related to the engagement.
- cmg 5y agowork/client/project/2021-11-11-file.ext is great until you've got a '2021-11-11-project-status.txt' in a few directories and you need to find one quickly! I do a combination: clients/client/project/2021-11-11-client-project-update.txt
- renewiltord 5y agoI just store it as a content hash and then when I want to find the file, I just have to recreate its content and I can then just get the hash.
- ModernMech 5y agoIt sounds like what everyone in this thread needs is a database file system. This was always my favorite proposed feature of Windows Longhorn that never made the cut. Almost 2 decades later and Microsoft's latest OS still doesn't have this feature.
- nayuki 5y agoI wrote about what I perceived as deficiencies of hierarchical file systems, and proposed an alternative organization based on tags and hashes. It was discussed on Hacker News last week and many years ago. https://www.nayuki.io/page/designing-better-file-organization-around-tags-not-hierarchies https://www.nayuki.io/page/designing-better-file-organizatio... ; https://news.ycombinator.com/item?id=29141800 https://news.ycombinator.com/item?id=29141800
- tambourine_man 5y agoHave you used BeOS?
- ModernMech 5y agoFor sure! I actually used Be before I ever used Linux.
- Zababa 5y ago
- pluc 5y agothis is the way
- tomcam 5y agobut the extra Shifts, no thank you
- pluc 5y agoyou gotta involve your pinky or it'll atrophy
- reaperducer 5y agoCut most mine off in an unsupervised Halloween pumpkin carving accident when I was a kid. I think the lack of length actually allows me to type faster.
- zajio1am 5y ago> But underscore separates fields, hyphens for space replacement But why not the other way, hyphen-minus for separating fields and underscore for space replacement? That seems to me more consistent with how underscores and dashes are used.
- zepearl 5y agoI fully agree, that's how I do it :) my_project-some_activity-this_document-20210923-v02.txt
- ModernMech 5y agoKebab case is the often overlooked benefit of prefix notation and semantic white space in programming languages. Honestly the best case of all cases imo.
- kibwen 5y agoOne glorious day we'll accept programming languages that require spaces around infix arithmetic operators so that we can make kebab case a reality!
- JasonFruit 5y agoLisps, especially Scheme with its `x->something-else` convention, have ruined naming in other languages for me.
- eCa 5y agoMaybe Raku[1] is for you! [1] https://raku.guide/#_syntax_overview https://raku.guide/#_syntax_overview (see section 1.7.1)
- MaxBarraclough 5y agoForth does something like this, by virtue of its reverse Polish notation. In Forth, 'words' (which are roughly analogous to functions and operators) must always be separated by whitespace, as Forth doesn't parse out operators the way most languages do. In exchange, you get the ability to use symbols in identifiers, as Forth has no reason to single out symbols like + as being syntactically special. You can even use a number for the first character. (For that matter, Forth will even let you override the usual interpretation of a numerical literal, but that's always struck me as going a bit far.) It gives you a + word, analogous to the + operator of most languages [0]. It also gives you a 1+ word, as an (admittedly slight) abbreviation of the sequence 1 +. [1] If you wanted a 2+ word, you could easily define it yourself. (This property of Forth evidently wasn't enough to get it to take over the world, but it's still neat.) [0] https://www.complang.tuwien.ac.at/forth/ansforth-cvs/documents/html3/core/Plus.html https://www.complang.tuwien.ac.at/forth/ansforth-cvs/documen... [1] https://www.complang.tuwien.ac.at/forth/ansforth-cvs/documents/html3/core/OnePlus.html https://www.complang.tuwien.ac.at/forth/ansforth-cvs/documen...
- Raineer 5y agoIn my work, today's date would be 21K11, to save space over the longer date.
- onychomys 5y agoAre you working in some embedded system with tiny memory space or something? What's the use of saving one character? Just make it YYMMDD!
- blackboxlogic 5y agoHow do you distinguish 21K111 and 21K111?
- inanutshellus 5y agoAre you trying to catch GP on differentiating hours, were it to be appended to his time format (1st @ 11 vs 11th @ 1am)? Notably he didn't promise any, but presumably one'd need a separator... Maybe, per his "K" usage of the month, one'd use the alphabet again. 11am would be "K" again... or lowercase just for giggles? I don't think it reads very well, but I also think one'd get used to it pretty quickly.
- blackboxlogic 5y agoI was thinking January 11th vs November 1st. Maybe their "date" doesn't need/support day-of-month? Or they typod and I should just focus on my work.
- apricot 5y agoI imagine January is A and November is K, so 21A11 vs. 21K1 (or maybe 21K01).
- blackboxlogic 5y agoAh yes, I missed that K was a month.
- jjoonathan 5y ago> kebab-case I hadn't heard that before and I love it.
- sodapopcan 5y agoIf you hadn't heard kebob-case called that before there's a chance you haven't heard SCREAMING_SNAKE_CASE called that before, and I couldn't live myself if I didn't let you know.
- inanutshellus 5y agothat's hilarious, thanks for sharing that. Perennially relevant xkcd: https://xkcd.com/1053/ https://xkcd.com/1053/
- sodapopcan 5y agoAwe, in turn I have never seen that particular xkcd—it's great! I learned to call it "feigning surprise" and I always try and be conscious of it (though I still catch myself doing it from time-to-time).
- Asraelite 5y agoGoogle considers it too violent apparently. In one of their recent changes to their style guide, they started recommending "dash-case" instead. https://developers.google.com/style/word-list#letter-k https://developers.google.com/style/word-list#letter-k
- ur-whale 5y ago> 2021-01-01 Yes on the date format. Saves you so much time.
- zz865 5y agoAgreed on dates ordering problem but 20210101 is so much easier to type.
- nicoburns 5y agoBut much less easy to read!
- testplzignore 5y agoYears that end in a 1 are awful when doing this, especially in October and November. We've had 20211001, 20211010, 20211101, 20211110, and now today 20211111.
- zokier 5y agoI just tend to use $(date -Is) so I don't need to think what date it happens to be today. I guess -Id would work if you don't want the time part.
- hnburnsy 5y agoI don't bother with the century or the dashes, saves time... 211111_foobar_v1.txt I am old enough that I still save before printing. I think it was Lotus 123 that engrained it for me.
- jonnycomputer 5y agoI've recently shifted sharply toward the dash from the underscore. I find it more readable, and it doesn't require the shift key. However, I do find it useful to use underscores to create groups, e.g. test-001_2021-10-11.log. Including hours, minutes, seconds is still awkward.
- discreteevent 5y agoThere's a customer for everything. I've just never liked the aesthetics of the underscore. Also if your underscored thing gets put in some document and then underlined the underscores can become invisible.
- jonnycomputer 5y agoA lot of this is personal aesthetics, for sure. Personally, I am not a big fan of camel casing. In code, I only use it for class names, generally. I don't find it particularly readable, and for filenames, not all filesystems are case sensitive, so best not to rely on case to differentiate files. Camel case does have the nice property of being more compact, as no character is required. That's its main benefit. R traditionally uses the . as a legal character in identifiers. Once you get it used to not being syntactic, I found I actually prefer them to underscores.
- kingcharles 5y agoBurn the witch!
- FpUser 5y agoBrother in arms. I just posted similar thing below.
- FpUser 5y agoI use this style: 2021-01-01_what-happened_who-did-it_possible-reason
- jerry1979 5y agoI found that some_document_2021-01-01_v03.pdf works best because it keeps the same document next to its other versions alphabetically, keeps them in date order, and keeps them in a sub-day version order.
- jaclaz 5y agoAs a side note, in the good ol' times of ISO9660 level 1-4 and the various mkisofs parameters, an underscore _ which is a CAPITAL -, may have given issues, only for the record/as a curiosity: https://web.archive.org/web/20151007005513/http://www.911cd.net/forums//index.php?showtopic=25612 https://web.archive.org/web/20151007005513/http://www.911cd.... P.S. should anyone want to see/run the actual batch, a copy has been uploaded here: http://reboot.pro/index.php?showtopic=18962&page=29#entry204858 http://reboot.pro/index.php?showtopic=18962&page=29#entry204...
- ravel-bar-foo 5y agoThis used to be my default, and then I used Matlab, and "-" was interpreted as subtraction.