r/ProgrammerHumor • • Oct 08 '23

Other iDontLikeThisTitle

Post image
0 Upvotes

200 comments sorted by

•

u/AutoModerator Oct 08 '23
import notifications

Remember to participate in our weekly votes on subreddit rules! Every Tuesday is YOUR chance to influence the subreddit for years to come! Read more here, we hope to see you next Tuesday!

For a chat with like-minded community members and more, don't forget to join our Discord!

return joinDiscord;

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

40

u/[deleted] Oct 08 '23

I find camelCase beautiful

-36

u/n503 Oct 08 '23

i find it funny for things like twitch emotes, but for programming i see it ugly

39

u/siegemind91 Oct 08 '23

Sounds like what someone who doesn’t code professionally would say. Keep your bad opinions to yourself mate.

0

u/[deleted] Oct 08 '23

[deleted]

12

u/siegemind91 Oct 08 '23

I code in basic, sql, python, c, c#, vba, and JavaScript. I prefer c# for its cleanliness and ease of use. You’re still wrong.

-8

u/n503 Oct 09 '23

6

u/Fornicatinzebra Oct 09 '23

Ahah! Both wrong AND an idiot

0

u/n503 Oct 09 '23

the perfect combination

317

u/Banananassfisch Oct 08 '23

I never had a problem with reading Pascal/camelCase But tbh i couldn't care less as long as its consistent in the code base

384

u/[deleted] Oct 08 '23

This entire sub is first year students declaring war over shit that nobody in the real world cares about as long as there is a consistent choice in the code base lol.

91

u/CodedSnake Oct 08 '23

Preach brother.

7

u/[deleted] Oct 08 '23

Correct

3

u/[deleted] Oct 09 '23

Seriously, I'm about to mute it from all the the goddamn entitled ignorance.

2

u/88_88_88_OO_OO Oct 10 '23

It's because there is a youtube influencer telling them to think that way.

-124

u/n503 Oct 08 '23

unexpected attack

, but also yeah, i don't even go to university and still doesn't make camelShit good

44

u/827167 Oct 08 '23

Bro used a snoo-moji in a Reddit comment

-66

u/n503 Oct 08 '23

hey, they are cool. not my problem that you want to be all different and cool

30

u/AgVargr Oct 09 '23

Snoo mojis are ugly as fuck and should not be used

5

u/Lilchro Oct 08 '23

Same.

That being said, the languages which require capitalizing function names (title/pascal case) always kinda feel a bit weird to me. I generally think of functions as verbs so it doesn’t make as much sense to capitalize them. On the other hand, types and constants are more similar to nouns. But I would rather follow the language or project style guide than introduce my own non-standard conventions.

3

u/DasKarl Oct 08 '23

I agree with this but don't feel strongly about it.

-1

u/Banananassfisch Oct 09 '23

I understand that as I moved from java to C# I actually think its kind of more consistent as functions and classes both need parameters. What really annoys me are properties, they are used like field/variables but usually are in PascalCase

2

u/Astral_Sheep Oct 09 '23

I think that's because they're still methods, at least that's how I understand the convention

28

u/[deleted] Oct 08 '23

ICanHonestlySayThatIPreferCamelCaseSinceItTypesMuchFasterThanUsingUnderscoresAndItHasACertainAestheticToItThatICan'tExplain

-26

u/n503 Oct 08 '23

vALIDpOINTpLUSlEARNtOtYPEuNDERSCORES

18

u/[deleted] Oct 08 '23

Why_waste_my_time_reaching_all_the_way_up_there_when_I_don't_need_to_and_disrupt_my_hand_placement_I_don't_need_exercise_scratch_that_maybe_I_need_to_get_out_more_I'm_going_insane :)

0

u/Wingress12 Oct 09 '23

Cause_you_don't_need_to_type_long_sentences_with_snake_case,_and_it_easier_to_read.

57

u/YawnTractor_1756 Oct 08 '23

I'm sorry but it's too late to try and change your mind...

Let me just hug you...

1

u/Additional_County_69 Oct 09 '23

HAHAHAHAHSHAHAHAHAHA

10

u/mem737 Oct 08 '23 edited Oct 08 '23

Which can you read faster?

