Tech Support Websites

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 26 May 2013

NDepend - a powerful .NET code analysis tool

Posted on 14:10 by Unknown
Nearly a decade ago, I was amazed when a not-so-technical project manager gave detailed feedback on my C# code in a project I was working on. It turned out he had used FxCop to analyze the code and he was parroting the results that came out after the tool analyzed it. That was my first brush with code analysis tools.

This nifty class of tools is especially indispensable for architects, technical leads and solo programmers who are concerned about code quality and need to have code critically reviewed in order to avoid paying a technical debt. For architects and technical leads, having an automated tool can help them save time and cover a greater breadth of code to review for quality and any architecture flaws. For solo programmers who don't have the luxury of a peer to review their code (there is the StackExchange CodeReview forum but reviews may not be low-level or very comprehensive), these code analysis tools are a tremendous help to improve their craft.

NDepend (currently in version 4) is a powerful .NET code analysis tool that reveals a wealth of distilled information.  It can be used as a Visual Studio Add-in (for versions 2012, 2010 & 2008) or through a standalone Windows GUI app, VisualNDepend or via a console app.

Potential uses of NDepend include:

  • a thorough assessment of code quality via 82 different code metrics 
  • the ability to visualize your code at a high-level
  • detecting dependencies between assemblies/components
  • integrated into your build process
  • comparing builds and tracking code differences
  • reverse engineering a complex .NET code base
  • using the lines of code metric of an existing module to estimate time required for a future module based on its LoC. 
  • perform an objective analysis of the quality of a library before acquiring it
  • define custom rules to validate against and query code using CQL or Code Query Language, NDepend’s own query language for inspecting your code. It is like SQL for assemblies. 
  • receive warnings on Build process health 
  • integration of NDepend analysis into the build process can result in NDepend continuously checking for the violation of CQLinq rules  

For someone completely new to code analysis tools, understanding the code metrics jargon can be intimidating. While NDepend has pretty detailed documentation, understanding the numerous keywords that are referenced by the tool can be a little daunting. If you put the effort to get past that, NDepend can pay rich dividends.

The man behind the tool, Patrick Smacchia, has been a Microsoft Visual C# MVP since 2003. In tune with the theme of NDepend, his blog is titled Code Better. He regularly answers questions on NDepend and related topics that are posted on StackOverflow.

To get started, try the free 14-day evaluation copy downloadable from the NDepend website. I was fortunate to have received a review copy from NDepend.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Tools | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Windows 8 keyboard shortcuts
    Win + X   - context menu to access common features like Control Panel, Task Manager, File Explorer, Programs & Features, Run, Search etc...
  • Dashboard-like info with Browser tabs, Windows 7 Taskbar tabs
    Browser tabs & Windows 7 Taskbar tabs are turning self-aware.  This is how my browser looked the other day: I had the summary of all tha...
  • The State Of HTML5 Video
    Key points from the  The State Of HTML5 Video  report by LongTailVideo (last updated on April 19, 2012): 75% of the desktop & mobile bro...
  • Archive tweets & favorites with Google Reader
    There are numerous ways to archive tweets but rather than use yet another tool, I prefer using Google Reader to preserve the tweets I mark ...
  • TWIL - Week #3
    This Week I Learned: New Azure VM Image Templates include SQL Server, BizTalk Server, and SharePoint Server (2013?) images . This can be han...
  • What is the difference between Browser Mode & Document Mode in IE
    If you're a web developer and your job actively involves building web pages that work the same in all browsers including the last three ...
  • My 30-day personal project - watch 100 hours of Pluralsight videos
    Inspired by Matt Cutts' 30-day challenges , I plan to watch 100 hours of Pluralsight online videos to get up-to-date with current ...
  • Azure in Pictures - overview of Windows Azure Features, Services and Common Uses
    Download the Windows Azure Poster in PDF format (1.1MB)
  • Indian comparison shopping sites
    Did you know, India has 120 million Internet users & the Indian e-commerce market is worth $7 billion ?  Travel accounts for over 80 per...
  • HOW TO dynamically generate a Word document with custom header & footer
    Way back in 2004, a project I was working on required a web page to be exported as a Word document (.DOC). Without relying on any components...

Categories

  • AJAX
  • Android
  • APIs
  • App
  • ASP
  • ASP.NET
  • ASP.NET-MVC
  • Azure
  • Azure SQL Database
  • AzureInPictures
  • Bing
  • Book Review
  • Bookmarklet
  • Browsers
  • C#
  • chart
  • Chrome
  • Cloud
  • CSS
  • CSS3
  • DidYouKnow
  • E-Commerce
  • Excel
  • FB
  • Fiddler
  • Firefox
  • Gadgets
  • GeoLocation
  • GMail
  • Google
  • Google Docs
  • Google Reader
  • Health
  • Hotmail
  • HOWTO
  • HTML
  • HTML/CSS
  • HTML5
  • Humor
  • Hyderabad
  • IE
  • IIS
  • India
  • Internet
  • IT
  • Javascript
  • jQuery
  • JSON
  • JSONP
  • Laptop
  • Learning Resources
  • Lists
  • Map
  • Metrics
  • Microsoft
  • miscellaneous
  • Mobile
  • NAPA
  • Office365
  • Opera
  • PDF
  • Performance
  • Personal
  • PHP
  • PM
  • PowerShell
  • Privacy
  • Programming
  • Rant
  • Safari
  • Science
  • Search Engines
  • SearchEngines
  • Security
  • SEO
  • Sharepoint
  • SharePoint2013
  • Silverlight
  • Software Engineering
  • Solutions
  • SQL Azure
  • SQL Server
  • TFS
  • Tip
  • Tips
  • Tools
  • Tools/Utilities
  • Trivia
  • TWIL
  • Twitter
  • UX
  • VM
  • VS.NET
  • VS2010
  • VS2012
  • WCF
  • WebApps
  • Websites
  • WF
  • Windows Phone
  • Windows7
  • Windows8
  • Word
  • WP7
  • WPF

Blog Archive

  • ▼  2013 (112)
    • ►  October (16)
    • ►  September (14)
    • ►  August (8)
    • ►  July (8)
    • ►  June (13)
    • ▼  May (12)
      • NDepend - a powerful .NET code analysis tool
      • TWIL - Week #8
      • ASP.NET MVC 4 Questions and Answers
      • Book Review: Instant jQuery 2.0 Table Manipulation...
      • TWIL - Week #7
      • Learn about Chrome DevTools at Code School
      • Book Review: Instant jQuery Drag-and-Drop Grids Ho...
      • Glossary of keywords used in Microsoft Technologies
      • TWIL - Week #6
      • HOW TO view a .NET DLL's dependencies
      • TWIL - Week #5
      • HOW TO easily autofit or scale wide images so that...
    • ►  April (12)
    • ►  March (8)
    • ►  February (15)
    • ►  January (6)
  • ►  2012 (127)
    • ►  December (11)
    • ►  November (14)
    • ►  October (13)
    • ►  September (14)
    • ►  August (16)
    • ►  July (16)
    • ►  June (6)
    • ►  May (5)
    • ►  April (11)
    • ►  March (12)
    • ►  February (7)
    • ►  January (2)
  • ►  2011 (98)
    • ►  December (5)
    • ►  November (2)
    • ►  October (5)
    • ►  September (7)
    • ►  August (7)
    • ►  July (15)
    • ►  June (10)
    • ►  May (7)
    • ►  April (8)
    • ►  March (10)
    • ►  February (11)
    • ►  January (11)
  • ►  2010 (163)
    • ►  December (14)
    • ►  November (19)
    • ►  October (19)
    • ►  September (15)
    • ►  August (18)
    • ►  July (17)
    • ►  June (20)
    • ►  May (17)
    • ►  April (19)
    • ►  March (5)
Powered by Blogger.

About Me

Unknown
View my complete profile