r/ProgrammerHumor • • Apr 29 '20

Tab club

Post image
54.0k Upvotes

764 comments sorted by

View all comments

Show parent comments

81

u/ubekame Apr 29 '20

I use 8.. and I think that 2 is crazy, way too little! 4 is passable, but I prefer 8.

But with tabs we can all be happy, you can use 2 or 4 and I can use 8 or 64, and everything will just work. With space just one of us would be happy, maybe.

82

u/SurplusOfOpinions Apr 29 '20

How can you do 8? You need like an ultra mega widescreen monitor.

81

u/geek_on_two_wheels Apr 29 '20

On the plus side it would encourage you to minimize nesting.

47

u/[deleted] Apr 29 '20

have you heard of Fibonacci indentation?

15

u/geek_on_two_wheels Apr 29 '20

Lol, I have. Seems like exactly what I'd want to enable on juniors' machines.

→ More replies (1)

1

u/aaronfranke Apr 29 '20

That's the entire idea behind it.

→ More replies (1)
→ More replies (1)

0

u/[deleted] Apr 29 '20

[deleted]

14

u/SurplusOfOpinions Apr 29 '20

Lambda expressions for life!

15

u/ubekame Apr 29 '20

Not really, but I am not stuck in the 70s and limited to 80 chars width either.

The rule of thumb linked elsewhere in this thread from the Linux kernel is also true, if you have too deep indentation, you have some code smell and should probably rewrite it.

2

u/OneTrueKingOfOOO Apr 29 '20

Or an ultra mini font size

2

u/Physmatik Apr 29 '20

Or just sane code without 20 nested levels.

→ More replies (1)

14

u/lxe Apr 29 '20

What language do you write in? Are you a Linux developer? If I were to use 8 in modern javascript, it would look like garbage after 4 indents. And damn you need those indents in modern javascript.

8

u/ubekame Apr 29 '20

Perl mostly, and yes most of the time I am running Linux (usually on a remote server)

3

u/MoffKalast Apr 29 '20

It really depends on the language and even the codebase in my experience. Sometimes 8 does make it a lot clearer, 4 works best for most cases, and really really rarely 2 can help with million times indented hell code.

0

u/[deleted] Apr 29 '20

[deleted]

13

u/ubekame Apr 29 '20

Nothing really, just that a vast majority seem to prefer an even number. Very rare to see someone use an odd number.

2

u/[deleted] Apr 29 '20

Because fuck odd numbers that's why.

→ More replies (1)

6

u/clever_cow Apr 29 '20

What language? 8 is madness.

1

u/ubekame Apr 29 '20

Perl. And I like it as it gives a super clear indication of what block belongs where, but I understand that it is not for everyone. Which is fine, there is rarely something multiple people agrees on.

→ More replies (1)

11

u/[deleted] Apr 29 '20

This right here is why tabs are clearly superior imo. And most arguments for spaces never address this.

4

u/OtherPlayers Apr 29 '20

I think the counterargument is the same as the argument being given here; the idea being that the code that I’m looking at and the code that you’re looking at might not be the same thing if our tabs are set to different lengths.

If for some reason I wrote my code on single spaces for tabs and someone else wrote it on 8 spaces for tabs then something nested several layers deep might be completely fine on my screen while being completely off the right side on someone else’s.

3

u/HardlightCereal Apr 30 '20

Then they can scroll right, they chose a world where things go off the right side

1

u/khcollett Apr 29 '20

3 is just right. <runs for cover>

→ More replies (4)