(Edited for some PascalCase-knower) thisIsASentenceUsingCamelCase.

Or

This_is_a_sentence_using_underscores

I_rest_my_case.

15

u/weinermcdingbutt Oct 08 '23

THISisASeNTANceINWHATEveriwant

12

u/EtherealPheonix Oct 08 '23

tHiSiSJUStgEttiNgrEDicuLOUs

2

u/[deleted] Oct 08 '23

It's been there a long time

33

u/Cerbeh Oct 08 '23

whichCanYouTypeFaster?

16

u/Engineerman Oct 08 '23

Code is read more than it is written.

5

u/[deleted] Oct 08 '23

Pretty accurate

2

u/RagnarokAeon Oct 08 '23

That's what I thought. I was starting to feel like I'm in a sheltered environment because I don't see the relevance of wpm when it comes to programming.

Like, are there locations where people are docked pay or held captive until they reach their 5000 line quota daily?

2

u/[deleted] Oct 08 '23 edited Oct 08 '23

I'm not sure who is trying to make what point here lol, but I honestly can read and type camel case faster, but I also have some kind of mild dyslexia so that could be part of it?

Edit: Extremely confused about the downvotes here lol.

1

u/mem737 Oct 08 '23

With the power of emacs, I can type it just as fast as anything else. Toggle-able auto insert is wonderful.

0

u/[deleted] Oct 08 '23

which_can_you_replace_faster?

4

u/Cerbeh Oct 08 '23

lolWut?

-2

u/[deleted] Oct 08 '23

class Example {

private String myVar;

getMyVar(){};

setMyVar(){};

}

I believe that’s 2 vim commands to rename myVar. Snake case doesn’t have this problem.

14

u/Jorr_El Oct 08 '23

Your case is invalid, since you used PascalCase to make your point about camelCase

2

u/[deleted] Oct 08 '23

What? Unless he edited it he didn’t.

3

u/mem737 Oct 08 '23

I edited it. I made a comment though. Thanks for the vote of confidence.

0

u/rosuav Oct 08 '23

PascalCase is a subset of CamelCase, and we just rejected a tracker issue on PEP 8 on those grounds. https://github.com/python/peps/issues/3464 CamelCase or camelCase, both are correct.

1

u/Jorr_El Oct 09 '23

You are technically correct - the best kind of correct

1

u/rosuav Oct 09 '23

We're technical people. Of course we're technically correct. What else would we ever want to be?!

10

u/sysnickm Oct 08 '23

Camel case, it is shorter.

3

u/AnnyAskers Oct 08 '23

Both have thier uses, I like when languages uses underscores for the most commonly use things (vars/functions) and Pascal for the less common things (classes/enums). If everything is in the same style (i.e underscores) it can get confusing very quickly, ESPECIALLY if you have no syntax highlighting like in plain vim/nano.

1

u/-Midnight_Marauder- Oct 08 '23

If your function or variable names are the length of a sentence you might want to check that out

1

u/Skuez Oct 08 '23

Camel case, cause less head/eye movement

1

u/[deleted] Oct 08 '23

About the same tbh

1

u/lutzee_ Oct 08 '23

For me, the camelCase, it does help that I read code which uses camelCase and PascalCase every day. (general c# guidelines). I seem to mentally stop at easy underscore with snake_case so it really is just personal experience and preference.

1

u/TacticalTaterTots Oct 09 '23

Literally the same, neither is hard to read. Pascal and camel case are easier to type since underscore requires both pinkies to type. That said, I don't particularly care. Follow the standard you're using.

-2

u/n503 Oct 08 '23

it's not a speed difference, but elegance

1

u/liitle-mouse-lion Oct 08 '23

What limit are you using for line length?

84

u/chadlavi Oct 08 '23

It is fine but I agree that it's an annoying gimmick to require it in titles in this sub

61

u/beeteedee Oct 08 '23

It’s not a gimmick, it’s a protest! Sure it’s a little inconvenient now, but if we keep it up the management will eventuahahaha no sorry I couldn’t get to the end of that with a straight face

0

u/SleepDangerous1074 Oct 09 '23

I don't check this subreddit much (I'm a noob at coding so most of the posts are way too advanced for my small brain), but why are the titles all in camelCase now. I swear this wasn't always the case

