Les said:
I think it's possible to develop
reasonably objective, nonrandom standards of readability.
I think that it's possible to develop several of them.
Take a look at the indent man page:
http://www.cs.umbc.edu/cgi-bin/man-cgi?indent
Look for the COMMON STYLES header.
But some things done in the name of readability
fly in the face of prohibitions against early return,
some formatting conventions.
You probably need to distinguish
between *coding* styles and *programming* styles.
Coding styles are adequately handled by a program like indent
which will reformat your code for you.
Any attempt to impose a particular coding style is pure mischief.
You should develop or adopt a coding style and -- stick to it!
Consistency is most important in your coding style.
It will help you spot mistakes.
If other programmers need to read, understand and maintain your code,
they will quickly become accustomed to your style
or they will reformat it with indent.
Programming style, on the other hand, is something much more serious.
It's about nothing less than good programming practice --
developing good programming habits and avoiding bad programming habits.
For C programmers, it's about [self]discipline.
Good C programmers try to get their compiler to detect bugs for them.
They also include assertions to help them trap bugs at run time.
They use const to make their code easier for other programmers
to analyze. They avoid global and static variables.
They pass by value or const reference so that other programmers
need not be concerned about whether or not a function call modifies
its actual arguments. etc.