4 ms·
Many if not most developers have the same feeling, that "bad code" is objectively bad. And how nice it would be if code quality could be graded on a scale. But
by MortenK 13y ago
Many if not most developers have the same feeling, that "bad code" is objectively bad. And how nice it would be if code quality could be graded on a scale. But it really can't - one mans "elegant" is another's "over-engineered". And one mans "simple" is another's "crude".
My perception of "beauty" is the simplest code that could possibly work, with the lowest possible levels of abstraction. I like YAGNI and similar principles. That's a pretty vague formulation though, so while most can probably agree on a high level, the devil is in the details. What exactly is "simple code" for example? Short code? Easy to read? Flexible? All of the above (that'd require Carmack or Thorvalds)? It really is all in the eye of the developer.
I think the takeaway of this excellent article is that whatever your style is, do have respect for differing styles. Don't grade developers or code on what you intuitively feel. Don't assume that everybody else is an idiot and finally don't waste time on debating / enforcing the one true way of doing things.