What human learning techniques can be applied to improve code layout?

coding-style

Solution

Could there be ways of laying out code that are provably better than others?

Yes. This problem was studied extensively in the 1980s. You could read all about it :-) A good university library should have Human Factors and Typography for More Readable Programs by Ronald M. Baecker and Aaron Marcus, published by Addison-Wesley in 1990.

Problem

Is it possible to use the results of studies made into human learning in order to identify how code might be laid out to improve comprehension? Code layout wars almost always end up defending consistency and the prevailing style, but could there be ways of laying out code that are provably better than others?

Original source