[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>Tabs vs Spaces Silicon Valley had tabs vs spaces topic Is

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 51
Thread images: 7

File: 1465242284.jpg (281KB, 1856x1080px) Image search: [Google]
1465242284.jpg
281KB, 1856x1080px
>Tabs vs Spaces

Silicon Valley had tabs vs spaces topic
Is there objectively one better than another?
Any stats on whats more popular?
>>
I am a space guy for some reason
and I think they portraied use of spaces wrong
I use spaces, but I actually press tab to get them
I thought this was common approach
but the show portrayed the girl - the spaces user
as someone who press space four times...
>>
>>54946021
drink bleach and die, faggot
>>
File: vid_1465243028.webm (496KB, 932x521px) Image search: [Google]
vid_1465243028.webm
496KB, 932x521px
>>54946125
>so salty
>>
>>54946021
I use tabs for indentation and spaces for alignment.
>>
>>54946345
>mixing bait
>>
>>54946021
Spaces. Tab sizes can be different on different systems and on different editors so your shit can get fucked up. Spaces will never look different.

>>54946061
Well of course you set your editor to insert spaces in stead of tabs when you press tab.
>>
File: 1465242404755.webm (66KB, 1856x1080px) Image search: [Google]
1465242404755.webm
66KB, 1856x1080px
>>54946021
>>
>>54947014
Are you doing that thing to show that static webm use up less space?
>>
>>54947426
uh huh
>>
tabs is the patricians choice, no discusion
>>
>>54946021
>using 4 characters instead of 1
>>
wtf? I can't believe you people are discussing this. Tabs are the only correct choice.

>>54946991
>Tab sizes can be different on different systems and on different editors (...) Spaces will never look different.
That's the whole fucking point, numbnut.
>>
>>54946021
Spaces are unquestionably superior for some languages (e.g. lisps). Tabs are arguably better for some languages (e.g. C, Java, etc.). I tend to use tabs unless there is a good reason to use spaces.
>>
>>54946021
Tabs for indentation, spaces to align afterwards.
If you're too stupid to manage that, use all spaces.
>>
>>54946991
>Tab sizes can be different on different systems and on different editors so your shit can get fucked up. Spaces will never look different.
That's the point. People can customize their tab size to their preference without having to actually change the number of spaces.
>>
>>54946345
so stupid
>>
>>54947583
>Tabs for indentation, spaces to align afterwards.
>not aligning with tabs
>>
>>54947606
You can do the same with spaces.

>>54947618
>align
lol
>>
>>54947606
also, using spaces over tabs leads to an even more pointless flame which is "how many spaces should I use?"
>>
>>54946021
which macbook does that guy have?
>>
>>54946021
Who gives a shit? It makes no difference.

Follow your work's style when at work and use whatever you like for your personal projects.
>>
>>54946991
you don't understand
the episode specifically showed her pressing space 6 times for one tab instead of tab once which auto indents to x spaces
>>
>>54947705
>pressing space 6 times
I do it sometimes.
>>
>>54947697
Looks like it's just a normal Pro.

I thought it was the black Macbook at first. That was the most beautiful and professional-looking machine Apple's ever made, but then they pulled the plug on it because they're retarded.
>>
There's editors out there , right now as I speak, that don't even support tabs.
>>
>indenting code manually

People actually do this?
Do they also type the ; manually after each line, lol?
>>
you can't fuck up a tab

you can, however hit the wrong number of spaces.


spaces are for turbo turds
>>
>>54948053
>you can, however hit the wrong number of spaces.
No.
>>
>>54948053
jesus, we the space guys dont actually press spaces
we press the tab for indentation same as you, but instead of if writing tabcharacter it writes 4 spaces or whatever you have set

this means theres never mix of whitespace, ever
>>
>>54948104
ok, i can respect that as long as we both agree that manually entering spaces is fucktarded
>>
>>54948132
>manually entering spaces is fucktarded
Why?
>>
>>54948132
it never ever crossed my mind that someone actually does it manually until I saw that episode of silicon valley and saw the girl doing tab-tap-tap-tap
>>
/g/ is a tabs-only board. if you use spaces for indentation you need to go back.
>>
>>54948104
>we press the tab for indentation same as you, but instead of if writing tabcharacter it writes 4 spaces or whatever you have set
polishing a turd won't make it smell nice
>>
File: 1458329203783.gif (2MB, 300x196px) Image search: [Google]
1458329203783.gif
2MB, 300x196px
>>54948172
>does not even know he is a minority
>>
>>54948104
>this means theres never mix of whitespace, ever

I put a non-breaking space in my code once.
It was part of a a string, but still, crazy times.
>>
>>54948217
>being this gay and accusing others of being minorities
>>
>>54948172
>/g/ is a tabs-only board.

That's becasue we don't have jobs.
Most style guides mandate spaces.
>>
>>54948262
>Most style guides mandate spaces.
wat
>>
>>54947014
YOUR SUCH A FAGGOT GODDAMN JUST KILL YOURSELF YOU FUCKING BITCH WTFWTFWTFWTFWTFWTFWTFWTFWTFWTFWTFWTFWTFWTFWTFWTF
>>
File: 1465251560.png (47KB, 720x143px) Image search: [Google]
1465251560.png
47KB, 720x143px
question for tab-fags?

lets say you write code and want to respect widely accpeted style guides, for example dont go over 80 characters lines length

you want to break a line
but visually align it for readability, tabs wont fit, its in between

do you actually mix tabs and spaces?
I mean that is crazy to me
>>
for me it depends on the language and the encompassing style.
For C/C++ I use 4 wide tabs.
For Java I use 4 wide spaces
For Python/Ruby/bash I use 2 wide spaces.
>>
>>54948326
lists like that should be defined somewhere else:
asd = [
'adwaita',
'elementary',
'faenza',
'numix',
'oxygen',
'ubuntu'
];

self.icon_theme_label = Qw.QLabel('');
self.icon_theme_combobox = Qw.QLabel('');
self.icon_theme_combobox.addItems(asd);
self.icon_theme_combobox.setEditable(1);
self.icon_theme_combobox.lineEdt().setReadOnly(1);


but i guess i'd do it like this, with a single tab:
self.icon_theme_label = Qw.QLabel('');
self.icon_theme_combobox = Qw.QLabel('');
self.icon_theme_combobox.addItems(['adwaita','elementary','faenza',
'numix','oxygen','ubuntu']);
self.icon_theme_combobox.setEditable(1);
self.icon_theme_combobox.lineEdt().setReadOnly(1);
>>
>>54948326
I use spaces.
But I would always put the array items on a separate line, not dangling somewhere off the code.
Either a line with just the array items (with the opening bracket on the line above and the closing on the line below).
Or even a separate line for each item.
>>
>>54948326
>do you actually mix tabs and spaces?
Yes. Tabs for scope indentation, spaces for alignment.

>I mean that is crazy to me
How is it more crazy than doing it with all spaces?

I also use visible whitespace (with a subtle color), but that's just personal taste.
>>
File: emacs.png (4MB, 3200x1080px) Image search: [Google]
emacs.png
4MB, 3200x1080px
>>54946218
>>54946021
I use both. Get rekt.
>>
>>54949889
Imagine you had a child with her and every time your kid was writing a school report you'd hear "tap tap tap tap tap..."
>>
>>54946991
> Tab sizes can be different on different systems and on different editors so your shit can get fucked up
This.
I was tired of intendation errors in Python, though lines looked aligned the same.
>>
File: 1444389325392.gif (144KB, 180x180px) Image search: [Google]
1444389325392.gif
144KB, 180x180px
>mfw use enter to tab
I don't give a fuck
>>
tabs for indent, spaces for alignment is best.
Thread posts: 51
Thread images: 7


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.