Code review, Refactoring, Unit Tests - Does my project really need them ?

Do you find yourself asking the following questions ?

– Which code most needs a code review, refactoring, or unit tests?
– Which developers need more mentoring in design and coding practices?

These questions were bothering me in almost every project I was working on… luckily I've found several tools that made my day !

Come a join me for a travel inside your software source code to find out how much code you have and to identify the relative complexity of your modules, identify the code that is most likely to contain defects and thus warrants formal review.

How we will travel ? Well I've found several Freeware tools that will help us traveling to our desired destiny.

Vil 1.1

Suite of Metrics - # of classes, methods, events, parameters, fields, try/catch blocks, etc. reported at multiple levels. Vil also provides various metrics relating to complexity, class cohesion, coupling dependencies, inheritance, and abstractness. Included are Cyclomatic Complexity (CC), Coupling Between Objects (CBO), Afferent and Efferent Couplings, Instability, Distance, Lack of Cohesion of Methods (LCOM), and more

Download here

Source Monitor Version

– Collects metrics in a fast, single pass through source files.
– Measures metrics for source code written in C++, C, C#, Java, Delphi, Visual Basic or HTML.
– Saves metrics in checkpoints for comparison during software development projects.
– Displays and prints metrics in tables and charts.
– Operates within a standard Windows GUI or inside your scripts using XML command files.
– Exports metrics to XML or CSV files for further processing with other tools.

Download here

Project line Counter – VS Add-in

– Automatically scans your workspace and project files.
– Varied statistical data about your source code, including: lines of code and comment lines.
– Includes parsers for: C/C++, VB, INI and other file types.
– Can filter statistics based on workspace or project files and/or custom wildcards.
– Reporting & Exporting: 
   – Export as CSV file for processing by Microsoft Excel (includes sample worksheet with statistical analysis). 
   – Export as XML for use with the report stylesheets

Download here (source code)

NDepend 1.3.2

– Helps you detect which assemblies are potentially painful to maintain (i.e concrete and stable) and which assemblies are potentially useless (i.e abstract and instable).
– Provides many metrics, at application level, at assembly level, at type level (LCOM, RFT…) and at IL instruction level (CC, number of instruction).
– Detects and yields dependency cycles between your assemblies.
– Provides a build order for your assemblies (only if no cycle is detected). This order is also useful when using tools for obfuscation.
– Builds the diagram of assemblies’ dependencies. 
– Enumerates all types that depend on a particular type.
– Warns you when an assembly depends on a less stable assembly than itself.
– Warns you when the visibility of a type or of a member is not optimal (in the context of the analysed application).
– Wrns you when a type or a member is not used (in the context of the analysed application). 
– Non-intrusive (you don’t have to modify or to recompile your source code to use it).
– Easy to tackle with (it won’t take you more than 10 minutes to tune it to analyse a 50 assemblies application). 
– Been optimized for real-world applications (it analyses around 1.000.000 IL instructions per minute).
– Stores all its results in some XML files readily exploitable from your build process.

Download here (source code)

Do you know of another tool which could be helpful ? Let me know and I’ll add it to the list.

1 Comment

  • Check out Fugue.

    Fugue is a defect detection tool for .net software, which lets you record the rules for using a class or interface and then check whether code that uses the class or interface is obeying the rules.

Comments have been disabled for this content.