Complexity of a web application
I am currently writing my Master’s Thesis on maintainability of a web application. I found some methods like the “Maintainability Index” by Coleman et.al. or the “Software Maintainability Index” by Muthanna et.al.
For both of them one needs to calculate the cyclomatic complexity. So my question is:
How is technical debt best measured? What metric(s) are most useful? [duplicate]
Possible Duplicate:
How can I quantify the amount of technical debt that exists in a project?
Cyclomatic complexity with two IFs – why it is 3?
I have read an article with following example:
Do iterative methods reduce cyclomatic complexity and improve supportability?
Do iterative methods such as are commonly found in modern languages such as C#, JavaScript, and (hopefully) in Java 8 reduce cyclomatic complexity’s impact on understandability and supportability of code?
Approaches to reduce cyclomatic complexity
I was running our code through JSHint, and decided to switch checks against cyclomatic complexity, and then went on long refactoring sprint. One place though baffled me, here is a code snippet:
Avoid too complex method – Cyclomatic Complexity
Not sure how to go about this method to reduce Cyclomatic Complexity. Sonar reports 13 whereas 10 is expected. I am sure nothing harm in leaving this method as it is, however, just challenging me how to go about obeying Sonar’s rule. Any thoughts would be greatly appreciated.
Avoid too complex method – Cyclomatic Complexity
Not sure how to go about this method to reduce Cyclomatic Complexity. Sonar reports 13 whereas 10 is expected. I am sure nothing harm in leaving this method as it is, however, just challenging me how to go about obeying Sonar’s rule. Any thoughts would be greatly appreciated.
Avoid too complex method – Cyclomatic Complexity
Not sure how to go about this method to reduce Cyclomatic Complexity. Sonar reports 13 whereas 10 is expected. I am sure nothing harm in leaving this method as it is, however, just challenging me how to go about obeying Sonar’s rule. Any thoughts would be greatly appreciated.