Personally I prefer the kebab/dot conventions simply because they allow for easy "navigation" with (ctrl+arrow keys) between each part. What are your preferences when it comes to this? Did I miss any schemes?
It depends a bit on the use case. I try to follow naming conventions within specific environments like Python. When just sorting some documents together, I usually do a mix of Kebab and snake case, where I split semantic parts with underscores and connect words with dashes like
Underscore to delineate different parts, hypen to delineate words.
Like:
my-resume_draft.pdf
And to make it consistent and easier to reuse parts for project names and such, I have a command line utility written for it. It caches the parts and uses a template system (support for generating current datetime in parts)
I am a fan of Python's or Rust's official conventions.
For package names, tho, I don't get why this-is-used over this_clearly_better_system, as I would expect a double click to select_the_whole_thing, whereas it does-not-happen-here.
While i do agree, snake looks a lot better too. I just wish it was possible to navigate through each parts of the word more easily with ctrl+arrow. That would make it the superiour choice imo.
That's probably more commonly accepted. I defer to whatever my team is doing, but for my own files, I wouldn't want things like UsStudentList or USStudentList which both look wrong to me.
USstudentList looks right to me, and if that's wrong, I'm okay with being wrong! Haha
Now you might say that the UUID is already globally unique or at least pretty unlikely to turn up anywhere else, so why bother prefixing it with more stuff? To that I say: "I need to be absolutely or at least reasonably sure ... OK nearly sure".
Anyway, you maintain a database of these things and then attach documentation and meaning to them. An editor could abstract and hide that away.
I started this post as a joke. Not sure anymore. Why get your knickers in a twist with naming conventions for variables and constants. Programming is already a whopping layer of abstraction from what the logic gates are up to, another one wont hurt!
You can easily escape spaces with \ and my modern shell (fish) suggests and completes filenames for me anyway, so i don't have to type more than the first word in more than 90% of cases.
25% Camel case, 25% Pascal and 50% of the time flatcase. It drives me insane when I try and autocomplete a folder only to realise it was Downloads instead of downloads. I keep telling myself i will go through and make it all flatcase but I put it off because i tell myself i will rebuild my computer next week every week.
Never thought about making the home folders flatcase, thanks, takes all of 2 minutes btw.
If anybody else wants to do it, remember to edit ~/.config/user-dirs.dirs with your new flatcase folders.
The only correct answer is to be consistent with the code base you're working in or the language's conventions. If neither of these conventions exist, then someone has already failed you.
For files? An unholy amalgam of snake, kebab and dot, depending on what exactly I'm trying to convey. (I still have much-ported files around with DOS 8.3 filenames, so they're truncated scream case (SCREAMIN.NAM), but I don't actively name files like that anymore.) The important thing is to separate the words/sections while using characters that are valid without escapes in both ext4 and vfat if at all possible.
For variable names, camel or Pascal case (depending on language convention) if I think anyone else is going to read it. Flat case for code I don't think anyone else is ever going to see (don't do this—it has left teethmarks in my ass from time to time and will do the same to you).
Kebab. Not my favorite visually speaking but I had RSI issues for a while and I'm still very focused on limiting keystrokes (no shift key needed with kebab).
I like snake, but in some interfaces the underscores blend into the text line or are not rendered properly, so it becomes eaaier to discern if the filename has spaces or separators by using kebab.
I usually like to call my functions cool-Filename and my variables moronic_typeClass. Shell executable aliases look like 'if\ then\ else' and C constants are 'IFTHANELSE'
Snake case, usually. Some perhaps unfounded fear that something will blow up on a dash in a file name kicking around. Or I'll do a weird typo/premature enter and part of the file name will be treated like a -flag of some sort.
The guy on shift before you got the Case of the Missing Variable. What will you get when your finger reaches that shift? Who knows... It will remain... A_Mystery!
Oh, that was always the standard for Game Maker to differentiate between sprites and objects, which typically had similar names. It's a difficult thing to unlearn!
But really, follow the conventions of what you're working on. For example, I'd use pascal case when working on a Java/Kotlin project, and snake case when working on a Python project.
It's mostly because I don't have to use a modifier key and it's doesn't need url encoding and all in the same lowercase. Dot notation looks nice but I feel like dots are for extensions only. Flat case is horrible to read, screaming case even worse, camel/pascal case to many times ends up as coolFileNAme on first time typing.
I've done a couple of different styles because of programming in different languages but now if I have to do anything that's not kebab case I make a small frown.
I use flat case most of the time, but I also try to stick to single word files so there is no case to get in the way.
I think for documents I might share like a PDF I'd use Pascal case.
In a classroom or teaching setting I will sometimes use Kebab case as I find it is the least confusing and makes it extra clear where the word division is. Similarly I avoid Dot notation since it's confusing for folks coming from a Windows world.
And I would avoid Screaming because that's just too loud anywhere.
For files? I like title case (like in article headlines). For example, I have a "Shell Tricks.txt". I'm not really consistent though, sometimes it's all lowercase or whatever really.
Huh thanks,, I guess it's based on a misunderstanding of the word kebab then. Correctly it would have to be called şiş/shish case then, but that certainly has less of a ring to it.
I use PascalCase for classes, camelCase for functions and variables, SCREAMINGCASE combined with snake_case for constants and for filenames/folders mostly snake_case with kebab-case if date or timestamp is involved.
camelCase for non-source-code files. I find camelCase faster to "parse" for some reason (probably just because I've spent thousands of hours reading and writing camelCase code). For programming, I usually just use whatever each language's standard library uses, for consistency. I prefer camelCase though.
I use camel case for methods and functions and snake case for variables. And pascal case for constants. Why? I don’t really know, it makes for a nice distinction I guess.
generally i still to camelcase if i have no separators, if i do have separators i stick to - now. _ sucks. I use . notation when dealing with copies of files.bak or something like that.
If i feel really special i throw a space in the name just because