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?

eruchitanda ,
@eruchitanda@lemmy.world avatar

Unless I can’t, Kebab.

No need to hold Shift.

data1701d ,
@data1701d@startrek.website avatar

I do kebab with underscores.

MutilationWave ,

Wouldn’t that be snake?

whoisearth ,
@whoisearth@lemmy.ca avatar

Snake if writing in python

Camel if writing in PowerShell

I tend to stick with what the language wants me to use.

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.

that_leaflet ,
@that_leaflet@lemmy.world avatar

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
cygnus ,
@cygnus@lemmy.ca avatar

Counterpoint: you have to use Shift a lot

corsicanguppy ,

He probably uses vi. A few hundred more shift-key presses won’t stand out.

k4j8 ,

For this reason, I use kebab case for directories. But because I agree underscores show spaces better, I use snake case for files.

captain_aggravated ,
@captain_aggravated@sh.itjust.works avatar

I’ve got a personal convention that file names get snake case, directory names get Pascal case.

harsh3466 ,

Depending on the file it’s either dot notation or flat case.

No1 ,
@No1@aussie.zone avatar

IT’S

COOLFILE.NAM

THERE IS ONLY 8.3 AND THERE IS ONLY UPPERCASE

Charadon ,
@Charadon@lemmy.sdf.org avatar

PascalCaseForTheWin

wildbus8979 ,

CaN’t BeLiVe No OnE eLsE uSeS mOrOn ScRiPt FoR eVeRyThInG!

prex ,

I ScRoLlEd ThIs FaR fOr SpOnGeBoB cAsE

Professorozone ,

Snake case, but I’m the World’s second worst programmer and just name files like this because I was alive when spaces were not allowed.

gerdesj ,

I like to use my enterprise number and a UUID (all in lower case, for legibility). Here’s an example:


<span style="color:#323232;">.1.3.6.1.4.1.33230.0d456e46-67e6-11ef-9c92-7b175b3ab1f1
</span><span style="color:#323232;">
</span>

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!

BrianTheeBiscuiteer ,

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

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

jollyroberts ,

Snake Case and Pascal Case is what I tend to default to

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