Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
spl020408yWhere did he pick that habit up from then?
Wouldn't want to waste columns on those punched cards after all... :-) -
DotM8298yEvery time my teachers put the { under the method/function (it happens in both Java and C)... also sometimes they also put spaces inside the () but it's not evenly spaced. The other day I saw "( variable)" and I was like "why. Just why"
-
I like spaces before comment characters.
# I prefer this
#over this
<-- I prefer this -->
<--over this-->
I just find it easier to read. -
@DotM it's actually a common standard to put the curly brace under the method declaration. Just like for the class declaration.
-
DotM8298y@jirehstudios yeah but I just look at it and die a bit inside. I learned to code with the { on the same line as the method/function, maybe it's that
-
@spl0 there's always JavaScript where the standard is to keep it on the same line
-
Not a joke, but when I looked at this ( ... ) i felt fucking weird and grossed. Idk why. But it just feels weird seeing it.
-
githelp30038yMy programming teacher taught us print () instead of print() in Python. Might be personal preference but it's not PEP 8 complaint.
-
BartBB6898yI'm exactly the other way around. A curly opening brace on the same line can make me go crazy. I guess we all have different preferences. @DotM
-
zaturek1378yPlease light up my brain friends, cos I don't get it. Why one of 'em is better than the other one? I've read it a couple of times that everybody has their own opinion and thinks if somebody use the other style is defenetly a horrible person/programmer. But nobody explain it why and why does it even matter. Please help me out!
-
@zaturek it doesn't as long as you apply the same standard throughout the whole codeBase. But if you're using an uncommon standard then you will most likely be frowned upon.
-
BartBB6898yAs the person above me said, it's all about consistency. which is not always in your control.
Assume you work with others on the same project, or that you're working on someone else's code. In either case you'd have to adapt to the current style, because it is simply more readable. I mean, that's my opinion. @zaturek
Related Rants
Every time my Java instructor puts spaces inside the parentheses I die a little inside.
( ... ) instead of (...)
He's been programming since the 60s.
undefined
java
college
instructor