Programmers ......... 2 types

Jun 14, 2017 3:35 PM

shadowze

Views

100393

Likes

1569

Dislikes

43

Whichever side you are on, just be consistent with the rest of your team.

9 years ago | Likes 14 Dislikes 0

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.

9 years ago | Likes 1 Dislikes 0

Where does everyone stand on Tabs v. Spaces? Do you sue tabs or are you wrong?

9 years ago | Likes 1 Dislikes 0

Good, now make it with a third guy (a python one)

9 years ago | Likes 1 Dislikes 0

there are 10 types, those who understand binary and those who dont

9 years ago | Likes 1 Dislikes 0

My friend doesn't get it.

9 years ago | Likes 4 Dislikes 0

Put the opening brace on the next line you heathen. Fuck purple guy.

9 years ago | Likes 9 Dislikes 3

Blasphemy! En Garde!

9 years ago | Likes 1 Dislikes 0

when programming you can have your brackets either way but people will fight over what way is better

9 years ago | Likes 6 Dislikes 0

Yellow shirt guy is right. Fuck purple guy.

9 years ago | Likes 1 Dislikes 0

9 years ago | Likes 4 Dislikes 0

Line up your freaking brackets god dangmit.

9 years ago | Likes 4 Dislikes 1

Egyptian casing is the best casing.

9 years ago | Likes 1 Dislikes 0

but never

9 years ago | Likes 1 Dislikes 0

I think I just puked a little in my mouth.

9 years ago | Likes 2 Dislikes 0

Wow, 6 months of code cademy and I feel lucky to understand this joke. I lol'd. Learning to code is hard.

9 years ago | Likes 1 Dislikes 0

it's just nitpicking

9 years ago | Likes 2 Dislikes 0

(albeit serious enough that IDEs offer automatic code reformatting so you can code in your style and it reverts to the other upon enter)

9 years ago | Likes 2 Dislikes 0

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

9 years ago | Likes 10 Dislikes 6

Symmetry REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

9 years ago | Likes 1 Dislikes 0

Their BOTH STANDARD T_T

9 years ago | Likes 2 Dislikes 4

They're*

9 years ago | Likes 3 Dislikes 1

I prefer to code in a single line

9 years ago | Likes 11 Dislikes 0

Savage

9 years ago | Likes 3 Dislikes 0

I had to switch from int main()\n{\n} to int main() {\n}. I hate it. I still fall into old habits constantly.

9 years ago | Likes 3 Dislikes 1

why did you have to switch? company standard?

9 years ago | Likes 3 Dislikes 0

Change of coding discipline, actually. Went from game dev (C++) to teaching Android dev (Java, mainly). Java devs love the inline bracket.

9 years ago | Likes 2 Dislikes 0

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 )

9 years ago | Likes 2 Dislikes 1

Except for Python for obvious reasons

9 years ago | Likes 2 Dislikes 1

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/?)

9 years ago | Likes 2 Dislikes 0

Yes it is, some IDEs also help to automatically reformat your code for reasons that can be seen in this discussion thread.

9 years ago | Likes 2 Dislikes 0

(am c++ coder and use )/n{ notation)

9 years ago | Likes 2 Dislikes 0

"Fuck that guy" guy is wrong. They have to line up.

9 years ago | Likes 9 Dislikes 4

They don't have to line up, but it is more aesthetically pleasing. I do agree with you though, overall

9 years ago | Likes 1 Dislikes 0

9 years ago | Likes 6 Dislikes 0

Am I the only one here that declares main correctly? int main(int, char**){}

9 years ago | Likes 3 Dislikes 0

Or int main(void) { }

9 years ago | Likes 2 Dislikes 0

1. Not correct. Second argument is and array of pointers, not a pointer to a pointer (i.e. “char *argv[]” not “char **argv”).

9 years ago | Likes 2 Dislikes 0

2. Unless you're actually using those arguments, they are unused variables (which is naughty) and you should use int main (void) {} instead.

9 years ago | Likes 1 Dislikes 0

2b. And yes you should use int main (void){}, not int main () {} as the latter means that main takes unspecified number of parameters.

9 years ago | Likes 2 Dislikes 0

I concur but iirc WinAPI prefers the non-void version with a subsequent funtion call to the API to mark the variables as unused.

9 years ago | Likes 1 Dislikes 0

First three digits of Pi in german?

9 years ago | Likes 1 Dislikes 0

