Re:Applying the Gestalt Principles to Code
by coldtea on Sunday May 05, 2019 @09:03AM
(#19832584)
That's how I keep them -- e.g. different number of line breaks between different items (e.g. 2 lines between import statements and class definition, but 1 line between methods inside the class).
[ Parent
| on HN ]
That's too crude. What I'm saying is, it should be around 0.5 line height for grouping inside a method, ~1-1.2 between items of a class, 2-2.5 around classes.
Of course, coders' tendency to nest breaks the idea a bit on levels deeper than a method. Though I think with a lot of fiddling some variation can still be achieved.