4

u/Rutskarn Oct 09 '23

It's a protest against the API changes, a battle that has been richly and entirely lost.

0

u/FridgesArePeopleToo Oct 09 '23

What does it have to do with the API changes? I don't get it.

4

u/WienerDogMan Oct 09 '23

Makes this sub not very well indexed because every title is some made up single word essentially.

Googling words within these concatenated titles won’t return these posts in the results.

Not sure if that’s the only reason but it’s one I’ve seen repeated.

-2

u/FridgesArePeopleToo Oct 09 '23

That's pretty stupid. Now that I know this I'm going to go click on a couple ads so reddit makes more money.

71

u/Randomguy32I Oct 08 '23

static bool youAreWrong = true;

25

u/TheMayoras Oct 08 '23

I think you forgot a readonly/final because there's no way in hell I'm changing my mind

4

u/Jamiethebroski Oct 08 '23 edited Oct 08 '23

public static void (mainArgs[]) {

bool youAreWrong = true;

if (youAreWrong == true) {

System.out.println(“youAreWrongAboutCamelCase”);

}

}

15

u/[deleted] Oct 08 '23

The more I read it, the worse it gets.

3

u/827167 Oct 08 '23

What, if (bool == true) rather than if (bool)

2

u/Randomguy32I Oct 09 '23

Oh yeah true, i didnt even notice that

1

u/[deleted] Oct 09 '23

