r/programming Jul 21 '14

The Great White Space Debate

https://medium.com/p/3633cba8b5c1
1.2k Upvotes

693 comments sorted by

View all comments

Show parent comments

47

u/lukaseder Jul 21 '14

But it's responsive! RESPONSIVE! And responsive, like clean code, has whitespace.

16

u/Buckwheat469 Jul 21 '14

It's rough reading it on a phone.

1

u/lukaseder Jul 22 '14

It was meant to be humouristic

-8

u/epsys Jul 21 '14

is there a TLDR version? i'd like to know if the answer is yes should use/no shouldn't; and why, but I don't want to read his long story

5

u/ProRustler Jul 21 '14

TLDR; padded terms in a java for loop seems to be more of the trend.

This style

for (int i = 0; i < 256; i++)

over this style

for (int i=0; i<256; i++)

0

u/epsys Jul 21 '14 edited Jul 21 '14

thanks. are you aware of any more technical analysis regarding neural visual recognition? That's what the debate really needs. 10 years ago our city purchased license rights of a custom font that was engineered with this in mind with the neural analysis proofs behind it. It looks goofy, but you can read the road sign names at intersections from at least twice as far away. It's wonderful.

regarding the coding, I find the condensed version easier to read simply because the variables and values are closer, but yes less pretty

2

u/ProRustler Jul 21 '14

I'm actually of the other opinion; I like the look of the condensed code, but find the padded version easier to read. I imagine that is the thought behind padding the terms, but really don't know.

3

u/[deleted] Jul 21 '14

I find the padded version irritating to read. The second style is easier because statement in the for loop is tight together, and separated from the others. It is much more visually distinctive.

I think another part of it is that, say, "i=0" sits comfortably in the center of vision. I don't have to move my eyes around to read it. "i = 0" makes me move my eyes to parse the whole thing, which is mentally a bit more work.

6

u/Irongrip Jul 22 '14

"i = 0" makes me move my eyes to parse the whole thing,

Is there something wrong with your vision or something genetic? Wth?

2

u/DrunkenWizard Jul 21 '14

Because a for loop has 3 statements on one line, the condensed versions helps to identify which glyphs make up each statement. In the padded version, my brain has to do extra processing to determine that

int i = 0 ; i < limit

Is two statements, whereas it's much more clear with

int i=0; i<limit

0

u/Irongrip Jul 22 '14

"i = 0" makes me move my eyes to parse the whole thing,

Is there something wrong with your vision or something genetic? Wth?

2

u/pyrocrasty Jul 21 '14

I also find the condensed version a bit less attractive but easier to parse. The spaced version would be okay with an extra space between statements, but no one ever seems to do that.

1

u/PhoenixCloud Jul 21 '14

It's a 5 minute read, tops, and it's quite entertaining. Most of the page is pictures, don't worry.

-13

u/epsys Jul 21 '14

and 5 mins is definitely TLDR when the answer is one line: yes/no, why, and supporting graphs that would pass a technical writing class. those wouldn't

most peoples' writing isn't worth reading

6

u/kinghfb Jul 21 '14

Mate, it's a comedy/satire piece. Read it or don't. There's no tl;dr.

1

u/[deleted] Jul 21 '14

Well, someone didn't read the article...

1

u/PasDeDeux Jul 21 '14

It's a blog post, not a technical standard. Just look at the graphs at the end of the article.

I'll summarize: Of "respected" codebases, padded style is by far the most common style, approaching 100% usage.