Top "Readability" questions

Readability is a subjective parameter used to measure an aspect of code quality.

Is "for(;;)" faster than "while (TRUE)"? If not, why do people use it?

for (;;) { //Something to be done repeatedly } I have seen this sort of thing used a lot, but I think it …

c++ c optimization readability infinite-loop
Using explicitly numbered repetition instead of question mark, star and plus

I've seen regex patterns that use explicitly numbered repetition instead of ?, * and +, i.e.: Explicit Shorthand (something){0,1} (something)? (something){1} (something) (…

regex readability repeat
Should one use < or <= in a for loop

If you had to iterate through a loop 7 times, would you use: for (int i = 0; i < 7; i++) or: for (…

performance conventions readability
What is the best color combination for readability, easy of use, and reduced eye strain?

I am trying to pick out the optimal set of colors for a new website project. I want to do …

colors usability readability color-scheme
Python: if not val, vs if val is None

I've always coded in the style of if not value, however, a few guides have brought to my attention that …

python comparison boolean readability
StringBuilder/StringBuffer vs. "+" Operator

I'm reading "Better, Faster, Lighter Java" (by Bruce Tate and Justin Gehtland) and am familiar with the readability requirements in …

java performance readability
Optimal tab size for code readability

Personal preferences aside, is there an optimal tab size (2 spaces? 3 spaces? 8 spaces?) for code readability? In the different projects I've …

python readability
How do I calculate the "median of five" in C#?

The median of five is sometimes used as an exercise in algorithm design and is known to be computable using …

c# algorithm readability median
"public static" or "static public"?

A minor point about function declaration keywords in PHP: If you've got a class method that's static, should the static …

php oop readability public-method
What color scheme is best for sunlight readability?

With screen types aside (backlit LCD, OLED, matte, glossy, etc...), what color scheme provides the most readability in direct sunlight? …

readability color-scheme