Whatever case I get when my finger reaches the shift key.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Pascal_Snek_Case
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.
Both snake and camel case. Sometimes I mix it in the same project and I hate myself for it
I kebab case mine for personal files.
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.
My file
General purpose: Kebab case
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.
I generally end up using snake case.
Camel case for short names snake case if it starts getting hard to read
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.
code: camel or snake, depending on language
files/dirs: snake + kebab + dot mixture (trying to avoid caps and special chars here)
For files, date+Snake: 20240831Letter_to_Rodney.odt For variables, Screaming
I don't like it but I am used to reading old C codebase (windows: https://learn.microsoft.com/en-us/windows/win32/stg/coding-style-conventions) with Hungarian notation.
pszMyString 😥
Snake if writing in python
Camel if writing in PowerShell
I tend to stick with what the language wants me to use.
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.
I try to make everything Pascal case. It's easy to read in a terminal and pretty easy to type.
FileName_IMPORTANTCATEGORIZATION.yyyy.ext
With all bits being optional (not every file needs the date it refers to)
So eg (slight modifications for anonymity):
SunLifeInsureance_SIGNED.2024.Q1.pdf
SpotDoesTrickAndFalls_ORIG.mp4
JSmithPassport_CANADA.2015_2025.pdf (I am a dual citizen)
JSmithCOVIDPass_DOSE1.2021.pdf
Snake case for all kinds of file names and camel case for programming
I go with the "quotation case", "Cool file name".
PascalCaseForTheWin
Depending on the file it’s either dot notation or flat case.
Snake case or kebab case I guess. But why is it called kebab case?
Because it looks like the words are on a rod, like kebab meat
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.
Snake case and kebab case mixed arbitrarily.
Have been defaulting to kebab case for variable and function names in all languages recently because of cargo yelling at me
Pascal case for class names cause c#, snake case for python files because it doesn't like kebab
Screaming case for env files because that's what everybody else does
1337 case = k3wlf1l3n4m3