Ian Nelson's Image
More about this blog
Latest Post
31 May 2010
Total Posts
40
Readers
419
Liked
0
Disliked
0
Views-Per-Post
10.48
vote up
0
vote down

Testing IoC Registrations

When I first started writing automated unit tests for my code, I remember getting carried away writing lots of tiny little tests, each with a single Assert. It felt good initially to see all those green ticks, but rapidly became a maintenance headache,
 
Ian Nelson
tags: blog
May 31 2010 11:27 PM
vote up
0
vote down

Testing IoC Registrations

When I first started writing automated unit tests for my code, I remember getting carried away writing lots of tiny little tests, each with a single Assert. It felt good initially to see all those green ticks, but rapidly became a maintenance headache,
 
Ian Nelson
tags: blog
May 22 2010 04:55 AM
vote up
0
vote down

SupportDetails.com

Here’s a super-handy little site for anyone who’s ever had to perform website support over the phone. Instruct the user to navigate to SupportDetails.com. They can then see the answers to most of the questions you’re likely to ask, and have the option to
 
Ian Nelson
tags: blog
Apr 09 2010 04:40 PM
vote up
0
vote down

WCF - NHibernate Unit Of Work Endpoint Behavior

OK, my last WCF-related code snippet of the day, I promise. This is quite similar to the last one. I required that the WCF service I was developing started a new NHibernate Session for each invocation, and closed it after invocation (i.e.
 
Ian Nelson
tags: blog
Apr 09 2010 04:24 PM
vote up
0
vote down

WCF – Logging Before and After Operation Invocation

Here’s another custom WCF EndpointBehavior I found useful recently. Not content with logging all unhandled errors, I wanted to output a DEBUG level log message before and after every operation invocation. As before, I’m using the Castle Windsor Logging
 
Ian Nelson
tags: blog
Apr 09 2010 03:53 PM
vote up
0
vote down

WCF – Global Exception Handling

I’ve done a fair bit of WCF development recently (and amazingly I came out of it relatively unscathed, both psychologically and emotionally). Using Castle Windsor’s WCF Facility helped a great deal, but I still found myself writing a fair bit of
 
Ian Nelson
tags: blog
Apr 09 2010 03:42 PM
vote up
0
vote down

Testing LINQ Queries

I’ve been asked “How do you test LINQ queries?” a couple of times in the past few months, so I thought I’d blog my answer for the benefit of all you lovely people. Firstly I should explain how I’ve been doing most of my data access in recent months. I
 
Ian Nelson
tags: blog
Apr 09 2010 03:30 PM
vote up
0
vote down

SupportDetails.com

Here’s a super-handy little site for anyone who’s ever had to perform website support over the phone. Instruct the user to navigate to SupportDetails.com. They can then see the answers to most of the questions you’re likely to ask, and have the option to
 
Ian Nelson
tags: blog
Apr 09 2010 01:40 PM
vote up
0
vote down

WCF - NHibernate Unit Of Work Endpoint Behavior

OK, my last WCF-related code snippet of the day, I promise. This is quite similar to the last one. I required that the WCF service I was developing started a new NHibernate Session for each invocation, and closed it after invocation (i.e.
 
Ian Nelson
tags: blog
Apr 09 2010 01:24 PM
vote up
0
vote down

WCF – Logging Before and After Operation Invocation

Here’s another custom WCF EndpointBehavior I found useful recently. Not content with logging all unhandled errors, I wanted to output a DEBUG level log message before and after every operation invocation. As before, I’m using the Castle Windsor Logging
 
Ian Nelson
tags: blog
Apr 09 2010 12:53 PM
vote up
0
vote down

An MVC Gotcha and the PRG Pattern

If you’ve recently moved across to ASP.NET MVC development following years of wrangling with the leaky abstraction that was WebForms, you may have encountered some seemingly curious behaviour when posting back to the same URL. Suppose we have the
 
Ian Nelson
tags: blog
Apr 09 2010 12:47 PM
vote up
0
vote down

WCF – Global Exception Handling

I’ve done a fair bit of WCF development recently (and amazingly I came out of it relatively unscathed, both psychologically and emotionally). Using Castle Windsor’s WCF Facility helped a great deal, but I still found myself writing a fair bit of
 
Ian Nelson
tags: blog
Apr 09 2010 12:42 PM
vote up
0
vote down

Testing LINQ Queries

I’ve been asked “How do you test LINQ queries?” a couple of times in the past few months, so I thought I’d blog my answer for the benefit of all you lovely people. Firstly I should explain how I’ve been doing most of my data access in recent months. I
 
Ian Nelson
tags: blog
Apr 09 2010 12:30 PM
vote up
0
vote down

An MVC Gotcha and the PRG Pattern

If you’ve recently moved across to ASP.NET MVC development following years of wrangling with the leaky abstraction that was WebForms, you may have encountered some seemingly curious behaviour when posting back to the same URL. Suppose we have the
 
Ian Nelson
tags: blog
Apr 09 2010 09:47 AM
vote up
0
vote down

On the Relative Prices of Petrol and Diesel

I have a question about the economics of fuel prices, and I’m sure one of you clever folks will be able to help. I was just reading the BBC News website, and saw this story predicting that UK fuel prices could reach a new record high over the Easter
 
Ian Nelson
tags: blog
Apr 03 2010 11:16 AM
vote up
0
vote down

On the Relative Prices of Petrol and Diesel

I have a question about the economics of fuel prices, and I’m sure one of you clever folks will be able to help. I was just reading the BBC News website, and saw this story predicting that UK fuel prices could reach a new record high over the Easter
 
Ian Nelson
tags: blog
Apr 03 2010 08:16 AM
vote up
0
vote down

On the Market Again

This blog post comes to you live from a Starbucks in the north of England. Yesterday I wrapped up another eight months’ stint contracting at my old haunt Marshalls Plc. It’s been a genuinely interesting gig, working on two distinct greenfield projects
 
Ian Nelson
tags: blog
Apr 01 2010 11:05 AM
vote up
0
vote down

On the Market Again

This blog post comes to you live from a Starbucks in the north of England. Yesterday I wrapped up another eight months’ stint contracting at my old haunt Marshalls Plc. It’s been a genuinely interesting gig, working on two distinct greenfield projects
 
Ian Nelson
tags: blog
Apr 01 2010 08:05 AM
vote up
0
vote down

Recursion

Oh, those witty Google engineers!
 
Ian Nelson
tags: blog
Mar 31 2010 09:40 PM
vote up
0
vote down

Recursion

Oh, those witty Google engineers!
 
Ian Nelson
tags: blog
Mar 31 2010 06:40 PM
vote up
0
vote down

Team System – Build Details Enhancements in VS2010

It’s been a while since I blogged anything complimentary about TFS / Team System, so I thought I’d mention that I appreciate the improvements to the build details screens in VS2010. Here’s how a particular completed build appeared in VS2008:   And
 
Ian Nelson
tags: blog
Mar 27 2010 06:47 AM
vote up
0
vote down

Team System – Build Duration Graph

It’s been a while since I blogged anything complimentary about TFS / Team System, so I thought I’d mention that I quite like this cute little graph in the VS2010 client showing how long the build has been running for, compared to previous builds. I guess
 
Ian Nelson
tags: blog
Mar 24 2010 04:26 PM
vote up
0
vote down

Getting NDepend 3 and CodeRush Playing Nicely Together on VS2010

This is probably going to help approximately one person (me), but here goes. I’ve been struggling to get Visual Studio 2010 RC to run (both on WinXP and Win7) after installing NDepend 3.0 RC1 and the CodeRush VS2010 beta. It would just “hang” on startup,
 
Ian Nelson
tags: blog
Mar 01 2010 02:40 AM
vote up
0
vote down

Hobson’s Choice, Citibank Style

Dear Citibank. Last time I checked, JavaScript had a confirm() method. Kthxbai..
 
Ian Nelson
tags: blog
Feb 25 2010 01:32 PM
vote up
0
vote down

.NET Framework 4 – Why The Drop In Precision?

OK, why is is it Framework 4 and not Framework 4.0? The differing precisions in this drop-down are playing havoc with my OCD. Also, I see Scott Hanselman mentioned “C# 4 (not 4.0, the marketing folks say it's .NET 4, etc.)”. Those crazy marketing folks.
 
Ian Nelson
tags: blog
Feb 17 2010 02:35 PM
vote up
0
vote down

VS2010 – MyClassInitialize Has Wrong Signature

Having just upgraded an existing solution to target Visual Studio 2010 and .NET 4.0, I found all of my MSTest unit tests were giving the following error message: Method TestProject.TestFixture.MyClassInitialize has wrong signature. Parameter 1 should be
 
Ian Nelson
tags: blog
Feb 17 2010 02:00 PM
vote up
0
vote down

On the Inherent Negativity of Computer Programmers

A couple of weeks ago, early one morning, my friend and fellow coder Scott asked a curious question: “Do you think that programming computers for a living gives you a negative outlook on life?” Now, Scott is unfortunately responsible for administering
 
Ian Nelson
tags: blog
Feb 02 2010 11:44 PM
vote up
0
vote down

Most-Read Posts 2009

Courtesy of Google Analytics, here are my top 10 most-read blog posts from 2009: Posts published in 2009 only: SOLID Development Principles in Motivational Posters (12 February) Empty Catch Blocks (11 June) TFS: Using Alternative Diff/Merge Tools (19
 
Ian Nelson
tags: blog
Jan 03 2010 01:22 AM
vote up
0
vote down

Christmas Presents 2009

Here's what was waiting for me under the tree this year: Chunky pure silver cufflinks featuring fingerprints of my two beloved children. Lagavulin Jura Malcolm Gladwell - Outliers Dara O'Briain - Tickling The English Red Next Jumper Calvin Klein Pants
 
Ian Nelson
tags: blog
Dec 27 2009 01:13 AM
vote up
0
vote down

Deduplication Fail

Oh, the irony!
 
Ian Nelson
tags: blog
Dec 02 2009 05:22 PM
vote up
0
vote down

On Primality in Packsizes

Benny George, our precocious two-year-old, is quite the fan of Mister Maker, and enjoys spending time doing arty crafty stuff with his mum. Now, the great thing about the BBC is that they tend to suggest projects which can be created using bits and bobs
 
Ian Nelson
tags: blog
Nov 10 2009 08:47 PM
vote up
0
vote down

Spotify Mobile Rocks My World

I’m really enjoying being a Spotify customer, especially since they released an app for the Android mobile platform (I’m the proud owner of an HTC Magic). I was planning to write a quick blog post simply enumerating the things I love about
 
Ian Nelson
tags: blog
Nov 10 2009 05:24 PM
vote up
0
vote down

A Circuit Breaker Which Trips On Frequency Of Failures

@Jez tweeted last night: @ianfnelson admit it: you use Castle Windsor primarily to highlight and lampoon Google's poor selection of adwords?! Funny, but not true. I am enamoured with the Castle Windsor project because its power makes it fairly simple for
 
Ian Nelson
tags: blog
Oct 28 2009 03:30 PM
vote up
0
vote down

Castle Windsor Array Resolution Gotcha

The shiny new system which I've recently been developing makes heavy use of the Chain of Responsibility pattern, and as such a number of service classes take an array of objects in the constructor: /// <summary> /// Initializes a new instance of
 
Ian Nelson
tags: blog
Oct 26 2009 02:30 PM
vote up
0
vote down

Welcoming Barclaycard to the 21st Century

I’m sure it will come as no surprise to you to learn that I prefer to receive online bills and invoices from service providers rather than have hardcopies dropping through our letterbox. It’s not just for the obvious environmental and cost
 
Ian Nelson
tags: blog
Oct 21 2009 02:30 PM
vote up
0
vote down

Castle Windsor Lifestyle Gotcha

I always knew my lifestyle choices would come back to bite me some day… I’ve been making heavy use of the Castle Windsor container to handle dependency and configuration management in the shiny new system that I’m currently developing.
 
Ian Nelson
tags: blog
Oct 19 2009 10:30 AM
vote up
0
vote down

What Should I Click?

Now admittedly I've had a glass of wine this evening, but c'mon Microsoft, I've read through this dialogue box thrice and I still don't understand what you're trying to tell me!
 
Ian Nelson
tags: blog
Aug 05 2009 01:35 AM
vote up
0
vote down

Empty Catch Blocks

I've just found 22 examples of this anti-pattern in a small .NET project: Oh yes, the empty catch block. Joy of joys. Declaring an empty catch block is equivalent to professing that: "Sometimes this code I've written fails. I don't know why. I don't
 
Ian Nelson
tags: blog
Jun 11 2009 06:03 PM
vote up
0
vote down

SQL 2008 - Missing Indexes Hints

Improvements to the Execution Plan UI in SQL Server Management Studio 2008 sure do make it a doddle to improve query execution time. A client just reported that a particular stored procedure kept timing out. Viewing the Estimated Execution Plan for this
 
Ian Nelson
tags: blog
Jun 11 2009 05:30 PM
vote up
0
vote down

SRP Doesn't Stand For "Several Responsibility Principle"

I know it should no longer come as any surprise to me, but I just found this method (and several others like it) lurking in a Data Access Object. Grrr. /// <summary> /// Send an email to notify that accrual data has been successfully uploaded ///
 
Ian Nelson
tags: blog
Jun 08 2009 04:27 PM