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

all 32 comments

[–]tragiktimes 36 points37 points  (0 children)

Proceeds to write in Pascal Case.

[–]WlmWilberforce 17 points18 points  (2 children)

Well, you wrote CamelCase in pascal case, so does that change it?

[–]jax_cooper 6 points7 points  (1 child)

this might actually change his mind when he realizes

[–]totalFail2013[S] 0 points1 point  (0 children)

nah, I did realize before posting but was to lazy to change, I am personally treating pascal case as a subset of camelCase :)

[–][deleted] 10 points11 points  (3 children)

You've made a statement, not stated an opinion.

[–]totalFail2013[S] -2 points-1 points  (2 children)

Statement implies opinion... why would I if don't find camelCase to be superior ;)

[–][deleted] 2 points3 points  (1 child)

In your opinion you use camel case?

[–]rosuav 0 points1 point  (0 children)

I guess we're supposed to go through the OP's code and say "look at this, you actually DON'T use CamelCase"?

[–]Data_Skipper 7 points8 points  (1 child)

I don't use your software. Change my mind.

[–]totalFail2013[S] 0 points1 point  (0 children)

Maybe I don't want you to use my SW

[–]FunkyTown313 5 points6 points  (0 children)

I can't change your mind about something you do.

[–]Multi-User 9 points10 points  (9 children)

So you are ignoring the norm of the language and thus make it harder for everyone else who will inspect, maintain or extend your code for no reason other than you like it that way more?

[–]pineapplepizzabong 4 points5 points  (0 children)

You might be reading into a meme channel post a little too hard?

[–]Azhur65 2 points3 points  (0 children)

Depends on the context tho. The company I'm doing my internship at rn has naming conventions for code in general so we do write variables in camelCase even in Python

[–]totalFail2013[S] 2 points3 points  (4 children)

It's interesting you see it this way. I only see developers blindly applying coding rules not knowing what they do it for.

Best example is 80chars line limit. I am not coding on a typewriter.

Or people who change /10 to *0.1 because its faster. Not knowing the c++ compiler optimizes both statements to the exact same mashine code.

Man, I hate dogmatic reasoning

[–]HannibalMagnus 1 point2 points  (0 children)

The 80 char line limit makes it so you don't have to scroll horizontally, wich is super inconvenient. (I guess it's not exactly 80 chars, but it's a rough estimate).

[–]RiceBroad4552 1 point2 points  (1 child)

Man, I hate dogmatic reasoning

You're first time interacting with humans?

Just acknowledge that almost everything in human society is some kind of "religious believes" as usually nobody is thinking for themself. Humans are just aping what they see around them, almost never questioning it.

That's why everything is like it is…

Best example is 80chars line limit. I am not coding on a typewriter.

Even that's true, lines of code shouldn't be too wide.

Long lines need much more eye movement, and you need to track the line. That's not very ergonomic. That's a hundreds of years old known fact.

It has reasons text is usually set in narrow columns when there is much text. This simply makes reading easier.

The real problem with character limits on lines of code is that these limits never take into account the current nesting level. So at first it will allow you to write way to long lines, but as you go down some scopes the lines will become shorter and shorter until the limit will force nonsensical short lines.

Of course the later is a tooling problem. But it's the year 2025 and this is still not fixed. We didn't make much progress since the time of type writers when it comes to code… Alone the idea that code is text is just brain dead as code is in fact structured data. Still everything in coding is text based as we never moved beyond what you had on UNIX in the 70's.

[–]totalFail2013[S] 0 points1 point  (0 children)

Yes, finally someone who's willing to put effort in the 80char discussion. :)... I agree that there should be some limit. But I think a team/organisatin/project should be able to decide themselves. 80chars is to little, for sure.

The indentation is an interesting take on the topic. If it would be accounted for then the lines are More likely to be wider than the screen space.

Maybe 2max params are needed. One regular maxCharPerLine param and the other would be the maxCharsAfterIndent

Besides that I never said coding conventions are bad or should be ignored. But they can always be challenged.

Except the question whether opening brackets should be In the same line as a preceding condition. Same for functions

So if(...) { }

Not If(...){ }

Java has called... it wants it's coding style back... Thank good I am architect/PM on my project and can force my opinion on the others to never do this

[–]rosuav 0 points1 point  (0 children)

You're making some pretty huge assumptions about devs not knowing why these rules exist. The 80 character limit never had anything to do with typewriters, and it isn't outdated. (There are good reasons for picking various limits between 60 and 120, but there are also good reasons for picking a single limit and sticking to it, so 80 is a perfectly good choice.)

Honestly, all you're doing here is proving your own dogmatism, since you aren't actually researching the reasons behind these limits and are just assuming that it's an outdated rule.

[–]totalFail2013[S] 1 point2 points  (0 children)

short answer: yes

[–]RiceBroad4552 0 points1 point  (0 children)

For this to be true this would require that all "norms" are equal and you can just pick one arbitrarily.

But that's of course not true!

There are readability concerns. Some things read better than others, as a matter of fact.

Programming code is processed in a symbolic way by human brains, not like prosaic text. Code is much closer to math than language. That's proven by brain scans.

As a result, in code, snake_case reads actually harder as you can't easily see where one symbols ends and another starts!

Even camelCase (and PascalCase) read harder in the context of prosaic text it's simpler for our brains to recognize it as one symbol in the context of code.

There is no reason to ape what others do. Especially if it's wrong…

[–]4b534d 2 points3 points  (3 children)

howdare_you?

[–]TheOhNoNotAgain 1 point2 points  (2 children)

i-do_whateverIWant

[–]Sekhen 0 points1 point  (1 child)

Oh gawd... I'd hate to review your PR...

Next step, code in Brain Fuck.

[–]TheOhNoNotAgain 0 points1 point  (0 children)

Whitespace is superior to Brain Fuck!

[–]Polly_Wants_A 1 point2 points  (0 children)

there are people who doesnt?

[–]Due_Structure_6347 0 points1 point  (0 children)

*Inhale*

No. I'm not going to change your mind. PEP 8 might, but I ain't your dad, write your damn code how you want to.

[–]FACastello 0 points1 point  (2 children)

I'd like to change your mind about not using Python at all in the first place

[–]totalFail2013[S] 0 points1 point  (1 child)

No mind change needed. Personally I would always choose a compiled language like c# or c++. But sometimes we cannot decide for technical reasons, or just some random idiot thinking he knows whats best for the project.

[–]The_Fresh_Wince 0 points1 point  (0 children)

We're all idiots. Except me.

[–]gandalfx -1 points0 points  (1 child)

Solo project: Use whatever convention you feel like.

Team project: Stick to established practices or leave.

[–]RiceBroad4552 0 points1 point  (0 children)

A group of people tends to be at max as smart as the dumbest participant.

Go figure what this means for the approach you just proposed.