The guy in purple is wrong.

9 years ago | Likes 18 Dislikes 10

Yeah there needs to be a space between the paren and the bracket

9 years ago | Likes 11 Dislikes 1

int Main ( ) \n { \n\n } is the only way. Any other is blasphemy.

9 years ago | Likes 4 Dislikes 5

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.

9 years ago | Likes 1 Dislikes 0

Makes it much easier to find missing/surplus brackets.

9 years ago | Likes 1 Dislikes 0

What blasphemous language has a capital M in Main?

9 years ago | Likes 7 Dislikes 0

Who the hell EVER writes out the main code? Its in, like, every template. EVEN BLANK.

9 years ago | Likes 1 Dislikes 1

Well I am not going to take bracket spacing advice from someone that doesnt know if its Main or main.

9 years ago | Likes 2 Dislikes 0

Yeah, fuck that guy. Open the curlies on the same line!

9 years ago | Likes 7 Dislikes 3

fuck you, they need space, so give them an extra line!

9 years ago | Likes 2 Dislikes 0

NEVER!!!!!

9 years ago | Likes 4 Dislikes 0

My only issue is an IDE that uses spaces instead of tabs. I'm looking at you, BlueJ.

9 years ago | Likes 5 Dislikes 0

BlueJ isn't the problem here.

9 years ago | Likes 1 Dislikes 0

9 years ago | Likes 2 Dislikes 0

4 tabs or 2 tabs?

9 years ago | Likes 8 Dislikes 3

4

9 years ago | Likes 1 Dislikes 0

4 spaces 1 tab

9 years ago | Likes 11 Dislikes 1

Kinda depends on the editors Tab settings ?

9 years ago | Likes 11 Dislikes 0

it can be changed in most of them

9 years ago | Likes 4 Dislikes 0

I think you mean spaces you filthy casual.

9 years ago | Likes 23 Dislikes 1

I know, I'm sorry...

9 years ago | Likes 1 Dislikes 0

Tired of telling OCD PHP people the close tag ( ?> ) is absolutely unnecessary.

9 years ago | Likes 1 Dislikes 0

That first guy can go fuck himself, second guy's style is way more legible.

9 years ago | Likes 1 Dislikes 0

Thank you. Your post made my girlfriend laugh harder than I ever could.

9 years ago | Likes 1 Dislikes 0

Tabs will make your code run faster. Source: some random tech blog from India.

9 years ago | Likes 289 Dislikes 6

Makes sense. Less computer language characters to run through.

9 years ago | Likes 1 Dislikes 0

I use 2 spaces instead like a weirdo. It just feels so right, but so wrong at the same time.

9 years ago | Likes 4 Dislikes 0

I saw that on Silicon Valley on HBO.

9 years ago | Likes 19 Dislikes 0

tabs>>>spaces>>>tabs

9 years ago | Likes 1 Dislikes 1

I have tabs that can make you run faster.

9 years ago | Likes 62 Dislikes 0

I normally go for tabi boots. They give me speed and protect from attackers.

9 years ago | Likes 2 Dislikes 0

How much?

9 years ago | Likes 14 Dislikes 0

12 speed

9 years ago | Likes 3 Dislikes 0

Tree fiddy.

9 years ago | Likes 10 Dislikes 0

Tree fiddy what? Dollars? Pennies? And for how much ??

9 years ago | Likes 4 Dislikes 0

I also am curious at the price of these "tabs"

9 years ago | Likes 4 Dislikes 0

I prefer spaces

9 years ago | Likes 15 Dislikes 6

9 years ago | Likes 5 Dislikes 0

I'm glad someone knew what I was getting at.

9 years ago | Likes 1 Dislikes 0

9 years ago | Likes 16 Dislikes 1

Tabs are objectively better. But in languages where spaces are the standard (all the languages I use are), use the standard.

9 years ago | Likes 16 Dislikes 2

9 years ago | Likes 2 Dislikes 1

Python can burn for that reason alone.

9 years ago | Likes 3 Dislikes 1

Ok calm down.

9 years ago | Likes 1 Dislikes 1

Says the person wanting to see my button hole >_>

9 years ago | Likes 3 Dislikes 0

I've got time.

9 years ago | Likes 2 Dislikes 0

int main()\n\t\n {\n\t\t\r} because fuck the world.

9 years ago | Likes 135 Dislikes 3

what, no \r\n\r\n ?

