this post was submitted on 01 Mar 2024
149 points (87.4% liked)

Programmer Humor

19572 readers
2032 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
all 11 comments
sorted by: hot top controversial new old
[–] mox@lemmy.sdf.org 33 points 8 months ago* (last edited 8 months ago) (2 children)

One advantage of snake case is never having to remember which letters of every acronym or compound word each author decided to capitalize.

[–] xigoi@lemmy.sdf.org 20 points 8 months ago (1 children)

I just like to treat acronyms/initialisms as normal words. sendHttpRequest, etc.

[–] Mesa@programming.dev 3 points 8 months ago

This is the way.

[–] Ghoelian@lemmy.dbzer0.com 3 points 8 months ago (1 children)

You already don't have to do that. That's what IDE's have autocomplete for.

[–] mox@lemmy.sdf.org 8 points 8 months ago

That viewpoint makes bold assumptions about language, toolset, and preference.

It also suggests sweeping the dirt under the rug instead of not having it on the floor in the first place.

[–] CCF_100@sh.itjust.works 6 points 8 months ago

publ;c class customer_data {

[–] YIj54yALOJxEsY20eU@lemm.ee 5 points 8 months ago* (last edited 8 months ago)

I hate that the convention for naming React.useState variables is [color, setColor], rather than [color, colorSet]. After I declare 'color', I want to copy/paste that variable and append 'Set', rather than copy the variable then writing 'set' then pasting then navigating to the 4th character then flipping the case.

Granted there could be some ambiguity if there was a variable containing a unique collection (aka set) but that is far less common than declaring a useState variable. I'd even settle for appending 'SET' to quell the confusion.

[–] force@lemmy.world 4 points 8 months ago* (last edited 8 months ago) (3 children)

snake case for everything, pascal case for struct/enum/class/trait names, and screaming snake case for constexpr identifiers is the superior method of naming. FUCK camel case, java/c# naming conventions are dumb and stupid and cringe, rust did it right

i'm in pain every time i use scala/f# or something and i have to actually interact with those HEATHEN java/c#-conformist identifiers

[–] mox@lemmy.sdf.org 18 points 8 months ago

screaming snake case

What a great name for that style. Thank you.

[–] GeniusIsme@lemmy.world 3 points 8 months ago

Apart from screaming case, which is for textual macros, i approve.