Tag Archives: Review

NDepend Updated Review

Around this time last year, I published a review of NDepend. They contacted me around June and asked me to have a look at version 6. The following is my current personal opinion of this new product.


After the last time I did a similar review, I pretty much didn’t continue to use the tool. What this means, is that coming back to it now, everything is new to me again. It also means that I haven’t “gotten used to” the little gripes that I had the first time round.

Also, one of the reasons that I stopped using it last time was that the windows didn’t dock (or they did, but they didn’t stay docked), so they kind of got in the way.

What’s new?

Here’s the updated features.

One or two of my gripes from the original post have been addressed. This always pleases me – even if it had nothing at all to do with my suggestion; the product is alive and being improved. Amongst the features that intrigue me most were the dependency … squares, the docking (which now works), code coverage and the VS integration changes.


IMHO, the problem that the maker(s) of NDepend face, is that their core product is, by its very nature, used once. I come to an application and I want to see a dependency graph. I might want to see another one in a few months, but once I’ve seen a dependency graph, I’ve seen it. The way that Patrick and the team have addressed this is to add additional features that don’t directly relate to dependency. Obviously, this is a two edged sword: on the one hand, people are unlikely to buy more than one licence for a product that generates a dependency graph; on the other, if it becomes too heavy, people may not want the additional features.

The new feature on Dependency seems to be that the “Square Map” (this isn’t what it’s called, but it’s as good a name as any) is now colour coded. This certainly makes the graph easier to see, and there is a tooltip, which explains exactly what you’re seeing; so that’s all good. However, I have a few issues here. If I select that I want to see a code coverage graph, then I definitely get one:


So, what this tells me it tells me (by default) is that the large squares are the more complex or larger methods, and the red ones have test coverage. What it apparently actually tells me is that grey squares can’t be analysed, green have test coverage and red do not. I would have included a screenshot to this tooltip, but it’s very elusive.

The tooltips have been improved, but they still get in the way, and it’s hard to know how this could be improved.

Next, I can select a different graph, and this seems to change the colour; however, the tooltip remains the same, so it’s difficult to know exactly what it has done. My suspicion is that it’s altered one axis of the graph from coverage to, say, method size.

Double clicking the squares takes you to the relevant code, and there is a drop down menu that does allow to you change what’s being shown. Getting back to dependency, one of those options is “Methods calling me”. It’s a quick way to identify the most used areas of the system.

With a bit of playing, I presume I could produce a graph showing the most popular methods with no test coverage:

(from m in Methods 
where m.PercentageCoverage == 0
orderby m.Rank descending, m.NbMethodsCallingMe descending, m.NbLinesOfCode descending 
select new { m, m.Rank, m.NbMethodsCallingMe, m.NbLinesOfCode }).Take(100)

It is, admittedly difficult to tell whether this works or not, but it seems to at first glance.

Code Coverage

Since the last time I reviewed this, I’ve started using VS Premium, which means that I can use the code coverage analysis in NDepend. The process for this is a little cumbersome: export the coverage file from VS and then import into NDepend. There seems to be some issues with this; for example, when I ran the analysis:




I clearly have code coverage – VS says so:


My suspicion is that NDepend has a problem with any solution containing non-C# files. Running this against a C# only project results in:


Even with this, the default charts seem to have some… issues:


However, as I’ve come to expect from NDepend, the power is not in the default charts, but in the analysis that you can do with the default and custom queries; for example:


I can then start messing with the figures, and ordering and extracting, etc…

Having said all that, it’s very disappointing that, once it apparently sees a VB.NET project it just gives up and goes home.

Visual Studio Integration

One of my favourite plug-ins for VS is Stop Build On First Error. If you have a solution of any size or complexity, it’s an absolute must. NDepend seem to have … err… borrowed this idea and incorporated it. Since I have this plug-in anyway, it does give me a reason to always keep NDepend around.


I haven’t been using this over the past few months, so I suppose the question is: will I because of these changes?

