3 ms·
I don't understand you comment. Could you please explain? Sorry, thanks.
by Trufa 14y ago
I don't understand you comment. Could you please explain? Sorry, thanks.
- austenallred 14y agoSaying that a company has 10,000 lines of code is just as relevant as saying they have a design that's 10,000 pixels big. It could hold more data, or it could be something super simple just made really poorly and very bloated. "Lines of code" is not a good unit of measurement for complexity.
- GlenAnderson 14y agoWhat would you use instead? LoC isn't a perfect metric but it is very easy to relate to. Given some extra context like the type of application, the size of the company or the age of the codebase one can mentally account for some of the weaknesses of using LoC as a metric. If this were a study using LoC as a sole metric with no other context I'd agree with you but LoC seems perfectly adequate in this case.
- austenallred 14y agoYou're right; in this case it probably is adequate. I'm by no means an expert programmer (alas, I come from the business development/marketing side of things), and I used to measure things in LoC as if it were a be-all end-all metric. Then I started programming and realized how ridiculous that is. It's probably the best metric to use, I just wish there were something better.
- Darmani 14y agoHalstead complexity? Cyclomatic complexity? Those are just a couple of famous, old-school ones. Software metrics is a major research area, and dates back to the 60s. The paper "Software Metrics: A Roadmap" has a good summary of the state-of-the-art as of 2000.
- stonemetal 14y agohttp://www.neverworkintheory.org/?p=58 http://www.neverworkintheory.org/?p=58 After controlling for lines of code, most complexity metrics become worthless.
- Silhouette 14y agoCould you, off the top of your head, give a rough idea of what cyclomatic complexity or Halstead complexity corresponds to a "large" project? In fact, given even a very simple code snippet, could you state on a cursory examination what these complexity values would be? Could most people reading this discussion? If not, your alternatives don't serve the required purpose. Everyone gets that a project with 10 million lines of code is big. Whether it's bigger in any useful sense than another project of 8 million lines isn't really the point, and any alternative that doesn't have an immediate intuition for people reading the discussion isn't helping much.
- roel_v 14y agoLOC is not an exact measurement, but it can be (with some context like which language the code is in), a useful approximation of complexity. Your analogy with image size is flawed - it's not a black/white case, 'useful' or 'not useful'. LOC is somewhere in between - useful in some cases, even if not exactly quantified, because other measurements are unavailable or are too complex for a first-order assessment. Let's compare with a movie, one that is constantly updated and worked on by many people, if such a thing exists. Is length of such a movie an exact measure of the complexity of that undertaking? No, but managing such a process for a 10 hour movie will probably be harder than that for a 2-minute one, even if it's just because there are probably many more people working on the 10 hour one.
- deleted 14y ago[deleted]