As far as I know there are these;
- Camel case = coolFileName
- Snake case = cool_file_name
- Kebab case = cool-file-name
- Pascal case = CoolFileName
- Dot notation = cool.file.name
- Flat case = coolfilename
- Screaming case = COOLFILENAME
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?
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.
camel for java. flat for c
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.
Isnt CAPSLOCK case for screaming? 😁
YEAH CRUISE CONTROL BABY
Camel case for short names snake case if it starts getting hard to read
Since Linux is caps sensitive, at least I always use lowercase.
I guess I use kebab case for any file used for IT projects
Pascal or Camel are best cases
Unless I can’t, Kebab.
No need to hold Shift.
I’ve got one more to add to your list, and I hate it, but it’s worth mentioning: https://en.m.wikipedia.org/wiki/Hungarian_notation
It’s when the data type is in the name of the variable.
It heavily depends on the context: Filenames? Variables? Functions? Interfaces/Classes? Java? C? Shell?
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.
Me, a sick fuck, who likes a quick fuck:
/etc/moron-syntax/I\ write\ like\ a\ gay\ fish\ \(\Kanye\)\
Gotta live the Ocaml_case
I put an unnecessary amount of spaces in all my file names to break anyone who wants to use CLI tools on them
i use windows btw
touch "\" \""
What does this do?
Make a file named just a bunch of spaces with double quotes around them. It’s made confusing because of the 4 double quotes, two are escaped by the backslashes immediately before them.
Mental damage
I put newlines in my filenames to break both CLI tools and Windows filesystems
Using Windows is a true flex on Lemmy
code: camel or snake, depending on language
files/dirs: snake + kebab + dot mixture (trying to avoid caps and special chars here)
I generally end up using snake case.