<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d-5147029996388199615', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
An architect's notes, experiments, discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks


NDepend - a powerful .NET code analysis tool

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:


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.

Labels:

Tweet this | Google+ it | Share on FB

« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »

»

Post a Comment