Re:Measuring Software Complexity: What Metrics to Use?
by magicalhippo on Sunday November 28, 2021 @09:14AM
(#29369037)
Complexity isn't a single thing though. The problem can be complex, a specific implementation can be complex, the codebase can be complex.
I recall implementing some linear algebra numerical code. The problem was a bit complex, resulting in a bit of code complexity.
However I realized I had some extra information I hadn't used, and I spent half a day going over the math again. After a couple of pages of derivations I could narrow down the result to a couple of dot products.
So, I ended up with a commit where I had 100 or so lines of comments including equations to justify my two lines of code.
The implementation became super-simple, but why it worked was suddenly not so simple. I had effectively moved complexity from code-space to problem-space.
I recall implementing some linear algebra numerical code. The problem was a bit complex, resulting in a bit of code complexity.
However I realized I had some extra information I hadn't used, and I spent half a day going over the math again. After a couple of pages of derivations I could narrow down the result to a couple of dot products.
So, I ended up with a commit where I had 100 or so lines of comments including equations to justify my two lines of code.
The implementation became super-simple, but why it worked was suddenly not so simple. I had effectively moved complexity from code-space to problem-space.