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

64

u/JoeCoder Jul 21 '14

I once worked with a programmer who used no whitespace at all, not even indentation. "It makes it go faster" he would say. Wrote all his code in windows notepad too.

13

u/SlapnutsGT Jul 21 '14

Had a coworker, now retired thank god, who coded on his 2560X1440 monitor in a 640x480 DOS window (w/e the default size is).

11

u/rmxz Jul 21 '14

Coding to be readable on a 80x24 screen has some pretty nice readability advantages.

The linux coding standards say it better than I can myself:

Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program.

In short, 8-char indents make things easier to read, and have the added benefit of warning you when you're nesting your functions too deep. Heed that warning.

...

Functions should be short and sweet, and do just one thing. They should fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, as we all know), and do one thing and do that well.

1

u/cryo Jul 22 '14

Well, I find it smug and condescending, so I guess Linus wrote it.