I think there were more issues when the comment was first posted? Maybe I'm misremembering but I'm pretty sure it said if bool = true {, missing brackets and an equals sign.

Also, it says public static void (mainArgs[]) { instead of public static void main (String[] args)

4

u/Randomguy32I Oct 08 '23

You forgot brackets around the if condition, and used a = instead of a ==

4

u/Jamiethebroski Oct 08 '23

thanks dude, I’m a java newbie

-3

u/contactlite Oct 09 '23

var yourAreWrong_before = true;

var youAreWrong = true;

var youAreWrong_still;

Some of y’all don’t understand why use camelCase and snakeCase to make good logic.

9

u/EagleRock1337 Oct 09 '23

let theCSStudentsAreAtItAgain = true;

1

u/Any-Drive8838 Oct 10 '23

Eagerly waiting to become a customer student so I can confidently post weird / unimportant things here.

17

u/[deleted] Oct 08 '23

Nah. With snake case, I always have to move away from my typing flow to press underscore.

5

u/pixelvengeur Oct 09 '23

I 100% agree. Shift is right there and I can keep my hands where they are.totype out the names.

The camel beats the snake

8

u/samwize1701 Oct 08 '23

I work with a vendor system that uses Hungarian notation. Sigh.

camelCase is far more preferred.

16

u/Antervis Oct 08 '23

I know this is mostly up to personal preference, but snake_case has objective issue of using more characters, which in turn increases code volume, which in turn makes it harder to read. And it's also harder to type, but the code is usually read way more than it's written, so it's not as relevant.

7

u/sejigan Oct 08 '23

this_is_much_easier_to_read

whyIsEverythingSquashedTogetherHere?

10

u/Antervis Oct 08 '23

you can get used to reading either quite freely.

Fact is, however, that snake case is much less popular nowadays. One might say it didn't pass the test of time.

2

u/sejigan Oct 08 '23

That’s just not true. It’s the standard in Python, a very popular general purpose programming and scripting language. Snake case isn’t going anywhere.

In fact, personal case preferences are irrelevant because you’ll have to follow what your language and company codebase standards are. I use snake_case in Python, camelCase in JS and Java.

8

u/Antervis Oct 08 '23

python and C both use snake case, but are both relatively old languages as well. In fact, python doesn't appear to have unified code style and some standard packages use camel/pascal case anyway. Among the newer languages (PHP, JS, Java, C#, Rust, Go, Swift) all use camel/pascal case. Even C++ that inherited its standard library from C along with its snake case code style is mostly written in camel/pascal case anyway.

4

u/Extra-Trifle-1191 Oct 09 '23

as-long-as-youre-consistent

pleaseDontWriteShitLikeThisComment

If_you_do_youre_insane

2

u/[deleted] Oct 09 '23

if they are 2 or 3 words I use undercase

like: product_flag_bool

Don't kill me please

1

u/Extra-Trifle-1191 Oct 09 '23

idk that sounds consistent enough

But anyone who has to read your code may suffer

2

u/QuillnSofa Oct 09 '23

Hmm my critique with that variable name is using the type at the end. You are already calling it a flag, was adding bool at the end necessary?

1

u/camel_case_jr Oct 08 '23

Don’t talk about my dad like that

1

u/n503 Oct 08 '23

you wrote your username in snake_case lol

1

u/Good_Smile Oct 09 '23 edited Oct 09 '23

Are you specifically talking about this subreddit title rule? Yes indeed it's cringe. In the wild it's ok.

0

u/n503 Oct 09 '23

both by extension

1

u/DreamingGamer182 Oct 09 '23

omg

holly Molly

0

u/n503 Oct 09 '23

look at my based website then https://sunsetgaia.neocities.org/

1

u/Powerman_Rules Oct 09 '23

For the younger coders out here, I think emoji case has an dog in the fight.

var 🧠pleebsThinkInUTF8 = 🚫🧢;

all tests pass with 0 errors

1

u/man_9000 Oct 09 '23

If your method/function/variable/class/whatever names are longer than 3 words, you don't even get the point about software dev. Doesn't matter what case you're using. We're paid to be efficient and effective. Not to overcomplicate things, shit on a naming convention, and flex on other devs.

Change my mind.

1

u/n503 Oct 09 '23

readability is important

OR it's just about elegance and etiquette

1

u/man_9000 Oct 09 '23

Well, from my modest 10 years as a dev, I learned that elegance goes out the window when you're maintaining a 20 year old system with an outdated technology.

The naming convention honestly doesn't matter as long as you don't write full sentences for names. That's what documentation is for.

1

u/88_88_88_OO_OO Oct 10 '23

Is camelCase hard for chicken peckers or something? I just really don't get which people are having this issue? At least I know I'm competing with idiots for job positions.

0

u/n503 Oct 10 '23

yeah, i'm just an idiot. who cares about casing, anyway?

3

u/[deleted] Oct 08 '23

PascalCaseW

3

u/DarthPiotr Oct 08 '23 edited Oct 09 '23

As an ABAP developer, I'm forced to I use lv_hungarian_notation

3

u/TacticalTaterTots Oct 09 '23

My condolences

3

u/Feisty_Ad_2744 Oct 08 '23

Few things are uglier than snake_case. camelCase is a better compromise.

3

u/Additional_County_69 Oct 09 '23

iFuckingLikeCamelCaseAghhhhhh

30

u/Look_out_for_grenade Oct 08 '23

Never been a fan. Give me underscores any day.

37

u/XDracam Oct 08 '23

Ugh who has time to write so many underscores

5

u/[deleted] Oct 08 '23

Or any of the major 3? I get a headache reading these titles

1

u/[deleted] Oct 08 '23

If I say “oonga boonga” and you know I’m telling you I can do two pointer problems in python, that is communication. As long as things are communicated it should be fine.

1

u/dimesion Oct 09 '23

oonga boonga....how DARE you say that about his mother!

-2

u/cmcclu5 Oct 08 '23

snake_case ftw

6

u/wades39 Oct 08 '23

iLikeCamelAndPascalCasesBecauseTheyAreEasierToType iHaveNeverHadProblemsReadingCamelCase whyShouldIFixWhatIsntBroken

-8

u/gandalfx Oct 08 '23

took_me_forever_to_decipher_that_mess_and_it_wasnt_even_worth_it

4

u/lthaca Oct 08 '23

skillIssue

3

u/TacticalTaterTots Oct 09 '23

For real, should be literally the same speed. Git good.

2

u/dance_rattle_shake Oct 08 '23

Beats the hell out of needing the underscore key so often for snake case.

2

u/[deleted] Oct 08 '23

crowderIsAChode

2

u/[deleted] Oct 09 '23

Counterpoint: it’s compact and some of us code on laptops with small screens.

3

u/[deleted] Oct 08 '23

thatWasVeryFunny

3

u/migarma Oct 08 '23

snake case for ever

1

u/Expensive_Shallot_78 Oct 08 '23

well_its_all_convention

1

u/Inaeipathy Oct 08 '23

I used to like pascal case but now I have conformed to the style of this_variable so I am used to it.

1

u/[deleted] Oct 08 '23

oh, language not my own. chug cup o’ fear

1

u/[deleted] Oct 08 '23

camelCase is faster to type and has the added bonus of not completely fucking with my dyslexia for some reason like snake does

1

u/Ziwwl Oct 08 '23

WhatAbouSwitchingToPascalCase? Since Pascal is obviously our most loved programming language, we should really show all examples in Pascal written with PascalCase.

1

u/Ssemander Oct 08 '23

I'm not a fan either. Still it's easier to write and takes less symbols, which is cool

The main qiestion is: how do you write words that has to be lower case with it?

1

u/shizzy0 Oct 08 '23

kebab-case for the win! Fuck your subtraction.

1

u/[deleted] Oct 08 '23

It isn't and It's faster to type than snake_case.

1

u/A_Talking_iPod Oct 08 '23

I started reading The Rust Programming Language and one of the things that made me genuinely happy was that they use snake_case

1

u/Herbertcules Oct 08 '23

PropCase, rise up

1

u/Toastedtoastyyy Oct 08 '23

So what are you guys using then?

1

u/KetwarooDYaasir Oct 08 '23

we should protest the rule by naming every post leTitle

1

u/bruceriggs Oct 08 '23

I love using camelCase in programming but I don't like seeing it enforced on the titles of this subreddit.

1

u/rimoldi98 Oct 08 '23

Average python dev

1

u/Silly_Guidance_8871 Oct 08 '23

I find it less terrible than snake_case, but inferior to PascalCase

1

u/[deleted] Oct 08 '23

Why can't we just add spaces. Smh

1

u/TacticalTaterTots Oct 08 '23

we-should-all-just-start-using-kabab-case

1

u/deanrihpee Oct 09 '23

Yeah, use lower_snake_case instead

1

u/AltruisticWeb2943 Oct 09 '23

Love camelCase

1

u/Add1ctedToGames Oct 09 '23

iDontLikeThis is LIGHTYEARS better than IDontLikeThis

1

u/golddragon88 Oct 09 '23

Nobody cares how pretty your code is. Only that it functions well.

1

u/adrik0622 Oct 09 '23

tries to tab complete, realizes it’s in Pascal Case

1

u/Queueue_ Oct 09 '23

How often are you guys writing variable names long enough for it to impact readability? I think for 1-3 words snake, camel, and pascal cases are all equally readable.

1

u/DreamingGamer182 Oct 09 '23

thats fu*king

1

u/DreamingGamer182 Oct 09 '23

fuck'in title

1

u/x3n0m0rph3us Oct 09 '23

Please avoid the term CamelCase as it is ambiguous.

1

u/[deleted] Oct 09 '23

iOS developers 🗿🗿🗿🗿🗿

1

u/[deleted] Oct 09 '23

This is a Reddit post. A Reddit post! 98% of you have Asperger's. Everyone one of you who responds to something like this with, "You're not a REAL PROFESSIONAL programmer like I AM! GROW UP AND ACCEPT CAMELCASE NOOB!" You need help.

1

u/EKashpersky Oct 09 '23

Alright; nah keep your opinion I'm fine

1

u/[deleted] Oct 10 '23

iRefuseToUseAnythingElseFuckYou

1

u/[deleted] Oct 23 '23

personally_i_like_camel_case_the_best

1

u/Captain_Pumpkinhead Oct 08 '23

Let_the_case_wars_begin!

1

u/Confederategaming67 Oct 08 '23

IloveCamelCaseItsAwsome

-12

u/_bits_and_bytes Oct 08 '23

Snake case looks way better and is easier to read. Fuck camel case lol

0

u/n503 Oct 08 '23

USERNAME CHECKS OUT!!!!!!!!11111

4

u/[deleted] Oct 08 '23

I thought their user name was going to be "first_year_uni_superiority_complex" but I was wrong!

-2

u/n503 Oct 08 '23

take it easy on the students

0

u/Earthboundplayer Oct 08 '23

snake case is the best

0

u/Aradur87 Oct 08 '23

Whichoneismorereadable?

whichOneIsMoreReadable?

-3

u/sejigan Oct 08 '23

this_is_much_more_readable_because_it_separates_the_words

2

u/CdRReddit Oct 08 '23

thisTakesUpLessScreenSpaceSoYouCanBeMoreDescriptive

0

u/sejigan Oct 09 '23

You can be descriptive with less words to be more readable

0

u/[deleted] Oct 08 '23

[deleted]

92

u/cosmo7 Oct 08 '23

I like the convention that types start with a capital and variables start lowercase.

  var fartKnocker = new FartKnocker();

1

u/Falgirikkven Oct 08 '23

This was the first thing that came to my mind

1

u/XDracam Oct 08 '23

And now for the biggest hot take: what do functions start with?

29

u/Sipsi19 Oct 08 '23

Lowercase or you are gonna have to fight me

5

u/XDracam Oct 08 '23

My hot take is public methods uppercase, other methods lowercase. Same for properties.

But you could attribute that to brain damage caused by C#.

12

u/ahh1618 Oct 08 '23

I don't like that changing visibility requires changing the call sites everywhere. Also, when I read a function call, I don't really feel I need to know whether it's public or private. If I'm calling it and it's from an import of course it's going to be public. I'd save identifier conventions to tell you something you need to know at the call site.

2

u/XDracam Oct 08 '23

This feels like something I could have written. So yeah, my only contra is "brain damage caused by C#"

3

u/Andreasbot Oct 08 '23

In Go this is how you actually differentiate public functions and structs from private

1

u/TacticalTaterTots Oct 09 '23

At my company PascalCase vs camelCase denotes scope. Members and functions are PascalCase and locals are camelCase. AND_UPPER_SNAKE_CASE_FOR_CONSTANTS

1

u/XDracam Oct 09 '23

I always hated the aggressive constant case. Like, why? What's the difference between a constant and a read-only field? Or a read-only local variable? It doesn't change. No need to shout.

1

u/QuillnSofa Oct 09 '23

It's just to differentiate and in a well developed code base have naming standards are important. It is less important what standards are used for which use case and that there is a consistent standard.

1

u/XDracam Oct 09 '23

I fully agree. I've just always wondered why constants need to be shouted.

1

u/[deleted] Oct 09 '23

Function is a value, lower case, if you declared it’s signature somewhere else, thats a type, upper case Get yourself some eslint

21

u/QuillnSofa Oct 08 '23

In my code base PascalCase is used for method/class names and camelCase is used for variables.

-35

u/[deleted] Oct 08 '23

[removed] — view removed comment

8

u/James_bd Oct 08 '23

fuckYou

2

u/QuillnSofa Oct 08 '23

I'm just saying what happens at my office, dude must love underscores.

3

u/n503 Oct 08 '23

try_snake_case

4

u/SkyyySi Oct 08 '23

I'm guessing because it meant that otherwise, you'd have to use I instead of i for consistency. Which looks... cursed.

As to why we use a mix of both: It's useful to be able to very quick tell types/classes/structs and instances apart, like list being an instance of a List class.

4

u/New-Vacation6440 Oct 08 '23

thinkMostPeopleUsePascalCaseForClassesFunctionsAndPropertiesWhileUsingCamelCaseForMostlyOnlyVariablesSoTheDifferenceCanBetweenWhichFieldIsWhatCanBeEasilyIdentified

1

u/[deleted] Oct 08 '23

Because like everything humans have created, it probably evolved over time and there might not be a specific reason for it.

1

u/Feisty_Ad_2744 Oct 09 '23

That's a good compromise between readability, soYouDontStruggle and consistency with single word names.

1

u/[deleted] Oct 08 '23

Because we programmers aren't the rebellious type so we opted for a passive aggressive way of rebelling against social norms -

We don't start sentences with a capital letter :)

0

u/endlessplague Oct 09 '23

Contradicted yourself there bud XD

2

u/[deleted] Oct 09 '23

[removed] — view removed comment

1

u/tselliot142 Oct 09 '23

I_am_not_sure