I probably would, but I can’t. The main project that I work on contains VB code, which I believe is stopping me from using the code coverage analysis, and I feel this, combined with the dependency data is the main feature. I think NDepend is now useful enough to keep installed; however, it’s not really something to use on a day-to-day basis. If you come to a new code-base, or you’re refactoring then it’s definitely worth having. It seems to be a product in development, so I imagine it will continue to improve.

I suppose if I could request anything for the next version it would be that it either works with, or just ignores VB code. And the killer feature would be if it would work with a SQL DB, too. Identifying what tables are used where in a solution would be excellent.

Windows 10 – The Return of the Overrated Start Menu

Yesterday, for the first time, I saw Windows 10. I set it up in a VM inside Win 8. The following post in a combination of conjecture, opinions, and under researched hearsay.

First, let’s think about what I just said: I’m running a later version of Windows inside an earlier one. And it works.


Don’t mention 9! I mentioned it once, but I think I got away with it.

Start menu

The start menu never went anywhere for Win 8. You just press the Windows key and you’re in it (although it was more of a screen than a menu). Anyway, MS finally bowed to pressure, and it’s back:


Looks good eh? Actually, after restarting it seemed to gather its thoughts:


Anyway, as I understand the intention, if I were running this on a tablet, I’d be able to see the Win 8 start screen when I pressed the Windows Key. I can’t test that on a VM and, if I could, I’d be surprised if it worked properly for the TP.

Multiple Desktops

This is a neat feature: the ability to maintain more than one desktop. The way this appears to work is that you can open apps into any desktop, and then just switch between desktop to access them, or access them from the taskbar, and Windows will select the desktop they are on.


You appear to be able to maintain as many desktops as you like.


There is a large magnifying glass on the taskbar, which brings up a huge, unwieldy, blank box with a small text search. Maybe this will be back on the charms bar for tablets, but the idea is that it will find stuff on your machine. It failed:


I don’t understand why this was separated from the start menu. Searching for, and running programs are basically the same thing. If I want to run word, I want to type “Word”; if I want to open a word document on my desktop, I want to type: “My word doc” and have it find it. Results seemed to be sporadic, sometimes it found what I expected, but generally it didn’t.

What happened to the charms bar?

It now seems to be a sub menu of each store window:


As I said earlier, I expect it will behave differently for the tablet and phone.

Universal Apps

These have been around for a while. They basically allow sharing of code between Windows store and Windows phone apps. As I understand it, these will now be effectively mandatory – you will have to produce a phone & store version, in the same way as you had to provide a snapped and filled version of your app.


The split desktop is nice, and the idea of having “One Windows” is a nice one. In fact, it’s effectively what I understood to be the driving force behind 8. It looks like it’s going to be a good OS, but I can’t see any killer features.

What I mean by that is this: imagine that you want to upgrade to Windows 10, and you put the idea to your boss. The first question they should ask is: “Why?”.

For Windows 8, the answer was simple: Hyper-V. An astoundingly useful and undersold feature.

Windows 10 doesn’t have that, and it needs it, because a lot of people are sticking on 7 and need a reason to upgrade – having the start menu back is not that reason.

Review of NDepend

Introduction and Disclaimer

I was asked around the middle of August if I would consider reviewing a product called NDepend; in exchange for which, I was given a free licence. I agreed to do this, providing I could review the product honestly and, this being agreed, what follows is my personal opinion of the software.


I have a number of projects that I was interested in running this on. I won’t be running fair comparisons between projects to test the software; neither will I be comparing the software against other such software. This review will simply be my personal impression of how useful and easy to use this software is for the projects that I happened to use it for.

There are tutorial videos, documentation and a plethora of other resources on the web. I purposely stayed clear of these, with the exception of the 2 minute introductory video and “getting started” document described below.


Having downloaded the zip file, there are a couple of options, so I went looking and found this:


