Hacker News new | ask | show | jobs
by ncmncm 2130 days ago
Excess whitespace is extremely harmful, because it reduces, in exact proportion, the amount that can be seen, at once, of the code that actually does things. Same applies to prolix commenting. The code that does things is what people working on it need to see. A comment that explains why a thing is done might be consulted when purpose is unclear or not obvious. That is why a good coding editor grays out comment text.

Whitespace deployed very judiciously directs attention where it is needed without need for distracting verbiage.

Far more scarce than any other resource is attention. Anything that steals attention away from where it is needed most is actively harmful, creating bugs and misdesign, and knocking people out of productive flow.

1 comments

The attention point is strong. However, I believe that it becomes a non issue if the concerns are well separated into the black boxes that they would be if drawn on a whiteboard. Fully disagree that whitespace is dangerous. It is only useless when misused.
I did not suggest that whitespace is dangerous, at all. Whitespace is to be used.

Putting it in places you do not specifically want to call attention to distracts readers' attention from where it needs to be.