Fog Creek Software
Discussion Board

project complexity not by LOC?

I am doing a project, not a large one by means of LOC (around 1200).However it makes use of a few complex algorithms for data mining, and I have basically modified some algorithms developed in academia to suit the purposes of the project, and have solved some statistical problems, which were thought to be very difficult to solve.I have spent 2 months on it, with a lot of time experimenting and coming up and coding new algorithms to suit the project's purpose for data mining.
It's more research oriented, although intended for commerical use.I have extensive talks with researchers in Pattern recognition for some algorithms used in the project, including a very novel mathamatical measure.
It doesn't have --- here is a spec deliver it,
partly becuase there is not a lot of work done on similar projects in industry(only a couple of others I know)

Since many people use LOC as a measure, how would a 3 rd party(who is evaluating the project for my yearly review)
measure it's quality?

Saturday, July 05, 2003

If possible, the same way a lot of projects should be evaluated instead of LOC:

Old process:  x hours
Your process: y hours

(x-y) * number of times process performed/week * 52 = manhours saved/year.

THAT is a number management understands.


Saturday, July 05, 2003

Philo, there is no old process, it's a completly new development,what then?

Saturday, July 05, 2003

Philo, you are absolutely right about that. Any product/project  (purchased or commisioned by a business) should ultimately be measured by it's ROI.

Jeff, there is no previous app doing this, but was the same or similar action undertaken through any means? Manually and/or through the use of misc. utilities, reports, etc? In addition to that, can you in any way measure the resulting value of the data resolved by the system?

Sounds like its a cool project.


Saturday, July 05, 2003

When talking about books we often mention the number of pages. We assume a long book takes more effort to write than a short one, which is usually true, but number of pages is obviously not the best way to summarize what the author has accomplished in writing the book. You have to say something else about it besides number of pages before anyone can say how much effort went into it.
So LOC has to be just one measure among others. Anyone can write a long book that says nothing worthwhile, or a long program that does nothing worthwhile (or a short one that changes the world).

The Real PC
Saturday, July 05, 2003

A few complexity measures listed in the pragmatic programmer:

- McCabe Cyclomatic Complexity Metric (supposed to measure complexity of decision trees.) Pragmatic Programmer doesn't say how this one works... It's probably on google ;)
- Inheritance fan-in and fan-out
- Response set
- Class coupling ratios

Mike Swieton
Saturday, July 05, 2003

Your question is "how do we measure code _quality_?"  It's unclear to me how either _complexity_ or _size of source_ have anything to do with _quality_, because you haven't stated WHICH quality you're looking for.

Furthermore, I get the sense that what you're looking for is not so much "how do I show that this is high quality code?" but rather "how do I show that I didn't play Quake for three months and then dash off this 1200 line program at the last minute?"  :-)  There's no way to do that with code metrics -- you'll have to convince them some other way that this is reasonable output for several months work.

Can you tell us more about this third party who will be evaluating your work? 

The reason I ask is because there are a lot of metrics I'd use to measure the quality of a piece of code, the first being _correctness_, obviously.

But without knowing the wants and needs of the evaluating third party, its hard to say what comes _next_. 

Do they want extensibility? Legibility? Maintainability? Good asymptotic performance? Amortized performance?  Worst-case performance?  Robustness?  Portability?  Patentability?  Publishability?  I'd use a different metric for each, so its hard to say.  Give us more details!


Eric Lippert
Saturday, July 05, 2003

Eric, main criteria is workability and  fast run-times.

Sunday, July 06, 2003

LOC isn't very accurate, and has no business value associate with it at all. Only another programmer can really tell anything by it. And really, the only impressive LOC statistic relates to refactoring. If you refactor 1200 lines into 120 lines, then I'm going to impressed. You get the idea.

When it comes to measuring business value, you have to use an actual business cost as a comparison. For example, will your software save a company 100 man hours for a given research project? 500? 1,000?

As some others have said, know the ROI of your product. If you don't know, then this is what you need to find out.

Sunday, July 06, 2003

*  Recent Topics

*  Fog Creek Home