Well?

William Rivera
William Rivera

Well?

All urls found in this thread:
https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/
Andrew Powell
Andrew Powell

tabs as spaces

Zachary Peterson
Zachary Peterson

There is not a single good reason not to use tabs. Being able to look at any code using your preferred indentation width is a godsend. The only time that spaces are ever better are when you're entering code into a website, but even then, the website should add support for tabs.

Hudson Garcia
Hudson Garcia

Being able to look at any code using your preferred indentation width is a godsend.
I don't understand why this is such an issue for people. Does it really make a difference if it's 2 wide vs 4 wide?

Noah Sanchez
Noah Sanchez

Yes

Tyler Reyes
Tyler Reyes

Spaces.
Tabs to indent, spaces to align would be ideal, but it's too easy for people to fuck up.

Andrew Mitchell
Andrew Mitchell

yes, and i agree with what said, but i still dont like tabs
4 space indentation masterrace

Thomas Walker
Thomas Walker

Tabs obviously. How do you expect me to read spaces?

Evan Thomas
Evan Thomas

how is this even a thing in 2018

its tabs that produce spaces. if you're using tabs that make \ts in 2018, you're seriously doing something wrong and you most definitely are not a professional software engineer

the real question is 2 spaces vs 4 spaces, and that depends on what you're doing. you pretty much need 2 spaces for react

Easton Ward
Easton Ward

I use spaces at work, but...
Tabs.

Tabs take up only one character.
Tabs you can resize and customize.
Tabs you can convert to spaces at any time, not vice versa.

Tabs were literally made for this. But honestly, it's not that big of a deal. I can deal with both and won't sperg out about it.

Luis Phillips
Luis Phillips

Personal stuff? Always tabs with tab width set to my liking
Work stuff? Follow the code base of course
New work stuff? Tabs if I can

Colton Hernandez
Colton Hernandez

I use spaces at work
I wonder why?

Owen Hall
Owen Hall

8 spaces, kernel style.
4 spaces is "acceptable", 2 spaces is a crime.

Jaxson Clark
Jaxson Clark

Because my coworker was the one who wrote the coding style guidelines. He mostly copied them from some Twitter account rants.

Austin Carter
Austin Carter

Tabs to indent, spaces to align would be ideal, but it's too easy for people to fuck up.
Anyone without the minimum amount of brain cells required to do indentation correctly is someone I honestly don't want anywhere near my codebase no matter how it might be formatted.

Kayden Scott
Kayden Scott

how is this even a thing in 2018
It's a thing because as you have shown, people who think spaces are a good idea for indentation are still here in 2018. If you were to remedy that, the rest of us would be much obliged.

Xavier Baker
Xavier Baker

2 spaces for react
not professional software engineer

How can you lack self awareness to this degree?

Lucas Torres
Lucas Torres

Tabs. Fuck anyone who insists on spaces. Fuck them to hell and back. I generally try to follow whatever guidelines because consistency is important, but I'm not going to lower myself to that level for those stupid shitty brainlet retards. Pic related.

Isaac Cruz
Isaac Cruz

Languages should not come with formatting guidelines in the first place. Formatting guidelines belong with projects, not languages; the whole point of leaving them to the programmer is that the language itself shouldn't give a fuck and leave you to do what YOU think is best. Fuck any and all guidelines that come with programming languages, no matter the topic.

Eli King
Eli King

