Ask any development manager how their coding practices stand up against “average” and they will likely say, “Sure, there are things we could improve, but we are as good as (or better than) average.”

This response is known as the Lake Wobegon effect, after the fictional town in the Garrison Keillor radio series A Prairie Home Companion where, he opined, “all the children are above average.”

A 2005 article in the New York Times found when investigating an online dating service that only one percent (1%) of the population admitted to having “less than average” looks.
A Prairie Home Companion
Funny and interesting, but what does it mean about your code?

Psychologists tell us that, especially in areas we consider important, we have poor skills at “comparative ability.” If tasks are important to us - whether we consider them easy or difficult – we respond with empirically illogical numbers: 75% - 90% of us claim to be “above average”.

This, of course, is especially true with subjective measurements. Asking someone how good-looking they are is a different exercise than asking how their weight compares with others who are the same height – especially if you first provide them with a scale and an actuarial chart of average weights.

As we self-evaluate our own capabilities in the important area of code (and code quality), we must recognize our own vulnerability to the Lake Wobegon effect. A great way to accomplish this is to move from the subjective to the objective.

Analysis of cyclomatic complexity, code duplication, code dependency and test coverage are objective measures that can provide meaningful, actionable information about how well our coding practices actually work. Without an objective score, you cannot measure your progress. And, as Bill Hewlett (HP) stated, “You cannot manage what you cannot measure.”

Once you have objective measures, seek out comparables within your organization and/or your industry to see how you truly fare against relevant averages.

But the real value is not in actual comparables, it is in avoiding the negative impact of our own common weakness of comparative ability and transforming our self-analysis from the subjective world to objective measure.

For the record, I don’t think you’re ugly. And, for those of you who are even more offended by the latter statement (you know who you are), I don’t think your code is ugly either.