3 ms·
I haven't seen any code quality metrics that were worth anything. The most popular is cyclomatic complexity. You can also simply count lines of code and get a s
by jdlshore 12y ago
I haven't seen any code quality metrics that were worth anything. The most popular is cyclomatic complexity. You can also simply count lines of code and get a similar result for most real-world code.
The problem with these metrics is that they only detect bad code, and they're not very sensitive. In other words, a good score doesn't mean your code is good; it just means it's not hideous. They don't tell you anything that isn't obvious just by looking.
You're better off using collective ownership and pair programming or code reviews if you're interested in improving your skills.
Edit The issue is that "code quality," once you're past the novice level, is really about design. It's about how maintainable and understandable your entire system is to humans. It's very subjective and context-sensitive, and it's the kind of judgment question computers are bad at.