What does experimental research say about white space in code? Let me be specific: I'm talking about cognitive studies that compare how quickly and effectively people can read and grasp visual information that comes across in different formats.
Let's say you were designing a new computer language and had to make some decisions that affect how the source code looks. Or you were simply writing a style guide for a new language and wanted to make recommendations. Relevant topics might be identifier style (snake_cased_identifiers vs. camelCaseIdentifiers / PascalCaseIdentifiers), horizontal indentation, documentation styles, or vertical spacing.
I'm intentionally asking this question in this way to avoid recommendations such as:
I don't want a flame war between people that support differing approaches; rather, I'd like to know what experimental research has to say about the matter. (And I don't expect any particular study to necessarily be completely 'objective' or 'neutral'.)
To give a 'squishier' motivation for this question: People appreciate white space in code, when reading documents, and in art (such as listening to music). These fields all put a big emphasis on the importance of space.
So, thanks, I'd appreciate to hear what the studies have to say. To be clear, I'm not ruling out the importance of style and art -- I actually would hope that the wisdom from these worlds will show up in experimental studies.
In summary, if you can, please touch on one or more of the following:
Whitespace not only creates harmony, balance, and helps to brand a design, it can also be used to lead a reader from one element to another. Our main goals are to make the website look simple and uncluttered and to deliver information that our readers will enjoy and appreciate.
In pre-experimental research design, either a group or various dependent groups are observed for the effect of the application of an independent variable which is presumed to cause change. It is the simplest form of experimental research design and is treated with no control group.
White space is key You may not think so but white space makes your CV far more readable and engaging. This is because the human eye needs space to really focus on something; it prefers a clear periphery. White space makes your paragraphs, headings and bullet points stand out and seem more prominent.
Whitespace (also called negative space) is the area between the elements on a web page (or physical page). These elements typically are images, typography, and icons. It is often used to balance elements on a page by creating a natural flow for the user to navigate through the content.
There is an annual IEEE conference titled the International Conference on Program Comprehension (ICPC) which often has experimental studies on program comprehension. The most relevant that I found from the past three years are:
An Eye Tracking Study on camelCase and under_score Identifier Styles "While results indicate no difference in accuracy between the two styles, subjects recognize identifiers in the underscore style more quickly."
To camelcase or under_score "Results indicate that camel casing leads to higher accuracy among all subjects regardless of training, and those trained in camel casing are able to recognize identifiers in the camel case style faster than identifiers in the underscore style."
In addition to the computer-science specific cognitive literature, there are studies about online and hypertext reading:
[Chaparro, 2005] Reading Online Text with a Poor Layout: Is Performance Worse? by Barbara S. Chaparro, A. Dawn Shaikh, & J. Ryan Baker, Usability News, Volume 7, Issue 1, February 2005.
[Lin, 2004] Evaluating older adults' retention in hypertext perusal: impacts of presentation media as a function of text topology by Dyi-Yih Michael Lin in "Computers in Human Behavior", Volume 20, Issue 4, July 2004, Pages 491-503. Available from ScienceDirect
Cognitive load in hypertext reading: A review by Diana DeStefano and Jo-Anne LeFevre.
These papers less directly address the question, but I mention them in hopes that they provide some context. The first two references were found thanks Michael Suodenjoki's blog post entitled White space matters in program source code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With