Skip to main content
65 votes

Are there known valid uses of SLOC to measure productivity?

The argument of the senior architect could mean two things. It may mean that an average developer in the company produces more lines of code when using static languages than when using dynamic ones. ...
Arseni Mourzenko's user avatar
26 votes

Are there known valid uses of SLOC to measure productivity?

About productivity and SLOC The problem with SLOC The problem with the SLOC metric is that it measures an approximation of the quantity of code written, without taking into account: the quality of ...
Christophe's user avatar
  • 78.4k
23 votes

How do you know if software is good or bad based upon empirical metrics?

You don't. Software quality is really hard to measure objectively. Hard enough that there isn't a solution. I'm refraining in this answer to dabble on the question whether there can be a solution at ...
Frank's user avatar
  • 14.4k
19 votes

Does Code Coverage improve code quality?

Code coverage tells you how much of your code is covered by tests. It does not tell you much about the quality of the tests. For example, a code coverage of, say, 70% might be obtained by automated ...
Giorgio's user avatar
  • 19.7k
18 votes
Accepted

How to quantify Code Quality

At this point I want to want to device strategies to reward good code. You cannot. Goodhart's Law will quickly come into play, and your objective metrics will become the things that your developers ...
Telastyn's user avatar
  • 109k
13 votes

How do you know if software is good or bad based upon empirical metrics?

Yes, you can tell the code has quality problems by looking at metrics to some degree. More specifically, run a complexity analysis tool on the code base and you will get an idea of whether the ...
Jon Raynor's user avatar
  • 11.6k
13 votes
Accepted

Does Code Coverage improve code quality?

I'm assuming you are referring to a Code Coverage metric in the context of unit testing. If so, I think you indirectly have already answered your question here: First project just used targeted ...
Marcin Kłopotek's user avatar
13 votes

Does Code Coverage improve code quality?

As a reductio ad absurdum: the following test covers 60% of the lines of the function: def abs(x): if x < 0: return -x else: return x assertEquals(abs(-10), 10) whereas ...
RemcoGerlich's user avatar
  • 3,310
12 votes

Instability metric vs Dependency Injection

DI just makes dependencies explicit and configurable at run time, but it does not change the number and kind of dependencies - at least not directly. For example, when a class delegates persistence to ...
Doc Brown's user avatar
  • 209k
11 votes

How to quantify Code Quality

Basics There are many ways to measure quality. None of them are perfect: if start thinking in absolute terms, you can create new problems. Here are a few metrics that are commonly used: Cyclomatic ...
JimmyJames's user avatar
  • 27.5k
10 votes
Accepted

What would be a good metric of quality of a single bug fix?

If there was a metric to quantify a bugfix, including accounting that "it might result in even more bugs in the future", we would logically be able to use this metric during initial ...
Flater's user avatar
  • 52.5k
8 votes

How to quantify Code Quality

Visibility It's important that all code base is shared and visible to the team. Promote peer-review. Promote pair programing. Use a static code analyzer, this tools are configurable and come with a ...
Tulains Córdova's user avatar
7 votes

Are there known valid uses of SLOC to measure productivity?

Here is a counterexample for your senior architect: Suppose I want to write a hierarchy of three classes, two of which derive from the third, implementing some virtual functions that the base class ...
cmaster - reinstate monica's user avatar
7 votes

Definition of "Current Task Estimate"

Where did you get this definition from? I'm reading this definition from the chapter "Estimate your work", which doesn't include done work.
jessehouwing's user avatar
  • 1,044
7 votes

Automating checks for "good" unit tests

Your characteristics of unit tests are missing some of important features in my opinion: Reflects and traceable to requirements Tests all of the requirements for that unit under test Covers all ...
Steve Barnes's user avatar
  • 5,310
7 votes

Are there known valid uses of SLOC to measure productivity?

I'll be the contrarian. We track SLoC at our job (although we don't use it directly in staffing decisions), and I've had people argue what most people are saying in their answers. In effect, "LoC ...
Conor Mancone's user avatar
7 votes

Where did the quote or study of developers write 10 lines of code per day come from?

In Brooks' MMM, he tackles the issue in chapter 8, "Calling the Shot". He doesn't explicitly say "10 lines a day" so far as I can see, but it's apparent from the various data he ...
Steve's user avatar
  • 9,012
6 votes

Are there known valid uses of SLOC to measure productivity?

Though I’m jumping on the bandwagon. I think the impact on the behavior of programmers needs to be highlighted. Using SLOC as a measure for productive has a toxic effect on programmer morale. The ...
Nath's user avatar
  • 240
6 votes

Can story points be used to describe size of several projects estimated by several teams?

Assuming a common reference of story point size that seems reasonable. However generally story points are a per team concept and can't be used across teams like that.
Sign's user avatar
  • 2,683
5 votes
Accepted

What is the meaning of a metric for 'year-over-year commits' for a given project?

They are using the metric of year-over-year commits to assess the health of a given open source project. They are looking at the most recent 12 months and comparing the number of commits to the number ...
Thomas Owens's user avatar
  • 83.3k
5 votes
Accepted

Automating checks for "good" unit tests

Lets sort your properties by ease of automated checking: Fast - Most IDE's already tell you this Short - Your line count tells you this (so long as you don't abuse white space) Repeatable - Rerunning ...
candied_orange's user avatar
5 votes
Accepted

Is the following method to compare source codes or work effort reliable?

The basic idea of this method is to count the number of methods instead of the code-lines. Well here's your problem. The reason LOC counting doesn't work is because a programmer can spend days ...
candied_orange's user avatar
5 votes

Is using KLOC just to normalize size of projects still bad?

The answer to this question will depend on your coding standards. The stricter they are, the less variation there can be in code produced by two developers, thus the closer the KLOC count will be for ...
David Arno's user avatar
  • 39.3k
4 votes
Accepted

Trying to get a better understanding of the definition of measurement

what does it mean by "clearly defined rules"? It means rules that are clearly defined. For example, Source Lines of Code can be defined as physical lines of code (the number of lines separated by a ...
Robert Harvey's user avatar
4 votes

Automating checks for "good" unit tests

As already mentioned, a good test fails when the system under test experiences "breaking" changes. To automatically evaluate new unit tests based on above criteria you could try to implement mutation ...
Daniel Jour's user avatar
4 votes
Accepted

Does Defect density measure QA or DEV effectiveness?

I have read that it measures the effectiveness of QA but I do not get it It is surely a good idea to take any such statement about metrics with a grain of salt. The only way I can think of to use the ...
Doc Brown's user avatar
  • 209k
4 votes

How to quantify Code Quality

BLUF: Use whatever tools you can to measure and improve quality, but understand their limitations. In your example scenarios, it appears you need some standards for peer reviews. Quality is by ...
Berin Loritsch's user avatar
4 votes

Where did the quote or study of developers write 10 lines of code per day come from?

OK I think it comes from The Mythical Man Month, page 4, The Tar Pit And every programmer is prepared to believe such tales, for he knows that he could build any program much faster than the 1000 ...
Ewan's user avatar
  • 77k
3 votes

Source Code Character Count Metric / Acronym?

There is such a metric - character count - and Stack Exchange has an entire site dedicated to it: Programming Puzzles & Code Golf. Golfing can be a lot of fun, but it's not overly useful for ...
Dan Pichelman's user avatar
3 votes

How do you know if software is good or bad based upon empirical metrics?

The sad thing with metrics is that you may end up improving the resulting values of your metrics, but not the quality intended to be measured by them... In Visual Studio, there is a setting for ...
Bernhard Hiller's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible