Live data from Hacker News

Measuring Software Complexity: What Metrics to Use?

thevaluable.dev

31–40 of 87 posts

Re: Measuring Software Complexity: What Metrics to Use?

#32
post #25

Earlier quoted context omitted.

I think you applying that definition in your way to the issue of source code complexity is outlandish.

Why is it outlandish? You're confusing the reliability of using source lines of code as a metric for measuring the productivity of developers with measuring the complexity of a system. It's a bad metric for measuring productivity but a good metric for measuring complexity. The problem with using lines of code as a metric for developer productivity is precisely that it leads to developers introducing unnecessary compl…

I've never proposed using LOC as a measure of productivity. I won't entertain your dishonesty any further.

Re: Measuring Software Complexity: What Metrics to Use?

#33
post #2

This talks about code complexity a lot. This, however, is not the chief source of complexity in many code bases. The number of tools needed to build things is the bane of the modern software developer. Also, the use of microservices where none are needed results in and enormous increase in complexity. Code complexity is relatively easy to fix compared to all of this.

Indeed; I tried to compose yet another list of factors contributing to (or approaches to estimating) software project complexity in the past, with code complexity being just one out of 18, and not seeing it as particularly outstanding. Perhaps just a bad title.

Re: Measuring Software Complexity: What Metrics to Use?

#35
post #2

This talks about code complexity a lot. This, however, is not the chief source of complexity in many code bases. The number of tools needed to build things is the bane of the modern software developer. Also, the use of microservices where none are needed results in and enormous increase in complexity. Code complexity is relatively easy to fix compared to all of this.

Yup. Long gone are the days of concise packaging in single executables.

Quite literally, software engineers today spend most of their time fighting dependencies and poorly built delivery machines.

Re: Measuring Software Complexity: What Metrics to Use?

#36
post #32

Earlier quoted context omitted.

Why is it outlandish? You're confusing the reliability of using source lines of code as a metric for measuring the productivity of developers with measuring the complexity of a system. It's a bad metric for measuring productivity but a good metric for measuring complexity. The problem with using lines of code as a metric for developer productivity is precisely that it leads to developers introducing unnecessary compl…

I've never proposed using LOC as a measure of productivity. I won't entertain your dishonesty any further.

Well in that case I really don't understand your reasoning. I can't think of any other reason why you cannot see that lines of code is the closest and most measurable representation of the information content of the system's logic. Information content/entropy is the most rigorous way to measure complexity.

IMO, lines of code is even better at measuring complexity than compiled bytecode because it accounts for complexity from the developer's point of view (which is what the question is asking).

While some lines of code require more effort from a typical developer to understand than other lines, it doesn't matter so much once they're averaged out over thousands of lines and thousands of different developers (each with their own slightly different perception of complexity). It's reasonable to factor out individual perception of complexity.

Re: Measuring Software Complexity: What Metrics to Use?

#37
post #2

This talks about code complexity a lot. This, however, is not the chief source of complexity in many code bases. The number of tools needed to build things is the bane of the modern software developer. Also, the use of microservices where none are needed results in and enormous increase in complexity. Code complexity is relatively easy to fix compared to all of this.

second this. toolchain complexity is way more of a PITA than code complexity for me these days.

Re: Measuring Software Complexity: What Metrics to Use?

#38
My first job as a dev was for a consultancy and I had to review a code base for a client to support their argument that they require a rewrite. I had no idea about any of this so googled metrics, found cyclomatic complexity, and wrote a load of bullshit about the results of analyzing the code base showing it was complex. It served its purpose - they got corporate to accept a rewrite - but I’ve never used those metrics again.
Post reply on HN