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

Jun 14, 2017 3:35 PM

shadowze

Views

100390

Likes

1569

Dislikes

43

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.

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

Yellow shirt guy is right. Fuck purple guy.

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 14 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 2 Dislikes 0

I like Vi

8 years ago | Likes 1 Dislikes 0

8 years ago | Likes 4 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 5 Dislikes 0

BlueJ isn't the problem here.

8 years ago | Likes 1 Dislikes 0

8 years ago | Likes 2 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

My friend doesn't get it.

8 years ago | Likes 4 Dislikes 0

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

8 years ago | Likes 9 Dislikes 3

Blasphemy! En Garde!

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 6 Dislikes 0

void main() goddammnit!

8 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

8 years ago | Likes 1 Dislikes 0

yes I'm aware it compiles like this on MSVSc

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 7 Dislikes 3

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

8 years ago | Likes 2 Dislikes 0

NEVER!!!!!

8 years ago | Likes 4 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 2 Dislikes 0

Thanks. I gave it back. ;)

8 years ago | Likes 1 Dislikes 0

what the heck, somebody hates you :D

8 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

8 years ago | Likes 10 Dislikes 6

Their BOTH STANDARD T_T

8 years ago | Likes 2 Dislikes 4

They're*

8 years ago | Likes 3 Dislikes 1

I prefer to code in a single line

8 years ago | Likes 11 Dislikes 0

Savage

8 years ago | Likes 3 Dislikes 0

Symmetry REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

8 years ago | Likes 1 Dislikes 0

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

8 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

8 years ago | Likes 1 Dislikes 0

8 years ago | Likes 6 Dislikes 0

Egyptian casing is the best casing.

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 3 Dislikes 0

Or int main(void) { }

8 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”).

8 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.

8 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.

8 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.

8 years ago | Likes 1 Dislikes 0

First three digits of Pi in german?

8 years ago | Likes 1 Dislikes 0

but never

8 years ago | Likes 1 Dislikes 0

I think I just puked a little in my mouth.

8 years ago | Likes 2 Dislikes 0

4 tabs or 2 tabs?

8 years ago | Likes 8 Dislikes 3

4

8 years ago | Likes 1 Dislikes 0

I think you mean spaces you filthy casual.

8 years ago | Likes 23 Dislikes 1

I know, I'm sorry...

8 years ago | Likes 1 Dislikes 0

Kinda depends on the editors Tab settings ?

8 years ago | Likes 11 Dislikes 0

it can be changed in most of them

8 years ago | Likes 4 Dislikes 0

4 spaces 1 tab

8 years ago | Likes 11 Dislikes 1

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

8 years ago | Likes 3 Dislikes 1

why did you have to switch? company standard?

8 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.

8 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 )

8 years ago | Likes 2 Dislikes 1

Except for Python for obvious reasons

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

8 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.

8 years ago | Likes 2 Dislikes 0

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

8 years ago | Likes 2 Dislikes 0

The guy in purple is wrong.

8 years ago | Likes 18 Dislikes 10

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

8 years ago | Likes 11 Dislikes 1

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

8 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.

8 years ago | Likes 1 Dislikes 0

Makes it much easier to find missing/surplus brackets.

8 years ago | Likes 1 Dislikes 0

What blasphemous language has a capital M in Main?

8 years ago | Likes 7 Dislikes 0

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

8 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.

8 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.

8 years ago | Likes 1 Dislikes 0

it's just nitpicking

8 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)

8 years ago | Likes 2 Dislikes 0

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

8 years ago | Likes 135 Dislikes 3

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

8 years ago | Likes 1 Dislikes 0

Monster.

8 years ago | Likes 19 Dislikes 0

8 years ago | Likes 11 Dislikes 0

God, that makes me want to vomit

8 years ago | Likes 8 Dislikes 0

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

8 years ago | Likes 3 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.

8 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.

8 years ago | Likes 4 Dislikes 0

Ctrl + K + D followed by Ctrl + S

8 years ago | Likes 1 Dislikes 0

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

8 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

8 years ago | Likes 2 Dislikes 0

Great! Where can I send his resumé?

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 2 Dislikes 0

At least drop the () around 0.

8 years ago | Likes 1 Dislikes 0

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

8 years ago | Likes 289 Dislikes 6

tabs>>>spaces>>>tabs

8 years ago | Likes 1 Dislikes 1

Makes sense. Less computer language characters to run through.

8 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.

8 years ago | Likes 4 Dislikes 0

I saw that on Silicon Valley on HBO.

8 years ago | Likes 19 Dislikes 0

I prefer spaces

8 years ago | Likes 15 Dislikes 6

8 years ago | Likes 5 Dislikes 0

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

8 years ago | Likes 1 Dislikes 0

8 years ago | Likes 16 Dislikes 1

I have tabs that can make you run faster.

8 years ago | Likes 62 Dislikes 0

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

8 years ago | Likes 2 Dislikes 0

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

8 years ago | Likes 4 Dislikes 0

How much?

8 years ago | Likes 14 Dislikes 0

12 speed

8 years ago | Likes 3 Dislikes 0

Tree fiddy.

8 years ago | Likes 10 Dislikes 0

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

8 years ago | Likes 4 Dislikes 0

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

8 years ago | Likes 16 Dislikes 2

8 years ago | Likes 2 Dislikes 1

Python can burn for that reason alone.

8 years ago | Likes 3 Dislikes 1

Ok calm down.

8 years ago | Likes 1 Dislikes 1

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

8 years ago | Likes 3 Dislikes 0

I've got time.

8 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.

8 years ago | Likes 60 Dislikes 11

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

8 years ago | Likes 33 Dislikes 16

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

8 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.

8 years ago | Likes 9 Dislikes 2

NO YOURE STUPID FOR NOT APPRECIATING IT

8 years ago | Likes 13 Dislikes 6

YOU WANNA GO, TUFF GUY?

8 years ago | Likes 1 Dislikes 0

BRO

8 years ago | Likes 1 Dislikes 0

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

8 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

8 years ago | Likes 2 Dislikes 1

*lines

8 years ago | Likes 1 Dislikes 1

Meanwhile python coders are like

8 years ago | Likes 126 Dislikes 3

So… do you use semicolons or nah?

8 years ago | Likes 1 Dislikes 0

Import from __future__ braces

8 years ago | Likes 4 Dislikes 1

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

8 years ago | Likes 5 Dislikes 1

I've seen python code indented with tabs.

8 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

8 years ago | Likes 52 Dislikes 4

Use a real ide

8 years ago | Likes 2 Dislikes 0

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

8 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

8 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.

8 years ago | Likes 1 Dislikes 0

Lol. Had that problem too. Pass is great

8 years ago | Likes 1 Dislikes 0