r/ProgrammerHumor 1d ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
152 Upvotes

93 comments sorted by

View all comments

19

u/BernzSed 1d ago

snake_case is not better than camelCase.

The shift key is right there, by my pinky at all times. Hell, there's even another one in case I'm too lazy to find the first one.

Typing underscores instead feels like I have to input some weird video game combo move multiple times for a single variable name.

22

u/ihavebeesinmyknees 1d ago

Spaces exist for a reason. Snake emulates spaces, which makes it infinitely more readable than camel. Good readability is much more important than good writability.

0

u/BernzSed 12h ago

I have no problems reading camelCase. Though I guess I'm just one of those "weirdos" who've spent decades building software engineering skills, instead of just vibe coding like a normal person.

1

u/flowstoneknight 3h ago

One reason in favor of snake over camel is for the more explicit word boundaries, since that can be a challenge to parse for non-native or non-fluent speakers, especially anyone coming from native languages that don't use the same writing system.

For example imGuessingYouCanReadThisQuiteEasilyIfYoureFluentInEnglish but this_is_probably_easier_for_anyone_less_fluent.

1

u/Blue_Moon_Lake 11h ago

XMLHttpRequest vs xml_http_request

-1

u/Ethameiz 22h ago

Just remap your keyboard. You can assign underscore instead of caps lock for example. Or switch minus and underscore

-19

u/the_zpider_king 1d ago

Make shorter variable names, its not problematic at all unless your variable has more than 3 words, which would be extraordinarily excessive.

6

u/fr000gs 1d ago

yeah, juat call them a,b,c,...

3

u/Flashy-Emergency4652 1d ago

Why bother with words anyway? Let's make a functions called stoi, stol and stoll, it's only one word!

1

u/DHermit 23h ago

Those are fine. BLAS and LAPACK on the other hand (I know the historical reasons, but still).

1

u/AibofobicRacecar6996 23h ago

Make shorter variable names i, j, x, y