Saturday, April 12, 2008

Code metrics in Visual Studio 2008

MSDN blog entry about code metrics in Visual Studio 2008

Some other blogs have commented about this already. For example, here is an entry from a guy in Russia.

The blogger warns about problems with the lines of code metric. I was just reading Code Complete about the topic. The guideline given there is to limit the number of lines of code per routine to around one screen or one or two pages of program listing, or about 50 to 150 lines. He warns against routines longer than 200 lines and notes that there has been some inconclusive research on the quality of routines less than 200 lines. I've also heard of another guideline that an entire class should be less than 300 lines.

1 comment:

Anonymous said...

Well said.