3 ms·
I'm not so sure about "Make liberal use of vertical whitespace to divide code into logical chunks." — it's my tendency to add a lot of vertical whitespace as I
by glhaynes 11y ago
I'm not so sure about "Make liberal use of vertical whitespace to divide code into logical chunks." — it's my tendency to add a lot of vertical whitespace as I write code, but the more I go back and remove it, the more I'm convinced that it wasn't really helpful and that whatever little help it did provide was far outweighed by how much less context could be seen on the screen at one time.
I think of it kind of like prose: we organize related sentences into paragraphs and then have little or no extra vertical whitespace between paragraphs. If you ever find yourself thinking you need some extra level of hierarchy division within a paragraph, you're likely really just needing a new paragraph.
- dionidium 11y agoExactly right. The smallest unit of logical division in code is the function. It's not meaningless whitespace. Some programmers seem to like whitespace, but it's a purely aesthetic preference. No more or less.