Skip to main content

Questions tagged [code-metrics]

Filter by
Sorted by
Tagged with
1 vote
1 answer
157 views

I am using TypeScript with classes, interfaces and polymorphism. A large portion of my project is basically a functional TypeScript-based DSL (domain specific language) that can be used to configure ...
damix911's user avatar
  • 119
7 votes
6 answers
565 views

In large systems there are often code paths that modify state or produce side effects that other code comes to depend on. This makes it hard to safely change code without understanding the whole ...
Sam's user avatar
  • 471
0 votes
3 answers
373 views

Having fewer lines of code per feature is typically better as it increases the developer productivity. Did anyone ever measure the number of code lines executions per line of code across multiple ...
Sebastian Wagner's user avatar
1 vote
1 answer
222 views

I'm looking for a code metric for monitor and track over time the size of several projects and their components. Also, I would like to use it for: evaluate size reduction after refactoring compare ...
Guish's user avatar
  • 23
-1 votes
1 answer
581 views

Can anybody point me to the official source where it is explained what are operators and operands in Halstead Metrics for code, I would prefer the original paper by Halstead. Please don't post the ...
Prashant's user avatar
4 votes
2 answers
2k views

Is the sum of the cyclomatic complexity of all section in a file the total cyclomatic complexity for this file? If it is, is the sum of a set of related files the total cyclomatic complexity for this ...
cervh's user avatar
  • 83
1 vote
2 answers
216 views

A few years ago I was using Sonar (before it was SonarQube) to analyze some Java code, and I remember seeing a useful metric that would come in handy again today. However it does not appear to be ...
Jim Kiley's user avatar
  • 191
0 votes
4 answers
761 views

By these days I work in a legacy code that uses JAVA. The project has a code tightly coupled and low cohesion. All my teammates suffer to make changes in the software, one reason is that we haven't ...
Lucas Fantacucci's user avatar
0 votes
2 answers
2k views

Is there something that ratio of the metrics LOC and Sum Cyclomatic Complexity in a project with many modules can talk about? Does it show the logical complexity of a module/project?
Christy Wald's user avatar
0 votes
2 answers
1k views

Occasionally I look at the code metrics in visual studio for my solution. I don't ever see anything I would find alarming. My maintainability is usually pretty high with exception to some obvious ...
Shelby115's user avatar
  • 475
2 votes
1 answer
5k views

I have been reading on the internet about the metric "number of bugs per 1000 lines of code" and what would be a good number. However, I wonder how someone would compute such a metric? The reason a ...
icehawk's user avatar
  • 183
6 votes
3 answers
7k views

My question is more about the transformation from programming code to control flow graph. Say, I have a piece of code: public class Contractor { // other member fields... private bool ...
VincentZHANG's user avatar
2 votes
1 answer
5k views

I have two classes C1 and C2. C1 has 2 methods and C2 has 3 methods each of complexity value 1. C2 inherits from C1. So, I know C2 has 2+3=5 methods in all. The question is, should I take C2 to have 5 ...
omeganebula's user avatar
7 votes
5 answers
4k views

In my company we have this obligatory practice before a review to be send the binary size impact of the code change to be measured and provided. We must use -Os for this metric to avoid ...
gsf's user avatar
  • 274
3 votes
2 answers
2k views

I know that basically, CC can be computed as number of decision + 1. In addition, every logical operator in the condition causes CC to increase by 1. But why? Having the code if(A || B || C) else... ...
user144171's user avatar
0 votes
2 answers
318 views

I'm trying to determine if a language I'm investigating (Groovy) is better for developing enterprise applications than our current language (Java). Specifically I'm trying to figure out if it will ...
Jae Carr's user avatar
  • 231
2 votes
2 answers
256 views

I was just working with a method of about 70 lines of code developed by others. It uses a very nice pattern structure, stuff like IOC container, but I wonder.. The method is too long? Is it a so long ...
M.F05051985's user avatar
0 votes
4 answers
531 views

Driving instructors (at leas in Germany) often mention 100.000 km driven as a reference point where a driver is considered experienced. Is there a similar number for programmers? For example, how many ...
Tim Bodeit's user avatar
1 vote
2 answers
3k views

In some computer master program online application, it says: Please list the programming languages in which you have written programs. For each language, indicate the length in lines of the ...
Tim's user avatar
  • 5,565
1 vote
1 answer
295 views

I've been working on improving an existing library to be more maintainable after trying to implement a feature I wanted and found the code to be hard to alter. The library is a node.js grunt plugin ...
Jacob's user avatar
  • 189
6 votes
1 answer
5k views

I know that methods in a class should have high cohesion which roughly translates to having all the methods use all the instance variables directly or indirectly. I know that LCOM4 (Lack of cohesion)...
Geek's user avatar
  • 5,217
4 votes
2 answers
277 views

Should code quality metric evaluation tools like Sonar be integrated with IDE for running local analysis or should they be a part of the build process (like integrated with maven) for continuous ...
Geek's user avatar
  • 5,217
19 votes
4 answers
6k views

Considering how software is developed during a release cycle (implementation, testing, bug fixing, release) I was thinking that one should be able to see some pattern in the lines of code that are ...
Giorgio's user avatar
  • 19.8k
0 votes
3 answers
1k views

Are there any studies that aggregate data over a wide population of contributed code, that establish a correlation between amount of code written in a commit and the # of bugs discovered in that code ?...
Dean Radcliffe's user avatar
10 votes
2 answers
5k views

Possible Duplicate: How can I quantify the amount of technical debt that exists in a project? If I wanted to help a customer understand the degree of technical debt in his application, what would ...
throp's user avatar
  • 209
36 votes
2 answers
18k views

Is there a metric analogous to the McCabe Complexity measure to measure how cohesive a routine is and also how loosely (or tightly) coupled the routine is to other code in the same code base?
Onorio Catenacci's user avatar
23 votes
4 answers
5k views

I'm wondering if someone has done some experiments correlating code metrics (SLOC, Cyclomatic Complexity, etc) with bug density in Object Oriented applications. I'm not looking for experiments that ...
Augusto's user avatar
  • 1,032
74 votes
12 answers
20k views

Does anyone know if there is some kind of tool to put a number on technical debt of a code base, as a kind of code metric? If not, is anyone aware of an algorithm or set of heuristics for it? If ...
Erik Dietrich's user avatar
17 votes
3 answers
554 views

I've been studying cyclomatic complexity (McCabe) and reachability of software at uni recently. Today my lecturer said that there's no correlation between the two metrics, but is this really the case? ...
Saladin Akara's user avatar
11 votes
4 answers
4k views

In general, maintainability index relies on many factors. For example, in Visual Studio, it rely on cyclomatic complexity, depth of inheritance, class coupling and lines of code; those four values ...
Arseni Mourzenko's user avatar
351 votes
6 answers
30k views

I was reading the Wikipedia article on Douglas McIlroy and found a quote that mentions "The real hero of programming is the one who writes negative code." What does that mean?
user avatar