There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Whats your go-to naming conventions?

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?

GustavoM ,
@GustavoM@lemmy.world avatar

I go with the “quotation case”, “Cool file name”.

Monstera ,

Kebab for most things, camel for source code

unknowing8343 ,

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.

Sunny OP ,

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.

31337 ,

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.

quantenzitrone ,
@quantenzitrone@lemmings.world avatar

How about “cool file name”?

All my systems use modern file systems that are case sensitive and can contain any character except / and `

boredsquirrel ,
@boredsquirrel@slrpnk.net avatar

True. Linux, Android, Windows all have no problems

Using dots in a file though…

Monstera ,

Using commands on that is still more annoying, so no way

quantenzitrone ,
@quantenzitrone@lemmings.world avatar

not really

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.

Hupf ,
@Hupf@feddit.org avatar

COOLFI~1.AME

TimeSquirrel ,
@TimeSquirrel@kbin.melroy.org avatar

10 PRINT "FARTS"
20 GOTO 10

harsh3466 ,

Man I miss basic.

TimeSquirrel ,
@TimeSquirrel@kbin.melroy.org avatar

https://www.freebasic.net/

It's more like QBasic dialect, but it's still actively maintained. It can generate binaries and everything for modern machines.

otp ,

Camel case, but with a twist – if the next word is about to start after a capital letter, I’ll have it lower case.

topSecretFBIfile.txt for example

CodexArcanum ,

Interesting, I’d tend to demote the initialism, ie topSecretFbiFiles.tar.gz

Uncle_Abbie ,
@Uncle_Abbie@lemmy.today avatar

For files, date+Snake: 20240831Letter_to_Rodney.odt For variables, Screaming

ricdeh ,
@ricdeh@lemmy.world avatar

Snake case for all kinds of file names and camel case for programming

ZombiFrancis ,

Pascal_Snek_Case

thingsiplay ,

I don’t have a consistent style for everything and it depends on the circumstances. snake_case is often used, especially to avoid spaces. Sometimes I just do flatcase instead, and in rare cases also kebab-case or combined_snake-and-kebab-case. The combined_case is often useful to group parts of the name, like a dates and version numbers together and to indicate what part is constant; example-name_2024-08. Sometimes I also do the “Title Case”, which is basically PascalCase, but with spaces. Or even even more weird, “Python_Case”, which is PascalCase, but with snake_case, when I want to avoid spaces.

I often avoid dots in regular filenames, unless they indicate a file extension or format, such as “.svg” and “.inkscape.svg” to indicate its a specific version of the SVG format. Or “.xiso.iso”, as a specific compressed version of the regular ISO file (for use with Xemu emulator). Basically the same logic and tradition as “.tar.gz” (but in reverse order).

Rhaedas ,

I don't like extra dots simply because pattern matching might get weird down the road. Keep dots for extension type and use Pascal to make it easier to read multiple words. Flatcase only if it's short or I'm lazy for a temp file.

nyan ,

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).

BCsven ,

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.

don ,

WIAT, Y R U CALLIN IT SCREAMING CASE THAT SOUNDS FKN DUM TBH

L8R DOODZ

-SP4SEM4N B1FF

Sunny OP ,

ive seen it be called both screaming and train case, not sure what the most used term is though.

don ,

It’s a reference to Tha Grate Biffinski:

en.m.wikipedia.org/wiki/BIFF_(Usenet)#

saigot ,

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

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • lifeLocal
  • random
  • goranko
  • All magazines