I had received two mails: one saying that the licence was on its way, and one with the licence and licence ID. The installation process is unnervingly fast (that is, it appeared to have done nothing):


But from launching VS, it clearly had done something:


Initial Run

The instructions state that you should attach a project to NDepend. I did this with the current project that I’m working on (my MVVM Cross game). It then gave me a few options; the Dashboard looks like this:


Speedwise, I have another solution with 104 projects in, and it took around 4 – 5 minutes to load. Subsequent loading of the project appears to take no additional time.


Okay, so having had a play, I want to see if the product does what it says on the tin; here’s the tin: http://www.ndepend.com/features/default

There are 13 features listed here at the time of writing. Some are things such as: VS Integration, which I’m not strictly sure should count as a feature; it’s just what you would expect from a product such as this. I won’t go through all the features; however, I particularly interested in:

1. Complexity and Diagrams
2. Detect Dependency Cycles
3. Test Coverage Data

For each of these, I’ve indicated what I would like from the functionality, what the product claims, what I could find on my own, where I needed to contact NDepend (and the result), and what, in the end, is available.

Complexity and Diagrams

What the product claims: “Spot too complex code at a glance thanks to unique diagramming capabilities in the .NET world.”

What I want to see: A list of methods which are overly complex or long, in order of the length or complexity.

This seems quite a good one for NDepend; initially, I tried looking in the Metrics menu:


What appeared was, indeed, unique. It seems to generate a series of rectangles, the size of each representing the relative complexity of the method. I’m confident that it did identify the most complex, too:


My problem with this kind of display is that it doesn’t really tell you what you need to know. It looks good, you can zoom in and out, but when I first saw it, I misidentified the most complex method.

Double clicking on a square takes you to the code, as you’d expect, and your visual query remains as a tab. It also provides a little table, showing methods by complexity. Annoyingly, this doesn’t seem to be limited to my code:


It lets you output this to pretty much anything you can think of. All in all, pretty impressive and easily discoverable.


What the product claims: “Detect Dependency Cycles: Get rid of dependency cycles between components to achieve higher code maintainability.”

What I want to see: A basic graph with a list of classes and their dependencies.

NDepend does offer a dependency graph. I’ve downloaded open source versions of this in the past, and even poorly implemented ones can be useful.

When you run a dependency graph, you get a very pleasant graph. You do have to do a bit of juggling with the dockable screens (I just docked them, and I’m not really sure why that isn’t the default – but they DON’T seem to stay docked after a restart!). Pressing Shift-Alt-Enter didn’t bring the graph to full size either; it simply brought my last code module to full screen.


Okay – so it definitely fulfils my basic requirements; but what else does it do?

You can switch from side, to top down view. You can right click a namespace and view the methods in a namespace. The box sizes are initially based on the sum complexity of the namespace. This is changeable, and you can, for example, have them based on the lines of code. This is definitely the killer feature IMHO.

Anything it doesn’t do, or doesn’t do well? The following is a list of things that sprung to mind while I was using it:

– Double clicking a node does nothing. TBH, I wouldn’t really mind what it did – for example, you can right click and select: view internal dependency cycles, of maybe it should list the methods for that namespace.
– As the graph gets complex, there are overlapping dependency lines. On very complex projects, this basically renders this unreadable. Obviously, in such cases it may be unavoidable, but I have seen a few, where overlap is unnecessary. Maybe it would be better if the lines were straight, rather than curved?
– As you hover over the nodes in the dependency graph, very useful, context sensitive help boxes appear. However, getting to them before they fade away, as you leave the box, requires mouse dexterity of a level that I imagine Billy The Kid might have, if he were a computer programmer.

Test Coverage

To be clear, NDepend doesn’t generate code coverage data. It looked at first glance to me that it would, but it doesn’t. Having spoken to NDepend support, there are no plans for it to in the future. It will, however, import test coverage data from other applications that do. As far as I can see, all of the test coverage programs that it uses are commercial (including VS for premium and above).

