The blog has moved to a new address. The blog is now located at

Monday, July 23, 2007

Cyclomatic complexity measurement tool

ccm is a tool that analyzes C/C++ and C# code and reports back on Cyclomatic Complexity.Cyclomatic complexity is computed using a graph that describes the control flow of the program. The nodes of the graph correspond to the function of a program. A directed edge connects two nodes if the second function might be executed immediately after the first function. This technique is useful to determine how complex the function of code is.

ccm is a command line tool that accepts the path to directory you want to analyze. Using an /XML switch it will output the result as XML, making it easy to integrate with other tools, such as CruiseControl.NET, etc.



Running ccm without any parameters tells you about the available switches.

Missing parameters.

 ccm directory [/r] [/xml] [/n:x] [/e:folderlist] [/v]
     r            - act recursively on folders
     xml          - output into xml
     n:x          - list n-number of metrics (defaults to 30)
     v            - verbose
     e:folderlist - comma-separated list of folders or paths to exclude

ccm.exe ..\..\relativepath-to-sources /n:15

Download ccm

Monday, July 09, 2007

A list of programs for keyboard maniacs

A list of  programs for keyboard maniacs - they helps you rapidly find programs or documents from within the depths of the start menu (or other directories).

Monday, July 02, 2007

Kill specific tasks from MsBuild

This is an example that presents the way - how to kill the processes in MSBUILD script.It's very useful when you need to shutdown some application or services - to prevent the script from failing because the running processes are locked .I use well known OS command "Taskkill" with two arguments /F (Specifies to forcefully terminate process) and /IM (Specifies the image name of the process that has to be terminated. Wildcard '*' can be used to specify all image names).

<Project DefaultTargets = "Kill"
xmlns="" >

<!-- List of processes to kill -->
<Process Include="Process1.exe" />
<Process Include="Service1.exe" />
<Process Include="Engine1.exe" />

<Target Name = "Kill">
<Exec Command="taskkill /F /IM %(Process.Identity)" IgnoreExitCode="true" />