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 occasional TLC to a codebase that I cut as long ago as 2004, so I assumed he was referring to this and was about to raise some complaints about my hand-rolled query object criteria framework or other coding horror. I steeled myself to defend my work as he continued to explain: ...

1 February 2010

Deduplication Fail

Oh, the irony!

2 December 2009

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?! — 𝚂𝚑𝚘𝚘𝚝𝚒𝚗𝚐 𝚂𝚌𝚒𝚕𝚕𝚢 (@shootingscilly) October 26, 2009 Funny, but not true. I am enamoured with the Castle Windsor project because its power makes it fairly simple for me to develop loosely-coupled systems which are easily maintained and tested. The wide range of Facilities and Contrib projects also integrate nicely with the other parts of my current development stack (NHibernate, WCF, WF, log4net). ...

28 October 2009

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: I’m using Castle Windsor for dependency management, so I’ve been fluently registering all instances of ILeadAllocator: Easy, right? And yet at runtime Windsor surprised me by throwing this exception in my face: C M K – a a e s r y l t s s e l h a e a ( d . l c A M l o l i s m l c . p o r L o c o e n a K a e t e d n o r s t r n . s s e A l p w w . p i h H l t i a i h c n c h d a s l t p w e i e a r o c s s n i . S f n H e i o a r c t n v d i k r l c e e e e y g r . s i E L ) s x e t c a e e d r p A e t l d i l . o o n c : a t C i a o n n ’ S t e r c v r i e c a e t e i s c o w m a p i o t n i e n n g t f & o # r 8 2 t 1 h 6 e ; M f a o r l s l h o a w l i l n s g . L d e e a p d e s n . d A e p n p c l i i e c s a : t i o n S e r v i c e . L e a d A l l o c a t i o n S e r v i c e ’ a s i t h a s d e p e n d e n c i e s t o b e s a t i s f i e d . Huh?! What gives? Well, a little Googling revealed this post from Castle founder Hamilton Verissimo explaining that by default the Castle MicroKernel expects me to define what should be included in the array. But he goes on to explain that the behaviour I desire can be achieved by registering a custom subresolver with the microkernel. That subresolver has since been included in the Castle Windsor distro, so in actual fact all I needed to do was add the following line of code when configuring my container: ...

26 October 2009

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. For the most part it’s been an absolute blast, allowing me to easily create a loosely-coupled system architecture and focus my efforts on what the system should be achieving for the client, rather than worrying about how it all hangs together. ...

19 October 2009

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 query displayed a nice green message advising of a potentially missing index which could improve performance by >95%: Right-clicking and selecting “Missing Index Details” then brings up a new query window containing the index creation DDL (I had changed the index name by the time I grabbed this capture): ...

11 June 2009

Agile Yorkshire @ The Pub – Gojko Adzic, 10th June 2009

If you’re in the Leeds area next Wednesday, why not come along to this Agile Yorkshire session? 10th June – Gojko Adzic: Slim, The Future Of FitNesse Details This talk will introduce Slim, the most important upgrade to FitNesse in years. Slim is the new test runner which promises to bring platform interoperability, easier integration, a much simpler programming model and lots of small helpers that will allow us to write and maintain executable specifications and acceptance tests easier. This is a session for .NET and Java developers. Some prior exposure to FitNesse and FIT would be beneficial, but not required. ...

5 June 2009

NHProf – NHibernate Profiler

The inimitable Ayende Rahien is close to releasing version 1.0 of his NHibernate Profiler tool, and it really is shaping up to be a rather lovely little addition to my developer toolbox. In much the same way that we can use SQL Server Profiler to monitor database activity, and ANTS Profiler to monitor the performance and memory usage of .NET applications, NHProf profiles the activity of the data access layer (NHibernate), and even goes as far as providing helpful hints for potential improvements. ...

19 May 2009

TFS: Using Alternative Diff/Merge Tools