At first, I was a little disappointed by this, but given that the product is called NDepend, and it does support reading coverage files, I felt a little like I was trying to judge a screwdriver by its ability to knock nails into a wall.

A Note on Usability and CQLINQ

Okay, so the UI does take a bit of getting used to, but once you start to get a feel for it, it makes sense. Each feature sparks of a new “Query Edit” window, which looks like this:


Initially, this annoyed me immensely. It’s not at all obvious what it’s for, and it just kind of hovers around the screen. Basically, this just allows you to export the result of the query to HTML, graph, etc… but then I tried changing it, and realised how cool this was.

Here’s an example of the code quality query for one of my projects:


Okay, so I have no methods that are “too big”. But what is that? When I click the rule, I get this:


As I said, my initial thought was that this was just annoying, but it’s not – it’s unbelievably good, because I can do this:


Woah! As I type, it updates with results of the code for a LINQ query (NDepend call this CQLINQ)! I can change anything:


Here I have a list of all types where the code is more than 10 lines and there is a method that starts with “Create”. Okay, it’s a daft example, but the potential is limitless. Well, maybe not limitless, but I can certainly envisage other uses for it.

On the downside, the intelli-sense is a bit laboured. Ctrl-Space sometimes works, and sometimes doesn’t, and brackets seem to appear when you don’t want them to.

Oddities and Bugs?

Yes, there were a couple. The first was that while I was browsing through the list of “structures that should be immutable”, I tried to select some code that it highlighted, and was rewarded with this:


Because of this, it’s hard to tell precisely what it’s moaning about, but best guess it an internal .Net assembly (given that I have no structures in my project).

There was the intelli-sense that I mentioned above.


One of the reasons I never got into using Resharper was that when I turned it on, the first thing it told me was to replace a statement such as this:

MyClass myClass = new MyClass();


var myClass = new MyClass();

Personally (and I know people disagree with this), I consider that to be bad advice.

