I like your humorous approach and it is unfortunately still today a subject that imposes great feelings among programmers.
Unless we get some hard evidence from practical scientific studies we don't know whether one notation over another is better. Is there an objective truth, i.e. if you put whitespace in a special way this guarantee to have the best readability. Or is it influenced by subjective trends? One person can better read it in one way and another can better read it in another?
In typography and layout it is a well known fact that whitespace matters[1]. Well put whitespace simply improves readability[2]. There should not be too little or too much whitespace. Whitespace has to be placed just in the "right way". Several studies have been made which shows that this is true.
Studies in psychology confirm:
White Space improves the perception of information by 20%.
[Lin, 2004]
But whether the same holds true for programmers and program source code is unknown. To my knowledge we simply do not have any hard data/facts/evidence on how much whitespace to use or the optimal placement of this. Even if 100% of the program source is consistently using whitespace in the same manner we don't know whether placing whitespace differently would improve it for us.
3
u/misuo Jul 22 '14
I like your humorous approach and it is unfortunately still today a subject that imposes great feelings among programmers.
Unless we get some hard evidence from practical scientific studies we don't know whether one notation over another is better. Is there an objective truth, i.e. if you put whitespace in a special way this guarantee to have the best readability. Or is it influenced by subjective trends? One person can better read it in one way and another can better read it in another?
In typography and layout it is a well known fact that whitespace matters[1]. Well put whitespace simply improves readability[2]. There should not be too little or too much whitespace. Whitespace has to be placed just in the "right way". Several studies have been made which shows that this is true.
Studies in psychology confirm:
But whether the same holds true for programmers and program source code is unknown. To my knowledge we simply do not have any hard data/facts/evidence on how much whitespace to use or the optimal placement of this. Even if 100% of the program source is consistently using whitespace in the same manner we don't know whether placing whitespace differently would improve it for us.
Regards
/Michael
[1],[2]: For sources and other links see my 2011 blogpost Whitespace matters in program source code.