Hi
I just started working for a large company. in a recent internal audit, measuring metrics such as Cyclomatic complexity and file sizes it turned out that several modules including the one owned by my team have a very high index. so in the last week we have been all concentrating on lowering these indexes for our code. by re...
What is the prefered score range for the code metrics calculation for the following
Maintainability Index
Cyclomatic Complexity
Depth of Inheritance
class Coupling
...
Which metrics are there and which tools exist to measure the SOLIDness of C# code? Or tools to indicate where the principles are violated most harmfully?
...
How to get code complexity metrics for a program?
well i wanted to create a program that check and score a code on how complex it is for example how many loop, if statements, if there is any nested loops etc. so for example a code with no loops, or if staement is not complicated.
EDIT: note that this question is about code complexity, ...
Hi
I have to submit a paper about the usage of source code metrics in software engineering processes. I thought it would be nice to start by introducing some categorization of source code metrics (for example using plane LOC count Vs doing some static analysis of the code) , but I can't find a book or article that will present the dif...
I was looking at some code length metrics other than Lines of Code. Something that Source Monitor reports is statements. This seemed like a valuable thing to know, but the way Source Monitor counted some things seemed unintuitive. For example, a for statement is one statement, even though it contains a variable definition, a condition, a...
I'm dusting off an old project of mine which calculates a number of simple metrics about large software projects. One of the metrics is the length of files/classes/methods. Currently my code "guesses" where class/method boundaries are based on a very crude algorithm (traverse the file, maintaining a "current depth" and adjusting it whe...
Is there a metric that can assist in determining the object-orientedness of a system or application? I've seen some pretty neat metrics in the .NET Reflector Add-ins codeplex project, but nothing like this yet. If such a metric doesn't exist, would it even be possible or useful? There are the 3 supposed tenets of object-oriented programm...
I would be appreciative if someone could explain to me the difference between the following two pieces of code in terms of Visual Studio's Code Metrics rules. Why does the Maintainability Index increase slightly if I don't encapsulate everything within using ( )?
Sample 1 (MI score of 71)
public static String Sha1(String plainText)
{
...
I've heard people say (although I can't recall who in particular) that the number of bugs per line of code is roughly constant regardless of what language is used. What is the research that backs this up?
Edited to add: I don't have access to it, but apparently the authors of this paper
"asked the question whether the number of bugs pe...
Hi there!
As a person who loves to follow the best practices,
If i run code metrics (right click on project name in solution explorer and select "Calculate Code Metrics" - Visual Studio 2010) on:
public static string GetFormFactor(int number)
{
string formFactor = string.Empty;
switch (number)
{
...
http://docs.codehaus.org/display/SONAR/Metric+definitions
how can i use metrics in sonar? Is there any plugin for all this metrics?
here are plugins but not for all metrics:
http://docs.codehaus.org/display/SONAR/Sonar+Plugin+Library/
...
I'm reading xUnit Test Patterns by Gerard Meszaros.
On one of the pages he refers to some software metrics:
While the need to wrap lines to keep
them at 65 characters makes this code
look even longer than it really is, it
is still unnecessarily long. It
contains 25 executable statements
including initialized declarations...
Hello!
In particular, I am interested to know how many lines of codes there are, but this spans across many files.
I have been using notepad++ to author the code and for each file it does display line numbers but of course I have empty returns to make the code more readable.
Does anyone know of a plugin or tool that I can accurately g...
Are there any good code measuring tools available?
I found code measure pretty useful and interesting, but I don't think I can pay $1K/year for just using the measuring tool.
I imagine there might be a tool that is/can
open source software
language independent
OS independent
measure the metrics from different categories : LOC, LOC ...
In Windows Forms, C#, .NET 3.5, VS2008...
What's a good way to isolate the code for a MenuStrip (or any complex control group), and it's child menu items, from the rest of my form?
For example, when I have a MenuStrip with a number of menus and each menu has a number of menu items, which all have click events, a ton of code is spewed i...
I am using code complexity metric, and line of code(per function).
This keeping the code short and readable.
What code metrics you using?
...
Has anyone found a Metric Shader type plugin for VS 2010? I was using a really good one in VS 2008 that is a plugin for Dev Express DXCore:
Metric Shader
But it doesn't work in VS 2010. I found this to be a tremendously handy tool while refactoring and would really like it 2010.
Thanks!
...
I'm principally interested in case studies on code metrics, relating code readability to defect reduction, that justify taking seriously cyclomatic complexity or some similar metric. Wikipedia has this example:
A number of studies have investigated
cyclomatic complexity's correlation to
the number of defects contained in a
mod...
I'd like to extend the 2010 static code analysis metrics (mostly fix it so the rollup is max instead of sum). Where is the extensibility point? Is it an MEF component somewhere?
...