An example of such a rule might be that “Pure methods should be tagged with the Pure attribute”. I appear to be following this; possibly because I have no “Pure” methods in this particular project. Incidentally, here’s what the NDepend online documentation says about that rule: (http://www.ndepend.com/defaultrules/q_pure_methods_should_be_tagged_with_pureattribute.html):


My point is that these rules are, to some extent, a matter of opinion. Obviously, a function with fewer lines is better, and it’s good that it points out functions that exceed a certain length, or level of complexity; and it’s very good that this criteria can be changed and then save them. You can turn rules off, and they stay off, but I feel as though there should be some form of “Rule Wizard”, with a tree view where I can basically say: “Everything off”, and start from there.

Unlike Resharper, NDepend is only there when you ask it to be, and this is kind of its “Get out of jail free card” here. My functions might be 5,000 lines long, use randomly named global variables ranging from “a” to “z3” and have no comments, but it’ll only tell me when I specifically ask it to. This is a good thing, I don’t need something sitting in the background constantly tutting at me every time I miss a semi-colon; Visual Studio handles that already.


NDepend is a useful product.

It does, as far as I can tell, what it says on the tin (http://www.ndepend.com/features/), and then some. Unlike other VS plug-ins, I don’t mind having it there, because it’s quietly in the background.

It has at least two killer features. Both of which would make it worth the purchase price alone (around £240 at the time of writing).

Could it be better? Absolutely.

My main issue with it is the initial learning curve. It probably took me two or three hours to get an idea of what was happening, and why. That’s too long. There are lots of videos, training materials and even blog posts such as this, but it feels a little like the default is in advanced mode.

The windows, especially on my laptop screen, always seem to be in the way. You can dock them, but annoyingly they seem to constantly forget that you’ve done so.

Some time back, MS was talking about introducing a concept of Code Bubbles, but that never seemed to materialise. The display graph and popups in NDepend make me think that the devs saw the same promo videos that I did when they designed the interface. Although I’m not sure the graph quite works the way it was intended to.

In some respects, NDepend’s power seems to work against it. Since installing it, I’ve come across a number of scenarios that I would traditionally use the VS Find function, and NDepend has come to mind. I’ve started writing a CQLINQ statement and then found that I’d wasted half an hour or so. I don’t doubt that this will subside as I either use it more frequently, or stop using it as much because the novelty wears off.

Finally, there did appear to be one of two very minor bugs, such as the ones identified above.

Further discussion and addendum

It’s worth also mentioning that the response time from NDepend was very fast. Additionally, I sent this to NDepend for a review first, before posting. (I haven’t changed anything as a result of this – apart from this section, and a change to the wording in the rules comments to make my points clearer); amongst the points they made was that I missed the dependency cycle and matrix diagrams. Also, that I missed the search facility. I also made some suggestions, and found them to be surprisingly receptive.

I’d like to quickly review each point, starting with the search facility. It is a bit of a hidden gem. You can pretty much search of all the basics: size, name, complexity, etc, and it generates a basic query for you. I’m not sure this negates my earlier comment about wasting time trying to formulate a query, but it’s a start.

Regarding the dependency cycles and the matrix: I subsequently ran this query on my project, and it returned a single, “Extensions” namespace. Looking at the matrix didn’t particularly help and, to be honest, I’m still not totally sure what it tells me.

I will try to revisit this post in around 6 months time, and give details of whether I’m still using the product, any improvements, and whether I find it more, or less useful.

Windows 8 Shortcuts

Windows 8 is a great operating system, but sometimes, without knowing the shortcuts and apps available, it can be difficult to achieve even mundane tasks. Here’s some of the tools and tricks that I use.


I am the author of one of the apps mentioned below. I have no financial interest in Console OS.


Windows 8 mail app is definitely not as good as outlook. However, what people forget about when making this comparison is price:

Outlook is a commercial product and sells for just over £90 (that’s around $170 at the time of writing). Windows mail app is part of Windows 8. So it’s free.

If you want to beef it up a bit you can find some useful apps in the store. This one allows to to configure a mail template and associate that with a windows tile.


Many people these days run more than one monitor; especially with tablets. If you haven’t come across it yet, the magic key-combination here is Windows Key + Shift + Cursor Left or Windows Key + Shift + Cursor Right to move the current window to the next monitor.


Windows Key + S will allow you to search from anywhere; however, if you just press the Windows Key you’ll get taken to the start menu. From there you can just type and Windows should quickly find what you’re looking for.

When you’re done with an app, remember that moving away from the app, or even dragging it to close (finger at the top and the screen and swipe down) may not close the app. To do this, swipe down, but keep the app held at the bottom of the screen until the tile rotates: now it’s gone.

Copy and Paste

Admittedly, the store apps have a way to go with this. Complex text manipulation is difficult without a mouse, and whichever platform you choose, you’ll be swearing at the screen as you try to select the area between a comma and the preceding text. Windows big let down here is that some of the time, press and hold doesn’t give you a cut/copy/paste context menu. However, it does give you a keyboard (all textboxes do). So, simply select Ctrl and X, C or V from there. Not perfect, but it works.

Killer Apps

By far my favourite app these days is One Note. Unfortunately (or maybe fortunately, depending on your point of view) for Microsoft, they’ve made it available on other platforms for free.

The Facebook and Twitter apps are quite good; however, I now just use internet explorer. Remember that a Surface Pro or a Surface Pro 2
tablet, or even something like this Asus) is effectively running a full OS, so you’re no longer restricted to what you can find apps for.

So, what’s missing

While writing this, one of my big annoyances was that there isn’t a WordPress app. Admittedly there are less games available for Windows, but I suppose there’s only so many permutations of Angry Birds you can write. If you want more, why not consider contributing to these guys who are trying to bridge the gap?

Finally, if you would like to see a particular application on WinRT, leave a comment, or contact me directly.