|
|
|
|
|
by drKarl
4070 days ago
|
|
Yes, there's a metric for that, and it's called Cyclomatic Complexity. Depending on the programming language there may or may not be tools to perform an anylisis on Cyclomatic Complexity on your code. I know for Java there are some tools. |
|
One solution is for the OP to come up with a shorter, cleaner, better, etc. solution. Actually presenting that version to the co-worker can be interpreted as directly confrontational ... though presenting metrics instead would more likely be interpreted as a side-handed attack, rather than a direct attack.
But if the OP can come up with better code, then that would answer to the OP's own satisfaction if the co-worker's code really is overly complex. Personal enlightenment (I tell this to myself) was all the OP was asking.