9 years ago | Likes 1 Dislikes 0

Monster.

9 years ago | Likes 19 Dislikes 0

Was about to say Fuck that guy, but fuck you even harder

9 years ago | Likes 3 Dislikes 0

9 years ago | Likes 11 Dislikes 0

You are like a child. Observe (· for space because imgur): int·main()\n··{\n····return(0);\n··}

9 years ago | Likes 2 Dislikes 0

At least drop the () around 0.

9 years ago | Likes 1 Dislikes 0

God, that makes me want to vomit

9 years ago | Likes 8 Dislikes 0

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.

9 years ago | Likes 12 Dislikes 1

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.

9 years ago | Likes 4 Dislikes 0

Ctrl + K + D followed by Ctrl + S

9 years ago | Likes 1 Dislikes 0

We've got a developer who likes to push branches whose names include Unicode emoji characters.

9 years ago | Likes 2 Dislikes 0

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

9 years ago | Likes 2 Dislikes 0

Great! Where can I send his resumé?

9 years ago | Likes 1 Dislikes 0

(coworker) "I should really make a (╯°□°)╯︵┻━┻ branch name"

9 years ago | Likes 1 Dislikes 0

Reminds me of this episode http://imgur.com/hshe3SH

9 years ago | Likes 2 Dislikes 0

I like Vi

9 years ago | Likes 1 Dislikes 0

void main() goddammnit!

9 years ago | Likes 1 Dislikes 0

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

9 years ago | Likes 1 Dislikes 0

yes I'm aware it compiles like this on MSVSc

9 years ago | Likes 1 Dislikes 0

If you \n{ … \n}, then when you collapse it, the () remains as a header so you can find it again.

9 years ago | Likes 1 Dislikes 0

in certain IDEs with some languages. VS does it in C#, but not in C++

9 years ago | Likes 1 Dislikes 0

I… I… I use NP++ (x64) for hand coding.

9 years ago | Likes 1 Dislikes 0

dunno why you got a downvote, brought yuo back to 1 :)

9 years ago | Likes 2 Dislikes 0

Thanks. I gave it back. ;)

9 years ago | Likes 1 Dislikes 0

what the heck, somebody hates you :D

9 years ago | Likes 2 Dislikes 0

int main()\n {\n} is structured like an essay. int main() is your title and everything in {} is your essay.

9 years ago | Likes 60 Dislikes 11

That is the stupidest way someone tried to justify this stupid way of writing code

9 years ago | Likes 33 Dislikes 16

Readability in code is what is most important you stupid human.

9 years ago | Likes 3 Dislikes 1

Yeah, and thanks to a bunch of braces on their own lives there's less useful code I can read on my screen

9 years ago | Likes 2 Dislikes 1

*lines

9 years ago | Likes 1 Dislikes 1

It's actually a good reasoning. Stroustroup (creator of c++) writes alot about readability of code and best practices regarding it.

9 years ago | Likes 1 Dislikes 0

NO YOURE STUPID FOR NOT APPRECIATING IT

9 years ago | Likes 13 Dislikes 6

YOU WANNA GO, TUFF GUY?

9 years ago | Likes 1 Dislikes 0

BRO

9 years ago | Likes 1 Dislikes 0

Putting the opening bracket on its own line balances it equally with the closing bracket, also on its own line. Imbalance is blasphemy.

9 years ago | Likes 9 Dislikes 2

Meanwhile python coders are like

9 years ago | Likes 126 Dislikes 3

So… do you use semicolons or nah?

9 years ago | Likes 1 Dislikes 0

Import from __future__ braces

9 years ago | Likes 4 Dislikes 1

Wow, fuck this guy. from __future__ import braces at least get the syntax right bro.

9 years ago | Likes 5 Dislikes 1

I've seen python code indented with tabs.

9 years ago | Likes 5 Dislikes 1

More like crying because of significant white space and where the hell is that one tab in all my soaces

9 years ago | Likes 52 Dislikes 4

Use a real ide

9 years ago | Likes 2 Dislikes 0

Why the fuck does that one function say "missing indentation" AT ITS HEAD?

9 years ago | Likes 13 Dislikes 0

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

9 years ago | Likes 3 Dislikes 0

Nah, problem was that the function above it only had a head and comment what it's supposed to do.

9 years ago | Likes 1 Dislikes 0

Lol. Had that problem too. Pass is great

9 years ago | Likes 1 Dislikes 0