Quote:
Originally Posted by adios
The standard on readability is what exactly? It is pretty much subjective in my view.
Quote:
Originally Posted by ChrisV
Readability is obviously subjective, that doesnt make it not a thing that matters.
This is something that's worth thinking about. I think "subjective" gets thrown around too easily to describe anything where there isn't 100% consensus or where personal taste plays
some role. It seems so obviously true, in a way. Is that painting, that novel, that movie good? Well, it's subjective....
It avoids arguments and makes everyone feel validated. The problem is, it's not true in a meaningful sense. At least, not in the same sense that it's "subjective" to think tomatoes taste good or bad.
Whether is a piece of writing (or snippet of code) is clear and readable is not subjective that in way. Human cognition works according to rules (rules that are more slippery and flexible than the kind we program, but rules nonetheless). When something seems readable to you, it's not merely your idiosyncratic coder taste buds that are at play.
More to the point, the question can be studied empirically. You can poll programmers and ask them to compare two pieces of code. You can restrict your subjects to only programmers with 10+ years of experience, or to only novices. You can use all sorts of other metrics -- eye-tracking, time it takes to find the source of some bug, etc. Unless you believe that such experiments would rarely result in majority consensus, you shouldn't dismiss readability as "subjective."
If you do, you'll never look for the patterns and rules that govern your reaction, or the reactions of others. You'll never try to separate essential complexity from cosmetic. Maybe you'll put things like 5 level deep nesting into the same bucket as "snake case vs camel case" -- all nothing more than "subjective" decisions of style.