tabs.
takes only one push to go over """ 4 spaces" of whitespace.
I hate other peoples code when they do that 4xspace shit.

Chase Sanders
Chase Sanders

Single space.
I'm going to hell.

Caleb Harris
Caleb Harris

Used to be a tabs guys but since working with languages like clojure where you need to constantly align I prefer spaces (by converting tabs to 2/4 spaces). I'm also not really a fan of "tabs for indents, spaces for alignment" as it just fucks up the code in the long run.

And honestly it's 2018 now and we have advanced enough programs that can convert tabs to spaces back and forth as much as you like, so the whole argument about incompatibility or being able to set the indent space to your liking is obsolete.

Christian Scott
Christian Scott

I'm also not really a fan of "tabs for indents, spaces for alignment" as it just fucks up the code in the long run.
How so?

And honestly it's 2018 now and we have advanced enough programs that can convert tabs to spaces back and forth as much as you like,
You can't automatically convert from spaces to "tabs for indents spaces for alignment" though, as the reverse transformation is not information-preserving.

Matthew Baker
Matthew Baker

Tabs

Evan Thomas
Evan Thomas

Tabs are a waste of space, 80 cols max

https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/

Nolan Cox
Nolan Cox

If you later move lines around, having to change their indents and alignments. Using "tabs for indents spaces for alignment" is pretty much unusable for things like SQL scripts and Clojure

Ryder Hill
Ryder Hill

web development

Ryder Sanders
Ryder Sanders

some analysis suggests this choice matters
come fucking on, wtf is this? what are you gonna tell me next? that its raining because wants it to rain?

Chase Cook
Chase Cook

If you later move lines around, having to change their indents and alignments.
That is true for all indentation schemes. Tabs/spaces make no difference here.

Using "tabs for indents spaces for alignment" is pretty much unusable for things like SQL scripts
Hm? I do that all the time. Works fine.

and Clojure
Granted. It works for languages that use block-logical indent styles, not lisp-style indents. (Personally I think that C-style indentation on lisps would actually work fine, and better than classic lisp style. But I don't have enough lisp experience to have a confident opinion here, so I don't take that idea too seriously.)

Jaxson Barnes
Jaxson Barnes

let me fix that for you
<<<"""web""" """development""">>>
there, much better

Easton Perry
Easton Perry

Inside of a function? 2 spaces, flat. Everything that can be done inline, should. 80 columns wide.

Mission. Critical. Standards.

Matthew Morris
Matthew Morris

tab key included on every keyboard ever made
convenient to reach
literally exists to insert a gap larger than one space
but no, let's mash the spacebar like a monkey to achieve the same result

Jack Cox
Jack Cox

No one presses the spacebar to indent. We're arguing tab character vs space characters.

Adrian Bell
Adrian Bell

retards who think that people who use spaces press "space" multiple times
EVERY SINGLE TIME

I hope I'm just getting trolled.

Xavier Brown
Xavier Brown

can someone tell me why exactly you'd want your editor to replace a tab press with a bunch of spaces?
like what is the advantage to this?
why not just leave it as a tab

Dylan Lee
Dylan Lee

Because you should be using spaces and this just makes it easier to do indents.

Christopher Sullivan
Christopher Sullivan

you should be using spaces
this just makes it easier
are you joking or do you not realise you haven't actually said anything that answers that question

Angel Allen
Angel Allen

Retard question

Does using spaces result in higher file size?

Brandon Peterson
Brandon Peterson

why exactly you'd want your editor to replace a tab press with a bunch of spaces
It makes it easier to create indents when you're using spaces (as you should).
what is the advantage to this
It's faster.
why not just leave it as a tab
All "advantages" of tabs except file size break the moment you want to do something like pic related.

Tabs are for creating tables, not for indents.

Jayden Sanders
Jayden Sanders

not if you use 1 space indentation

Chase Martinez
Chase Martinez

Spaces and convert tabs to spaces.

Source code should reflect authors intention (and indentation is part of that) as the author intended regardless what you prefer. And spaces kind of enforce that.

Also I've never seen a source code where someone used tabs exclusively. Usually it's allot of tabs and occasional space indentation (facilitated by IDE intellisense or just lazy developer) and when you load that file into your own environment, and you don't have same tab sized as the author, all shit looks retarted.

Fuck tabs.

Levi Harris
Levi Harris

It makes it easier to create indents when you're using spaces (as you should).
how does it make it easier and why should I?
It's faster.
what the fuck?

Juan Lee
Juan Lee

Source code should reflect authors intention (and indentation is part of that) as the author intended regardless what you prefer.
Why? Why shouldn't it reflect viewer's preferences?

Also I've never seen a source code where someone used tabs exclusively.
Then perhaps you should start reading some nontrivial amounts of actual code before forming opinions on this. It is not exactly uncommon.

Jose Flores
Jose Flores

when someone used tabs exclusively. Usually it's allot of tabs and occasional space indentation
???
when someone uses tabs exclusively
usually it's not exclusively tabs
I don't understand

Jonathan Butler
Jonathan Butler

how does it make it easier
One key press versus 2 or 4 or however deep you want your indent.
why should I
See third answer in what the fuck?
See above above.

Why? Why shouldn't it reflect viewer's preferences?
See pic related in You can't create that indent without mixing tabs and spaces. Changing tab width fucks it up.

Luke Garcia
Luke Garcia

Sometime, you have to use spaces, and your text editor goes full retard with auto-indent.

Tyler Robinson
Tyler Robinson

One key press versus 2 or 4
in case you weren't aware, friend, a tab is one key press as well

All "advantages" of tabs except file size break the moment you want to do something like pic related.
You can't create that indent without mixing tabs and spaces. Changing tab width fucks it up.
nobody uses tabs for that kind of alignment
tabs are for scope, if you want to line things up with another line of course you use fixed width characters

Andrew Garcia
Andrew Garcia

See pic related in
That's a limitation on what we CAN accomplish, not on what code SHOULD look like.

You can't create that indent without mixing tabs and spaces.
So mix tabs and spaces. Indent with tabs, align with spaces. Which is what pretty much everyone advocating for tabs says.

Changing tab width fucks it up.
But it doesn't. That's the whole point.

Julian Edwards
Julian Edwards

yes there is. distance is different in different programs

using tabbed spaces is better in every way

Noah Parker
Noah Parker

I know, I've been reading this for years.

Grayson Parker
Grayson Parker

tabs is the only way, who the fuck uses spaces?

Jayden Anderson
Jayden Anderson

he doesnt expand tab

Daniel Turner
Daniel Turner

I heard from some colleges that spaces is universal and thus does not cause fuckery between machines.
Is this true?

Dominic Ortiz
Dominic Ortiz

they think they're using tabs exclusively, just go browse github

Mason Murphy
Mason Murphy

Boy, Python must make you really angry.

Connor Foster
Connor Foster

Tabs master race here.

Alexander Clark
Alexander Clark

Not angry, just disappointed.

Jayden Harris
Jayden Harris

It's a bit unrelated, and I know OP's pic is sublime text but how do I make emacs highlight only the part of the file that actually contain text instead of the whole buffer line?

Evan Powell
Evan Powell

t. pythonfag
have fun with 30 inner loops at once

Mason Morales
Mason Morales

even a shit team code review wouldn't allow it

Ayden Howard
Ayden Howard

literally exists to insert a gap larger than one space

No it doesn't. It was created to move between cells in tabular data (hence the name).

The original ASCII standard says printable characters start with space (32 in decimal) but tab is 9, which means its a dumb terminal control character.

The escape key on the keyboard also has an ASCII value, but few people advocate putting escape characters in text files

Sebastian Wright
Sebastian Wright

tabs = 4 spaces

Matthew Jackson
Matthew Jackson

distance is different in different programs
so fucking what?

Jordan Bell
Jordan Bell

I've always used spaces, mostly because I used to use a fairly complex and ugly alignment style. But I just did a grep of my recent projects, and the only places I didn't use a multiple of 4 spaces were stuff the second line here:

if(
isprint( err_string_buffer[ 0 ] )
&& isprint( err_string_buffer[ 1 ] )
&& isprint( err_string_buffer[ 2 ] )
&& isprint( err_string_buffer[ 3 ] )
)
...

where it's being aligned relative to something at the same indentation level. So yeah, I might try switching to tabs.

Jose Scott
Jose Scott

tabs are dumb and if you disagree you dont deal with pull requests

tabs are literally for retards who don't actually write code professionally

90% of the world uses spaces. please die dumb editor ricing retards

Jason James
Jason James

I generally align that like:

function voo()
{
<tab>if (
<tab><tab> isprint( err_string_buffer[ 0 ] )
<tab><tab>&& isprint( err_string_buffer[ 1 ] )
<tab><tab>&& isprint( err_string_buffer[ 2 ] )
<tab><tab>&& isprint( err_string_buffer[ 3 ] )
<tab>)
}

Works like a charm.

Joseph Hall
Joseph Hall

That means the code looks the same no matter where you view it and it doesnt fuck up your alignment when you use a mix of tabs and spaces.

but what about muh preferences for how far a scope indents?
so fucking what?

Accept how far a indent goes for a language. That's why style-guidelines exist

Adrian Nelson
Adrian Nelson

Not 8
Kys.

Daniel Cook
Daniel Cook

pressing 4 times space
You fucking plebs, just configure your IDE to convert 1 tab into 4 spaces and problem is solved.
Anyone using anything else if a retard.

Disable AdBlock to view this page

Disable AdBlock to view this page