A blog about one man's journey through code… and some pictures of the Peak District

Category Archives: Blogging

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.

Background

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.

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.

Dependency

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:

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:

But:

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.

Conclusion

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.

It’s finally happened: a “10 things” post. This is basically a summation of the information that I wanted when I asked this question.

One: WordPress.org and WordPress.com actively prevent you from placing ads on your site.

WordPress.org are a free service. They subsidise this by placing their ads on your site. Moving to WordPress.com removes these ads for you (based on the annual fee that you pay – £90 / year at the time of writing), but doesn’t allow you to place your own.

Two: The ad service available to WordPress.com users is not under your control.

After applying for WordAds (as far as I’m aware this is the only ad service accepted by WordPress.com), I received no reply for several months. I finally enquired and received a reply. The reply stated that they had a minimum traffic requirement and, while he couldn’t tell me what that was, it was roughly 10 times mine. I was receiving around 1,000 hits a month at the time, so unless you’re getting 10,000 hits every month – don’t bother.

Three: Amazon Associates and other affiliates

Amazon Associates, and other “associate” web sites sound like an excellent idea. There’s no WordPress policy against them, and you can add them to your site easily enough. The problem that you have here is that they have to appeal to your readership so much that they will click the link and buy something.

My blog is a tech blog, so trying to sell a couple of tech books and a CMS provider didn’t seem to work at all. Obviously, if the book is your own book then you may fare better.

Following my lack of success with associates, and my conversation with Word Ads, I decided to go down the self-hosted route. I used a company that offered to migrate the WordPress.com site for me. This did seem like quite a straight-forward process and, unless you actually want the experience of doing this yourself, I’d recommend it (most hosting providers offer this as a free service). Make sure you test the migration afterwards though; after the first try, mine was missing deep links, the source code plug-in wasn’t working and some of the text had been strangely corrupted. The second attempt worked better, but it took about five before it worked correctly.

It’s worth remembering that unless you have your own domain name (part of the WordPress.com offering), you may have a job to re-direct links. I believe there is a WordPress service that will forward traffic for a period of time to prevent search rankings dropping, but that won’t fix a blog that references your site by URL.

Five: Advertising doesn’t pay as much as you think

Once you manage to get your own site and put ads on there, you might be disappointed.

My site is getting around 80 – 100 hits / day at the time of writing. That’s worth about £0.01. I can’t say if it’s the same in America, but that’s less than 2 cents by my reckoning – so I don’t even get to have my 2 cents!

Also, in some cases, your hits may depend on the day. My blog appeals mainly to programmers, so weekend traffic is roughly halved.

Six: Click Through pays much more

So, I’m getting a shiny penny every day – then one day, I got £0.90, and on another I got £1.49, so clicks matter a great deal. I’ve seen a number of articles saying 0.1% click through rate is about right. Based on my current traffic, I should expect 3 clicks / month; that’s close to what I’m getting. The amount paid for a click through seems to vary wildly though, but average at around £0.50.

Seven: A long tail

This almost goes without saying, but if you have more posts, you will attract more visitors. If you post every week about something then after a year you’ll have 52 posts. The model number of visits (most frequent) for each of my posts is one per day, so that would make ~50 visits per day. Based on the above information, you can expect to be making a cool £0.30 pa!

Having said that, unless you’re writing about something time sensitive, you can expect that hit rate to be maintained for the life of your blog. Also, if you have a backlog of 50 posts, there is a greater chance that you’ll get referenced by a major publication.

My guess at the reason for this is that if you type: “server principal not able to access the database” into Google, this link is number two!

Clearly I’m an SEO expert then? Well, not really – TBH, I don’t know the first thing about search ranking; or, for that matter, care. My day job doesn’t involve me doing anything relating to search ranking, and I didn’t actively do anything to cause this. My guess is that if you can find a niche subject matter with not much existing information, and you’re not writing about, or publishing something that Google will downgrade, then after a year or posting, you’ll end up with at least one or two high ranking links.

Nine: From what you’ve seen above, you’re very unlikely to be able to retire on the revenue from blogging

The question to ask here is what are you actually after making. I, myself, would like to buy a solid gold house on an Hawaiian island with the money I make.

Well, I’m sure some people make a decent living from this. If you’re someone very well known in your field, like Jon Skeet, or Scott Hanselman, or if you’re Delia Smith and you write a cooking blog, you’ll get traffic because you are who you are.

That’s certainly not to say that these people haven’t got content that’s worth reading – they have, and they are leaders in their fields. They may also have reached a critical mass, whereby their name sells their content as well as the other way around.

Also, let’s think about some figures; imagine that what I’ve said above is factually correct in every way (just for a minute):
100 hits / day = £0.01 (£0.30 / month)
0.1% Click Through Rate (CTR)
Average at £0.50 / click

So, if I can increase my traffic by three times, I can earn £51 / month!

A quick guestimate is that it would take an average hit rate of 100K hits / month to make it something that you would consider income. If my total of 70 published posts generates me around 100 hits / day, I would need to post another 630 posts or something.

Ten: Well, I did say 10 things! Oh yeah – the disclaimer

Obviously, these figures are guesses. Many factors influence traffic. Most of what I’ve written above is my interpretation of something that I don’t fully understand. However, I wish I had read this a year ago.