Cyclomatic and Maintenance Complexity using CodeRush per Mark Miller

Cyclomatic and Maintenance Complexity using CodeRush per Mark Miller

  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_24
image_24

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:

MaintenanceComplexity-MarkMiller

This has been helpful in alerting to me when I need to refactor 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_25
image_25

Maintenance Complexity

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

image_26
image_26

Maintenance Complexity Points

Breakdown of how the Maintenance is counted

image_27
image_27
image_28
image_28
image_29
image_29

Control Your Windows Service from a Asp.NET Web App, Start, Stop, Run A Method

Why Working From Home is both Awesome and Horrible

Why Working From Home is both Awesome and Horrible