CAST’s recently released “Worldwide Application Software Quality Study” is the first study to give real numbers, based on a good amount of data, to code quality. This is a notoriously difficult problem to address given the millions of lines of code most applications have. They do a very admirable job of not going too far in their assumptions; but also delivering valuable results.
A key finding for me was that code quality does not go down with increasing lines of code (p. 10); unless you are using COBOL. Thankfully I don’t :). What did cause code quality to go down in modern languages (Java, .Net, etc.) was module fan-out. It seems that David Parnas’ theory of modularity has won out in modern languages; as it is encouraged in the language design. But this has produced the un-intended consequence of developers creating too many complex dependencies between modules.
The study also puts a price tag on maintaining code that all bean-counters will love. But is also gives real research for developers to point to for getting more time and money to re-factor code. I highly recommend this study.