I was chatting at the office last week about code quality, and thought I would jot down some of the things we talked about. I think it is fair to say that it is difficult to know when code is “good” and when it is “bad.” There are of course obvious times when the coder was incompetent, or cut corners with little explanation.
Ignoring those types of issues, judging code is difficult because we do not understand the reality of when the code was written. Was the code written with an extreme deadline? Was it built with a clear expectation of being prototype code and then put into production by some aggressive manager? Was the architecture changed multiple times without time to rewrite / refactor?
In addition to not understanding the actual circumstances around the time of original development, developing perfect code is expensive and there is a point where we all need to ship our imperfect code and move on. Only a really rich, somewhat misguided, client would pay for the real amount of time to develop perfect code. And of course, we have to understand that much of our feelings toward code come back to style and preference, and not everyone has the same approach to these items.
So, let’s all try and buck the tradition of bashing the last guy’s code, and when there are real issues that need to be addressed then please approach them gracefully. Remember, someone will be following you soon too!