There are many things I love about Team Foundation Server, but the supplied diff/merge tool is not one of them. It is – how can I put this? – somewhat basic. Indeed, I’ve heard tell of people going out of their way to avoid merges purely because they find the process so clunky. Here’s the good news – you can easily configure TFS to use a different, third-party, diff/merge tool, perhaps the one you’ve grown to know and love over many years of happy software development using other SCM products. Maybe you like WinMerge, or love TortoiseMerge. Perhaps you’re like my friend John and swear by SourceGear DiffMerge. Or maybe, like me, you’re a Beyond Compare fanboy. No problem, they can all be used by TFS. Here’s how: ...

19 May 2009

Agile Yorkshire @ The Pub – Exploratory Testing, May 13th

If I can get a pass out from helping to look after the burgeoning Nelson family for an evening, I’ll be going along to this Agile Yorkshire session next Wednesday. May 13th – Ralph Williams: Exploratory Testing Details In this session, Ralph will provide an overview of some techniques that bring Agility into the world of testing. (The world of testing is a strange place: regarded by most people as a nice place to visit but you wouldn’t want to live there, it is an unmapped wilderness where the waterfall methodology still roams unfettered.) ...

7 May 2009

Alt.Net UK In The North

I spent much of this weekend over in Bradford, talking shop with the good folks at the Alt.Net UK ‘in the North’ conference. I had a great time, learned much, and am grateful to Richard Fennell of Black Marble and the other organisers and sponsors for making the event possible. This was the first Open Spaces event I’ve attended, and I was pleasantly surprised at how orderly and productive the sessions turned out to be. Unlike conventional sales-pitch conferences of the MSDN roadshow variety, this was more of an open forum, with an expectation that all of the relatively small number (25ish?) of participants would, well, participate! ...

19 April 2009

Seeking Kindred Spirits

I’m coming round to the realization that my hugely enjoyable first contract at Ventura last summer might have been something of an anomaly. That project was decidedly agile, test-driven, and used a bunch of modern technologies including Monorail, ExtJS, Subversion, NUnit and NHibernate. The requirements were well-defined, and the team was highly effective, with a pragmatic project management team who kept the development team free from bureaucratic processes, leaving us able to get on with delivering some cracking software in double-quick time. ...

12 April 2009

Failed MCP Exam 70-553 :(

My current primary client has an annoying habit of closing for random days and half-days, including last Thursday afternoon. I decided to try to make the most of this time off, by taking Microsoft exam 70-553, which has the snappy title “UPGRADE: MCSD Microsoft .NET Skills to MCPD Enterprise Application Developer by Using the Microsoft .NET Framework: Part 1”. I’ve already passed the second part of the upgrade process (70-554), so passing this exam would give me no fewer than four new certifications, including the prestigious MCPD Enterprise Application Developer. ...

12 April 2009

ASP.NET Just Became a Legacy Platform

One of the least surprising but more significant announcements to come out of Mix ‘09 last week was the general availability of ASP.NET MVC 1.0. The development process for this framework has been very transparent, with no fewer than eight previews, betas and release candidates made available over the past year or so. Microsoft are being careful to tout ASP.NET MVC as being “an alternative, not a replacement, for ASP.NET Web Forms”, but just look at their list of some of its benefits: ...

22 March 2009

Zero Interest Bug Arrives

So, base rates are now down to 1.0%, and the Zero Interest Bug is not just conjecture. From The Times: “About 1,500 customers who took out a tracker mortgages pegged at 1.01 points below the base rate with Cheltenham & Gloucester (C&G), owned by Lloyds Banking Group, will be paying no interest at all on their home loans from next month. It is the first time that a mortgage lender has been forced to reduce the interest on their home loans to zero. Lloyds Banking Group, now 43 per cent owned by the taxpayer and also the owner of C&G, said that there was a zero floor to the deal and that because its computer systems could not cope with zero, it would be temporarily charging 0.001 per cent, or 8p a month for a borrower with a £100,000 mortgage. However, that money will be refunded.” ...

5 February 2009