Jun 14, 2017 3:35 PM
shadowze
100393
1569
43
TheCactusPie
Whichever side you are on, just be consistent with the rest of your team.
dnbro
I just push auto format every now and then. Kinda prefer inline opening though. I don't need an entire extra line of screen space for that.
PlatonicOrgy
Where does everyone stand on Tabs v. Spaces? Do you sue tabs or are you wrong?
1bertorc
Good, now make it with a third guy (a python one)
nothingBetterToDoMightAsWell
there are 10 types, those who understand binary and those who dont
Toomuchinternet33
My friend doesn't get it.
IsDisassembled
Put the opening brace on the next line you heathen. Fuck purple guy.
PGMacDesign
Blasphemy! En Garde!
BoozeHound001
when programming you can have your brackets either way but people will fight over what way is better
ALittleScottishPenguinWithAGun
Yellow shirt guy is right. Fuck purple guy.
ImFrank
LightStriker
Line up your freaking brackets god dangmit.
0xFADE
Egyptian casing is the best casing.
draklerahl
but never
ToxicPineapple
I think I just puked a little in my mouth.
kgirl2601
Wow, 6 months of code cademy and I feel lucky to understand this joke. I lol'd. Learning to code is hard.
dreikommavierzehn
it's just nitpicking
(albeit serious enough that IDEs offer automatic code reformatting so you can code in your style and it reverts to the other upon enter)
0x1CEB00DA
if you use int main()\n{\n} we will burn you on a pyre ... or the VCS will reformat you code correctly on checkin ... whatever comes first
SojournCartographer
Symmetry REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
LubeMe
Their BOTH STANDARD T_T
utdrmac
They're*
DamianBear
I prefer to code in a single line
ghosthendrikson
Savage
Stumpyz
I had to switch from int main()\n{\n} to int main() {\n}. I hate it. I still fall into old habits constantly.
dgg7
why did you have to switch? company standard?
Change of coding discipline, actually. Went from game dev (C++) to teaching Android dev (Java, mainly). Java devs love the inline bracket.
Is this realy a thing? Started with Java, than Python and Scala (what a mess) and now C# but everwhere i but the { right after the )
Except for Python for obvious reasons
When I was learning game dev, we were always, ALWAYS taught /n { /n, and it actually threw students off when I did it in Android dev. (1/?)
Yes it is, some IDEs also help to automatically reformat your code for reasons that can be seen in this discussion thread.
(am c++ coder and use )/n{ notation)
coolguy4206969
"Fuck that guy" guy is wrong. They have to line up.
APackOfExcitedGingers
They don't have to line up, but it is more aesthetically pleasing. I do agree with you though, overall
JonWallace1985
Am I the only one here that declares main correctly? int main(int, char**){}
alxv
Or int main(void) { }
BlastFX
1. Not correct. Second argument is and array of pointers, not a pointer to a pointer (i.e. “char *argv[]” not “char **argv”).
2. Unless you're actually using those arguments, they are unused variables (which is naughty) and you should use int main (void) {} instead.
2b. And yes you should use int main (void){}, not int main () {} as the latter means that main takes unspecified number of parameters.
I concur but iirc WinAPI prefers the non-void version with a subsequent funtion call to the API to mark the variables as unused.
EyesLikeTheSky
First three digits of Pi in german?
ArtOzz
The guy in purple is wrong.
mikeatike
Yeah there needs to be a space between the paren and the bracket
int Main ( ) \n { \n\n } is the only way. Any other is blasphemy.
DonnaNobleInTheLibrary
Depends. In Netbeans, int main ( ) { \n\n } is better, because it shows the line with the opening bracket when you're at the closing one.
Makes it much easier to find missing/surplus brackets.
What blasphemous language has a capital M in Main?
Who the hell EVER writes out the main code? Its in, like, every template. EVEN BLANK.
Well I am not going to take bracket spacing advice from someone that doesnt know if its Main or main.
Velexis
Yeah, fuck that guy. Open the curlies on the same line!
Chintao
fuck you, they need space, so give them an extra line!
DrLanceB
NEVER!!!!!
SpacedOutTJ
My only issue is an IDE that uses spaces instead of tabs. I'm looking at you, BlueJ.
aspensmonster
BlueJ isn't the problem here.
IHateAdamSandler
4 tabs or 2 tabs?
PandaSexpress
4
4 spaces 1 tab
Kinda depends on the editors Tab settings ?
it can be changed in most of them
TheLamaFarmer
I think you mean spaces you filthy casual.
I know, I'm sorry...
lsuadtgeek
Tired of telling OCD PHP people the close tag ( ?> ) is absolutely unnecessary.
Burgerdan2Tall
That first guy can go fuck himself, second guy's style is way more legible.
Seersith
Thank you. Your post made my girlfriend laugh harder than I ever could.
DingleberryJam
Tabs will make your code run faster. Source: some random tech blog from India.
pluviofile
Makes sense. Less computer language characters to run through.
FrozenTime
I use 2 spaces instead like a weirdo. It just feels so right, but so wrong at the same time.
Quigonjinnandjuice
https://www.youtube.com/watch?v=SsoOG6ZeyUI
HobbitHouse
I saw that on Silicon Valley on HBO.
ICarpeYourDiems
tabs>>>spaces>>>tabs
Nuggetti
I have tabs that can make you run faster.
willthisworknow
I normally go for tabi boots. They give me speed and protect from attackers.
How much?
Sylvetrix
12 speed
kirby545
Tree fiddy.
Mobileuserwholikestoberandom
UnwantedChild
Tree fiddy what? Dollars? Pennies? And for how much ??
ImgoingtoseejusthowlongIcanmakethisbeforetheytellmeIhavetostop
I also am curious at the price of these "tabs"
Jackospade
I prefer spaces
Trexel
I'm glad someone knew what I was getting at.
imakesoft
Tunisia
Tabs are objectively better. But in languages where spaces are the standard (all the languages I use are), use the standard.
lazyboomerang
gamejeepboi
Python can burn for that reason alone.
ShowMeYourButtonhole
Ok calm down.
Says the person wanting to see my button hole >_>
I've got time.
int main()\n\t\n {\n\t\t\r} because fuck the world.
naptastic
what, no \r\n\r\n ?
SepiaSkies
Monster.
Shigbeard
Was about to say Fuck that guy, but fuck you even harder
besn
pres2pond
You are like a child. Observe (· for space because imgur): int·main()\n··{\n····return(0);\n··}
felka
At least drop the () around 0.
1metalnation
God, that makes me want to vomit
cheeseguy3412
Software guy here, we had a guy fired a few years back for using tabs. He was given a year and 3 chances to stop using em.
vhorner
I'm a big fan of organization and readability. Ctrl + K + D is my first love. Irks me that VS's XML designer won't auto format like that.
UnvisibleFixer
Ctrl + K + D followed by Ctrl + S
We've got a developer who likes to push branches whose names include Unicode emoji characters.
That would crash everything we do due to custom build processes / scripts. He'd have 6 managers out for his blood where I am. xD
Great! Where can I send his resumé?
(coworker) "I should really make a (╯°□°)╯︵┻━┻ branch name"
totallyrealname
Reminds me of this episode http://imgur.com/hshe3SH
serakaida
I like Vi
DiscoPhysicist
void main() goddammnit!
c++? yeah no, the standard defines the main loop as "int main..". In case the programmer leaves out the return value it defaults to return 0
yes I'm aware it compiles like this on MSVSc
https://stackoverflow.com/questions/204476/what-should-main-return-in-c-and-c
FoxGodRecords
If you \n{ … \n}, then when you collapse it, the () remains as a header so you can find it again.
in certain IDEs with some languages. VS does it in C#, but not in C++
I… I… I use NP++ (x64) for hand coding.
dunno why you got a downvote, brought yuo back to 1 :)
Thanks. I gave it back. ;)
what the heck, somebody hates you :D
UserSubHunterOfIndeterminateGender
int main()\n {\n} is structured like an essay. int main() is your title and everything in {} is your essay.
FredGreen182
That is the stupidest way someone tried to justify this stupid way of writing code
Qikk
Readability in code is what is most important you stupid human.
GOAE
Yeah, and thanks to a bunch of braces on their own lives there's less useful code I can read on my screen
*lines
It's actually a good reasoning. Stroustroup (creator of c++) writes alot about readability of code and best practices regarding it.
NO YOURE STUPID FOR NOT APPRECIATING IT
Corrodias
YOU WANNA GO, TUFF GUY?
BRO
awildcharmander
Putting the opening bracket on its own line balances it equally with the closing bracket, also on its own line. Imbalance is blasphemy.
zxms
Meanwhile python coders are like
So… do you use semicolons or nah?
StrangelySexee
Import from __future__ braces
GHETTOCHiLD
Wow, fuck this guy. from __future__ import braces at least get the syntax right bro.
Squirglez
I've seen python code indented with tabs.
fearandloathebananas
FUCK YOU! https://www.youtube.com/watch?v=SsoOG6ZeyUI
nicetomeetyouimdad
More like crying because of significant white space and where the hell is that one tab in all my soaces
electronickss
Use a real ide
Why the fuck does that one function say "missing indentation" AT ITS HEAD?
stoney2005
probably because it's part of a class and you forgot to do it right. or you copied from online where they used 3 spaces instead of 4.heathen
Nah, problem was that the function above it only had a head and comment what it's supposed to do.
Lol. Had that problem too. Pass is great
TheCactusPie
Whichever side you are on, just be consistent with the rest of your team.
dnbro
I just push auto format every now and then. Kinda prefer inline opening though. I don't need an entire extra line of screen space for that.
PlatonicOrgy
Where does everyone stand on Tabs v. Spaces? Do you sue tabs or are you wrong?
1bertorc
Good, now make it with a third guy (a python one)
nothingBetterToDoMightAsWell
there are 10 types, those who understand binary and those who dont
Toomuchinternet33
My friend doesn't get it.
IsDisassembled
Put the opening brace on the next line you heathen. Fuck purple guy.
PGMacDesign
Blasphemy! En Garde!
BoozeHound001
when programming you can have your brackets either way but people will fight over what way is better
ALittleScottishPenguinWithAGun
Yellow shirt guy is right. Fuck purple guy.
ImFrank
LightStriker
Line up your freaking brackets god dangmit.
0xFADE
Egyptian casing is the best casing.
draklerahl
but never
ToxicPineapple
I think I just puked a little in my mouth.
kgirl2601
Wow, 6 months of code cademy and I feel lucky to understand this joke. I lol'd. Learning to code is hard.
dreikommavierzehn
it's just nitpicking
dreikommavierzehn
(albeit serious enough that IDEs offer automatic code reformatting so you can code in your style and it reverts to the other upon enter)
0x1CEB00DA
if you use int main()\n{\n} we will burn you on a pyre ... or the VCS will reformat you code correctly on checkin ... whatever comes first
SojournCartographer
Symmetry REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
LubeMe
Their BOTH STANDARD T_T
utdrmac
They're*
DamianBear
I prefer to code in a single line
ghosthendrikson
Savage
Stumpyz
I had to switch from int main()\n{\n} to int main() {\n}. I hate it. I still fall into old habits constantly.
dgg7
why did you have to switch? company standard?
Stumpyz
Change of coding discipline, actually. Went from game dev (C++) to teaching Android dev (Java, mainly). Java devs love the inline bracket.
dgg7
Is this realy a thing? Started with Java, than Python and Scala (what a mess) and now C# but everwhere i but the { right after the )
dgg7
Except for Python for obvious reasons
Stumpyz
When I was learning game dev, we were always, ALWAYS taught /n { /n, and it actually threw students off when I did it in Android dev. (1/?)
dreikommavierzehn
Yes it is, some IDEs also help to automatically reformat your code for reasons that can be seen in this discussion thread.
dreikommavierzehn
(am c++ coder and use )/n{ notation)
coolguy4206969
"Fuck that guy" guy is wrong. They have to line up.
APackOfExcitedGingers
They don't have to line up, but it is more aesthetically pleasing. I do agree with you though, overall
Stumpyz
JonWallace1985
Am I the only one here that declares main correctly? int main(int, char**){}
alxv
Or int main(void) { }
BlastFX
1. Not correct. Second argument is and array of pointers, not a pointer to a pointer (i.e. “char *argv[]” not “char **argv”).
BlastFX
2. Unless you're actually using those arguments, they are unused variables (which is naughty) and you should use int main (void) {} instead.
BlastFX
2b. And yes you should use int main (void){}, not int main () {} as the latter means that main takes unspecified number of parameters.
dreikommavierzehn
I concur but iirc WinAPI prefers the non-void version with a subsequent funtion call to the API to mark the variables as unused.
EyesLikeTheSky
First three digits of Pi in german?
ArtOzz
The guy in purple is wrong.
mikeatike
Yeah there needs to be a space between the paren and the bracket
ArtOzz
int Main ( ) \n { \n\n } is the only way. Any other is blasphemy.
DonnaNobleInTheLibrary
Depends. In Netbeans, int main ( ) { \n\n } is better, because it shows the line with the opening bracket when you're at the closing one.
DonnaNobleInTheLibrary
Makes it much easier to find missing/surplus brackets.
mikeatike
What blasphemous language has a capital M in Main?
ArtOzz
Who the hell EVER writes out the main code? Its in, like, every template. EVEN BLANK.
mikeatike
Well I am not going to take bracket spacing advice from someone that doesnt know if its Main or main.
Velexis
Yeah, fuck that guy. Open the curlies on the same line!
Chintao
fuck you, they need space, so give them an extra line!
DrLanceB
NEVER!!!!!
SpacedOutTJ
My only issue is an IDE that uses spaces instead of tabs. I'm looking at you, BlueJ.
aspensmonster
BlueJ isn't the problem here.
SpacedOutTJ
IHateAdamSandler
4 tabs or 2 tabs?
PandaSexpress
4
coolguy4206969
4 spaces 1 tab
shadowze
Kinda depends on the editors Tab settings ?
IHateAdamSandler
it can be changed in most of them
TheLamaFarmer
I think you mean spaces you filthy casual.
IHateAdamSandler
I know, I'm sorry...
lsuadtgeek
Tired of telling OCD PHP people the close tag ( ?> ) is absolutely unnecessary.
Burgerdan2Tall
That first guy can go fuck himself, second guy's style is way more legible.
Seersith
Thank you. Your post made my girlfriend laugh harder than I ever could.
DingleberryJam
Tabs will make your code run faster. Source: some random tech blog from India.
pluviofile
Makes sense. Less computer language characters to run through.
FrozenTime
I use 2 spaces instead like a weirdo. It just feels so right, but so wrong at the same time.
Quigonjinnandjuice
https://www.youtube.com/watch?v=SsoOG6ZeyUI
HobbitHouse
I saw that on Silicon Valley on HBO.
ICarpeYourDiems
tabs>>>spaces>>>tabs
Nuggetti
I have tabs that can make you run faster.
willthisworknow
I normally go for tabi boots. They give me speed and protect from attackers.
ghosthendrikson
How much?
Sylvetrix
12 speed
kirby545
Tree fiddy.
Mobileuserwholikestoberandom
UnwantedChild
Tree fiddy what? Dollars? Pennies? And for how much ??
ImgoingtoseejusthowlongIcanmakethisbeforetheytellmeIhavetostop
I also am curious at the price of these "tabs"
Jackospade
I prefer spaces
Trexel
Jackospade
I'm glad someone knew what I was getting at.
imakesoft
Tunisia
Tabs are objectively better. But in languages where spaces are the standard (all the languages I use are), use the standard.
lazyboomerang
gamejeepboi
Python can burn for that reason alone.
ShowMeYourButtonhole
Ok calm down.
gamejeepboi
Says the person wanting to see my button hole >_>
ShowMeYourButtonhole
I've got time.
DingleberryJam
int main()\n\t\n {\n\t\t\r} because fuck the world.
naptastic
what, no \r\n\r\n ?
SepiaSkies
Monster.
Shigbeard
Was about to say Fuck that guy, but fuck you even harder
besn
pres2pond
You are like a child. Observe (· for space because imgur): int·main()\n··{\n····return(0);\n··}
felka
At least drop the () around 0.
1metalnation
God, that makes me want to vomit
cheeseguy3412
Software guy here, we had a guy fired a few years back for using tabs. He was given a year and 3 chances to stop using em.
vhorner
I'm a big fan of organization and readability. Ctrl + K + D is my first love. Irks me that VS's XML designer won't auto format like that.
UnvisibleFixer
Ctrl + K + D followed by Ctrl + S
naptastic
We've got a developer who likes to push branches whose names include Unicode emoji characters.
cheeseguy3412
That would crash everything we do due to custom build processes / scripts. He'd have 6 managers out for his blood where I am. xD
naptastic
Great! Where can I send his resumé?
naptastic
(coworker) "I should really make a (╯°□°)╯︵┻━┻ branch name"
totallyrealname
Reminds me of this episode http://imgur.com/hshe3SH
serakaida
I like Vi
DiscoPhysicist
void main() goddammnit!
dreikommavierzehn
c++? yeah no, the standard defines the main loop as "int main..". In case the programmer leaves out the return value it defaults to return 0
dreikommavierzehn
yes I'm aware it compiles like this on MSVSc
dreikommavierzehn
https://stackoverflow.com/questions/204476/what-should-main-return-in-c-and-c
FoxGodRecords
If you \n{ … \n}, then when you collapse it, the () remains as a header so you can find it again.
dreikommavierzehn
in certain IDEs with some languages. VS does it in C#, but not in C++
FoxGodRecords
I… I… I use NP++ (x64) for hand coding.
dreikommavierzehn
dunno why you got a downvote, brought yuo back to 1 :)
FoxGodRecords
Thanks. I gave it back. ;)
dreikommavierzehn
what the heck, somebody hates you :D
UserSubHunterOfIndeterminateGender
int main()\n {\n} is structured like an essay. int main() is your title and everything in {} is your essay.
FredGreen182
That is the stupidest way someone tried to justify this stupid way of writing code
Qikk
Readability in code is what is most important you stupid human.
GOAE
Yeah, and thanks to a bunch of braces on their own lives there's less useful code I can read on my screen
GOAE
*lines
dreikommavierzehn
It's actually a good reasoning. Stroustroup (creator of c++) writes alot about readability of code and best practices regarding it.
FrozenTime
NO YOURE STUPID FOR NOT APPRECIATING IT
Corrodias
YOU WANNA GO, TUFF GUY?
FrozenTime
BRO
awildcharmander
Putting the opening bracket on its own line balances it equally with the closing bracket, also on its own line. Imbalance is blasphemy.
zxms
Meanwhile python coders are like
BlastFX
So… do you use semicolons or nah?
StrangelySexee
Import from __future__ braces
GHETTOCHiLD
Wow, fuck this guy. from __future__ import braces at least get the syntax right bro.
Squirglez
I've seen python code indented with tabs.
fearandloathebananas
FUCK YOU! https://www.youtube.com/watch?v=SsoOG6ZeyUI
nicetomeetyouimdad
More like crying because of significant white space and where the hell is that one tab in all my soaces
electronickss
Use a real ide
DonnaNobleInTheLibrary
Why the fuck does that one function say "missing indentation" AT ITS HEAD?
stoney2005
probably because it's part of a class and you forgot to do it right. or you copied from online where they used 3 spaces instead of 4.heathen
DonnaNobleInTheLibrary
Nah, problem was that the function above it only had a head and comment what it's supposed to do.
stoney2005
Lol. Had that problem too. Pass is great