Quantcast
Channel: Fred Mastropasqua - Developer Tools
Viewing all articles
Browse latest Browse all 9

Cyclomatic and Maintenance Complexity using CodeRush per Mark Miller

$
0
0

 

I’ve been using DevExpress’s Visual Studio Tool, CodeRush, for awhile now and I love it.

There’s been a feature though I was never familiar with, and that’s the little digits next to my methods. Choices of Cyclomatic Complexity, Maintenance Complexity and Line Count. Granted I figured out what Line Count was. 

image

So I did some research and found that Mike Miller from DevExpress has a Blog over there and goes over some CodeRush features that I found helpful.  I don’t know where his post on the Complexity count went but he did mention to another user on a forum post that there was this PDF which he describes the Complexity numbers.

Attachment Reference:

 

This has been helpful in alerting to me when I need to refractor my code and make changes, and break it out.

Here’s the charts from the PDF, which is the meat of it.

Cyclomatic Complexity

Probably the simplest measure of complexity. CC is the number of decision points for a method plus one. It also happens to represent the minimum number of test cases needed to travel through all branches of a method.

image

 

Maintenance Complexity

The purpose of Maintenance Complexity is to give you a picture of how much code you have in a given member.

 

image

 

Maintenance Complexity Points

Breakdown of how the Maintenance is counted

image

image

image


Viewing all articles
Browse latest Browse all 9

Trending Articles