One of the most important aspects of software is it’s quality. In fact, improving the quality is an integral part of any process improvement initiative. However, as with many other things, quality is better understood and effective if we can express that in terms of quantitative metrics as appose to qualitative measures. If you have followed even a basic computer science program, you may have learnt an array of such metrics. How ever, accurately calculating these metrics was not possible without using specially designed tools. Fortunately, Visual Studio had this capability for some time, but with Visual Studio 2010, the metrics calculation has greatly improved. For instance, the VS2010 even consider complex code blocks such as
try..catch and
switch when calculating the code metrics.
Calculating Code Metrics
Calculating code metrics in VS2010 is pretty straightforward. If you want to calculate code metrics for the entire solution, you may right-click the solution and select “
Calculate Code Metrics” from the context menu. If you just need to calculate metrics for a given project, just right-click that project and select Calculate Code Metrics.
Figure: Solution Context Menu