Originally posted by Iv�n P�rraga:
Hi,
One possible way to measure the quality of the software is to have as much as possible automated metrics using tools such as FindBugs, PMD, Checkstyle, Simian, Cobertura, etc. They provide fast feedback and give an overall perception of what the quality of the code is. In fact, in some organization these metrics are used to evaluate how good a project (or a developer) is.
Do you think this is a good approach? Do you think the use os these automated tools is enough to measure code quality? If not, what is your proposal to detect bad quality code taking into account some of the pressures of our industry such as time pressure?
Cheers,
Iv�n
I think there are some very good metrics to follow. Cyclomatic complexity should be kept to a minimum. Method size, and class size should be small. You can read my PPP book (
http://tinyurl.com/5ebk7h) for some of the dependency metrics that I like to use.
...However, metrics are a carving knife when what you really need is a scalpel. Metrics can tell you something is wrong, but they can't give you much guidance about the precise cause. In the case of clean code, the cause is discipline and professionalism (or it's lack). Fixing that problem is a matter of instilling pride of workmanship into the team.