The tag has no usage guidance.

learn more… | top users | synonyms

310
votes
6answers
19k views

What is negative code?

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?
47
votes
10answers
9k views

How can I quantify the amount of technical debt that exists in a project?

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 ...
26
votes
2answers
5k views

Are There Metrics For Cohesion And Coupling?

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?
15
votes
4answers
3k views

Source code metrics for measuring code stability?

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 ...
11
votes
3answers
2k views

Experiments correlating code metrics to bug density

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 ...
8
votes
2answers
3k views

How is technical debt best measured? What metric(s) are most useful? [duplicate]

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 ...
7
votes
3answers
2k views

Does it make sense to compute cyclomatic complexity/lines of code ratio?

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 ...
5
votes
2answers
87 views

How to calculate Cyclomatic Complexity exactly?

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 ...
4
votes
4answers
1k views

Is measuring the binary size of a c++ program a good indication of code complexity? Or something else?

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 ...
4
votes
3answers
334 views

Codebase Analysis of Trends over Time

I've looked around for a solution (preferably not hosted, something I can run locally) to do static analysis of a codebase over time for things like SLOC, Complexity, authors, commits, etc. It has to ...
4
votes
1answer
2k views

What does the “4” in LCOM4 mean?

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 ...
3
votes
2answers
175 views

Why in cyclomatic complexity we add 1 for operators within a condition?

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... ...
3
votes
2answers
213 views

Strategies for using a code metric evaluation tool

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 ...
2
votes
2answers
159 views

According to software engineering which method are too long? [closed]

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 ...
1
vote
2answers
579 views

Relation between “ lines of the longest working program ” in a language and familiarity with it? [closed]

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 ...
1
vote
1answer
60 views

how to measure defects per KLOC

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 ...
1
vote
1answer
211 views

Estimated errors in implementation comparison

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 ...
1
vote
0answers
72 views

WMC Calculation in CK Metrics Suite

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 ...
0
votes
4answers
350 views

Are there metrics, like in other professions, that can be used to measure whether a programmer is considered experienced? [closed]

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 ...
0
votes
2answers
196 views

Finding metrics for development time in different languages [closed]

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 ...
0
votes
0answers
31 views

What is the common practice of calculating average length of identifiers

Quoted from Ian Sommerville's Software Engineering(9th ed), page 673: This is a measure of the average length of identifiers (names for variables, classes, methods, etc.) in a program. The ...
0
votes
3answers
378 views

Is the number of bugs in a section of code proportional to the # of lines ? The square of the # of lines ?

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 ...