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 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
I put newlines in my filenames to break both CLI tools and Windows filesystems
Using Windows is a true flex on Lemmy
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
1337 case = k3wlf1l3n4m3
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
2024-08-30_author_document-name_other-important-info.ext
This is exactly what I do. It lends itself to something like ‘prefix_specific-info_version’ which is both sortable and easy to read.
depends on the color of my mood ring
Random mix and match. I’m all for diversity!
COOLFI~1.AME
10 PRINT “FARTS” 20 GOTO 10
Man I miss basic.
Im dead! MS-DOS vibes
Pascal or camel case for code, snake case for files and screaming snake case for globals
SCREAMING_SNAKE_CASE just has the best name
YES, I USE THIS TOO TO STAY CONSISTENT WITH SQL QUERIES
2024-09-02_something-important_something-less-important
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.
Pascal or Camel are best cases
This question just shows how messed up, and broken much of IT is.
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
Snake case.
- Starts with a lowercase, good for shell autocompletion
- No spaces, so no worrying about spaces in shell commands
- ‘_’ is better than ‘-’ because it shows the spaces between words more clearly
Counterpoint: you have to use Shift a lot
For this reason, I use kebab case for directories. But because I agree underscores show spaces better, I use snake case for files.
I like Camel Case for code, but mostly because it’s ingrained in my brain, coming from Java as my first language.
For folders and files, I like Kebab Case.
Luckily, I was not ingrained by my first programming language like that, or my coworkers would strangle me.
I started with BASIC, which allowed only two letters for variable names…