Skip to main content
1 of 2
ctrl-alt-delor
  • 10.8k
  • 4
  • 25
  • 54

Reason 1 : Because without printing it out you can not weigh it.

When I was an university, there was a myth that some lazy teachers (I don't know the technical terms for the roles), would weigh your reports, and give a grade base on that. I heard of one student that handed in some work with a load of blank paper attached, and got a good grade.

Reason 2 : To see how complex it is.

I remember a story by Michael Jackson, about judging how brilliant some one is. I will include the last 3 paragraphs here.

“Terrific,” I mumbled respectfully. I got the picture clearly. Fred as Frankenstein, Fred the brilliant creator of the uncontrollable monster flowchart. “But what about Jane?” I said. “I thought Jane was very good. She picked up the program design ideas very fast.”

“Yes,” said the DP Manager. “Jane came to us with a great reputation. We thought she was going to be as brilliant as Fred. But she hasn't really proved herself yet. We've given her a few problems that we thought were going to be really tough, but when she finished it turned out they weren't really difficult at all. Most of them turned out pretty simple. She hasn't really proved herself yet — if you see what I mean?”

I saw what he meant.

Reason 3 : To see how complex it is.

Over complex code is bad, see in working out the final grade, the number of lines of code, goes some ware in the denominator.

Reason 4 : Looking for outliers

This is the only one that would make any sense, but people do a lot of thinks that don't make sense.

Because they knew how many line it should take, and they were looking for statistical outliers. If the line count is way off then it is a sign of a problem.

Summary

In any case, I could not count lines of code. Even looking for outliers is through with dangers. I remember the quality manager coming to me with a big grin on his face. He had just got a new code metrics analyser. He had run the code for a large medical pump project (that I was working on), through it. It showed that one of my modules had a very, very, very high value for coupling. Much, much higher than any other module. I asked to see the data, it showed near zero for every other metric. I smiled and looked across to the name of the module, it was ……… something_factory. Yes, it was this modules job to have all the coupling, so other module could have none. I looked back at the quality manager, with a smile. But he did not understand why I was smiling. It took several meetings with my boss and human resources, to finally get him off of our backs.

ctrl-alt-delor
  • 10.8k
  • 4
  • 25
  • 54