Expert Texture Home Contact me About Subscribe Digipede Connect on LinkedIn rwandering on Twitter rwandering on FriendFeed

rwandering.net

The blogged wandering of Robert W. Anderson

NDepend is a must-have

image Some time ago I took a quick look at Patrick Smacchia’s NDepend.  While I was impressed with it, I never took the time to dive into it.  Recently, I took another look to see if it could help inform some refactoring of the Digipede Agent. 

If you aren’t familiar with it, NDepend is a static analysis tool that allows you to dive deeply into your code base.   Its feature list is truly truly impressive. Here are a few things that stand out for me:

  • The Code Query Language (CQL) allowing SQL-like queries of your code base, with a set of pre-canned queries targeting code quality, design, naming conventions, and much more.
  • A visual tool with dependency graphs and matrices and more
  • Ability to compare between different runs of the same project – at an incredible level.
  • Of course, A command-line tool for incorporation into your build process.

I loaded up the Digipede Agent assemblies and – kind of like a kid in a candy store – I found myself heading off in 10 different directions at once.  My thought process went kind of like this:

  • Wow, look at these matrices and graphs, and all these CQL queries. 
  • This is really cool to have this level of information available with build integration!
  • Wow, there sure are a lot of warnings here. 
  • Let’s fix them!  Wait, let’s prioritize them and customize them and, etc.

(The experience reminds me of when I started using FxCop.)

I highly recommend this software . . .

  1. To help you make informed refactoring decisions; and
  2. to add design and code-quality criteria (and enforcement) into your build process.

So, why do I say this is a “must-have” tool?  Because code quality is not a nice-to-have.  Quality reduces maintenance and support costs and allows you to spend your time and money on more profitable endeavors.

Go buy it.

BTW: I would like to post some of the results I’ve gotten with the Digipede Agent, but I’m not ready to share that yet. 

Tags: , ,

Review of Practical .NET2 and C#2 (Coming)

I’ve started reading Practical .NET2 and C#2 with the intention of reviewing it. Even though the book is intended for beginner to intermediate programmers, I’ve already learned some things I missed while porting to .NET 2.0. When my review is done, I’ll post it as a new article.

It is written by Patrick Smacchia, author of the excellent NDepend. If you haven’t used that, go and check it out. Once our code is all Code Anaylsis-clean, I’ll probably play with using its Code-Query-Language (CQL) to enforce other standards.

Note to Patrick: I would have called it ILQL for Intermediate-Language Query Language (pronounced ill-quill) since CQL is presumably prounounced sequel. My guess is that this pronunciation match was intentional (and it is kind of cute), but in describing it to others I’ve had to call it by other names so I don’t confuse them (e.g., “not-SQL” and “code query language”).

Tags: , , ,