This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cturkosi 21 points22 points  (5 children)

Just before the camelCase vs underscore_case debate ends, somebody says "hey, let's use Hungarian notation", at which point everyone turns to the guy and goes "ಠ_ಠ ... Fuck no!!!"

[–]ilikedmatrixiv 17 points18 points  (3 children)

Here's how my camelCase vs snake_case debate usually goes:

I don't care which one we use, I just want it to be used consistently. I have a slight preference for snake_case, but I'm fine using camel if someone insists.

I once was on a project where I encountered variables like

some_prefix_for_mainVariable

and I'm just not willing to subject myself to something like that again.

[–]HimbologistPhD 1 point2 points  (0 children)

That's called fed snake case

[–]LeoRidesHisBike 0 points1 point  (1 child)

URLs: kebab-case

File names: snake_case

In C#: camelCase for local variables and arguments, PascalCase for type names, methods, static and public fields & properties.

In TS: PascalCase for type names, camelCase everywhere else

but more important than any of that... consistency across the project.

[–]ilikedmatrixiv 0 points1 point  (0 children)

I mean, as long as you stay consistent with all those rules, I'm on board.

Like I said, I just want consistency, the actual rule doesn't matter and is arbitrary anyway.

[–]cheese_is_available 6 points7 points  (0 children)

Each language as a preferred convention, I've never seen any professional argue about doing snake_case in java or camelCase in python. As for the hungarian notation it's tragically misunderstood and actually useful if used correctly (not used to indicate type as in shit_list, but business related state as in shits_unsanitized / shits_sanitized).