Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I know it's almost impossible to define and/or measure code quality. Instead of trying to measure it I would like to survey the other developers to see how they perceive the current quality of the code. I would like to stress that I want each developers opinion of the code, not a statistical measure of it.

I'm thinking of asking them to rate the code in a few categories like maintainability, consistency, and stability. In addition I'd like to ask them what they think is going well and what they think needs the most improvement.

Is this an effective way to get a perception of the code base from the other developers? Am I asking the correct questions? Will this provide useful information or is a useless exercise?

share|improve this question

migrated from stackoverflow.com May 10 '11 at 11:40

This question came from our site for professional and enthusiast programmers.

"Will this provide useful information"? What do you think you're going to do with the information? What's your goal? "Useful" depends entirely on the purpose you have in mind. –  S.Lott May 10 '11 at 2:50
I'm inclined to think that a benchmarking of the code base may be a pointless exercise without also looking at user feedback on the functionality of it. –  temptar May 10 '11 at 12:26
@S.Lott The goal is to ultimately improve the code. We've started a bunch of initiatives to improve the code and I want to make sure we're getting somewhere. I could imagine asking the same questions periodically to check that quality is actually improving or to find new weaknesses. @temptar I already have a user on the team that provides lots of feed back. The thing I don't have is what other developers think of it. The user may think everything is great but developers may dread working on it. –  brainimus May 10 '11 at 12:55
@brainimus: "improve the code"? What does this mean? That seems too vague to form the basis for any kind of data gathering. What's you real goal? It helps to be explicit. You can only improve the factors you actually define. Can you define some kind of goal? S pecific M easurable A ttainable R ealisable T raceable helps a lot here. –  S.Lott May 10 '11 at 13:03
@S.Lott Good point, I should have been clearer on this originally. I want to use the survey to help define the goals. I may think they code is consistent but others that have are more familiar in different parts may disagree. If there is an agreement that it isn't consistent I know we should focus on that otherwise we can focus on areas that need improvement. –  brainimus May 10 '11 at 13:19

2 Answers 2

I know it's almost impossible to define and/or measure code quality.

Sorry, but this is kind of a ridiculous statement. From a quality management perspective there are all sorts of metrics that are indicative of code quality. Any good development method will define several of them. They don't all work in every situation perhaps, or sometimes aren't usable on a project, but to wholly discount valid quality metrics is simply wrong.

Taking the approach by asking opinions about the code is perhaps a good way for programmers to rate each other, but it will be highly subjective. In particular, less experience developers will often not have the framework to understand the code written by more experience developers. On the same hand, the senior guys are so entrenched in their ways they see only what they do as good.

Asking a whole team about quality is likely a useless exercise. If you can isolate 1 or 2 keys developers that you wholly trust, their opinion on the code might mean something. Of course, you must base that trust on something real, so you're back to some kind of objective metrics.

share|improve this answer
The problem with metrics is most (if not all) can be gamed to suit a given person's agenda. A metric like "are all the methods commented" could say yes with comments like "This method does stuff". I want to know if they are commented well; I want a human perspective of the code (more specifically from the types of developers that work on the code). –  brainimus May 10 '11 at 13:14
Again, that isn't true. A metric like "are all the methods commented" is a shitty metric. Look outside the programmer realm into business metrics and you'll find valuable ones that can't be gamed by one team. Metrics such as "support calls last release", "number of failures", etc. Code quality can't be measured in isolation. –  edA-qa mort-ora-y May 10 '11 at 13:25
Ahhh... I see where you're going with now. I have some of these and I'm looking for the deficiencies in code that cause these hence the maintainability, consistency and stability examples. I'm thinking along the lines of what do we need to focus on in the code to have less failures and calls. I already have data from the users and testers but I don't have much useful stuff from the developers. –  brainimus May 10 '11 at 13:58
If you have useful data from users/testers you already have half the work done. Plus you have something concrete to consider. Get the developers to look at those reported issues and determine how you can avoid such issues in the future. From there you'll build coding guidelines. Once you have guidelines you could then get what you want by measuring the code against those guidelines. –  edA-qa mort-ora-y May 10 '11 at 14:13

It's sounds effective to get their opinions on the code base and devise an action plan based on them. I'd review the plan regulary because opinions and circumstances change.

I personally wouldn't call it a survey. It sounds a bit formal to me.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.