Are there any eye tracking case studies, or similar research done to verify what code format is easiest to read, maintain and work with.
I always format my code this way.
function thing()
{
if(something)
{
// do something
}
else
{
// do something else
}
}
But, I never see this followed elsewhere. In most APIs or open source projects it's done like this.
function thing() {
if(something) {
// do something
} else {
// do something else
}
}
Can you provide an answer that is not based upon your personal preference, but is supported by research or some kind of fact?
Has there been any visual eye scanning studies done to confirm which format is best?