19

I recently downloaded ndepend and ran an analysis on an open source project I participate in.

I did not now where to look next - a bit of visual and information overload and it turned out I don't even know where to start.

Can anyone suggest starting points?

  • What information should I look for first?
  • What points out problems in the code (in a BIG way)?
  • What would the low hanging fruit that can immediately seen?
Oded
  • 489,969
  • 99
  • 883
  • 1,009

3 Answers3

15

When starting with NDepend, the most important thing is to understand what Code Rule over LINQ (CQLinq) can bring to your shop by letting you define queries on your code and rules. Here you'll find a summary and source code of all 200 default code rules.

The second most important thing to look at is dependencies, with both the dependency graph view, that works hand-in-hand with the dependency matrix view. Once you master these 2 views, you'll be able to pinpoint where the code is well layered or not, and where developers made mistake.

Then it'll be time to learn more in-depth feature, such as the possibility to compare 2 versions of your code base, the various code metrics and why they are useful, enforcing statically purity and immutability, controlling automatically test coverage...

Patrick from NDepend team
  • 13,237
  • 6
  • 61
  • 92
  • IME it's not actually possible to "master these 2 views" in the eval version. The matrix will close itself after 7 clicks (I'm screaming at the monitor after the third time that happens), and the graph is likely to be an incredibly dense postage stamp that you can't zoom. I wish there was a proper eval of this product - every Internet rave-review is written by someone with a free copy, and though I am not at all mean about spending money on tools, I have never, ever, been able to convince myself NDepend is useful. Perhaps that's because the eval version isn't actually useful. – Will Dean Nov 04 '10 at 18:02
  • 2
    Just ask the NDepend's support and get your 2 weeks pro eval – Patrick from NDepend team Nov 06 '10 at 11:36
  • 1
    Will, finally with version 4 we switched from a time-unlimited feature limited eval mode, to a 14-day time-limited fully functional eval mode. – Patrick from NDepend team Jun 02 '12 at 10:08
  • 1
    Patrick - that's cool. Of course, after your original response above, I did buy V3, and I upgraded to V4 on the day you released it... :-) – Will Dean Jun 04 '12 at 17:40
15

Scott Hanselman / Stuart Celarier / Patrick Cauldwell's poster with ndepend metrics has some useful information on it. Rather than trying to break down all the heuristics being used I'd focus on only a few at a time starting with "zone of pain / zone of uselessness" and cyclomatic complexity.

There is also a podcast which covers some of the basics of the tool.

Between that and running nDepend on a few different projects you may be able to start gathering useful data that you can make into insights.

t3rse
  • 10,024
  • 11
  • 57
  • 84
1

Excellent pair of web casts (30 minute videos) where Patrick Smacchia and Filip Ekberg talk through some of the features of nDepend and how to use them:

http://codebetter.com/patricksmacchia/2012/10/31/two-screencasts-on-how-to-demystify-spaghetti-code/

Oded
  • 489,969
  • 99
  • 883
  • 1,009