Database Design – Still Important In These ORM-Obsessed Days

Tobin blogged earlier this week about how quality ORM tools like NHibernate make it easier to code to normalized schemas. Here’s a corollary for you: The use of ORM tools doesn’t absolve the need to maintain good database design principles, and even NHibernate won’t save you from your own stupidity. Following an application upgrade release last night, I’ve spent a disproportionate amount of today trying to debug the following exception, which appeared to originate in an area of the codebase which I personally had heavily modified: ...

29 July 2008

Remember The Milk

In response to a blog post that I’d shared in Google Reader, Jez emailed me to ask: “Do you use RTM? It’s always been one of those web apps that seem really useful, but I’ve never made the leap to actually using it in anger. I suppose you need to adopt it in tandem with the five-point GTD philosophy to get real benefit?” My response: “Yes, I do use RTM, and I love it. I’ve been looking for a decent way of managing my to-do lists effectively for years, and RTM really scratches that itch! I now have the web app permanently open in a Firefox tab, and use “MilkSync” to synchronize with my Pocket PC every half hour. ...

26 June 2008

On the Joys of Object-Relational Mapping

My name is Ian Nelson. I’m a recovering SQL addict. It’s been four weeks since my last stored procedure. One of my reasons for leaving my cosy permanent job and entering the scary cut-throat world of freelancing was to get a broader exposure to different tools, technologies and methodologies, while remaining with my feet planted firmly in the .NET universe. So, when I got offered a position in a team who were using Subversion, Monorail, Ext.JS, NUnit, Oracle and NHibernate, I jumped at the opportunity. ...

9 April 2008

Going For It

I’ve never been a fan of those motivational posters that you see on office walls (usually in sales or marketing departments) that attempt to depict a word like “Opportunity” or “Teamwork” with a single image, usual of some nature scene or a lone individual rising above the odds to achieve a difficult goal. To my mind they always look a bit facile, glib and superficial. “Destiny” equates to a holiday villa on the Maldives? “Integrity” is a Lion? “Success” appears to involve hang-gliding off towards the ocean in an action which brings to mind Reginald Perrin?! I demand more thought and more words from my motivational office decorations! ...

14 January 2008

Inside Microsoft SQL Server 2005: The Storage Engine

During 2007, I unexpectedly achieved a long-held ambition by increasing the number of books I regularly read (as opposed to merely buying, then leaving them to languish on the bookcase!). I read plenty of techie books of course, but also made use of local libraries and devoured plenty of books on other subjects, and even found time for some fiction. I think having a young baby in the house was partially responsible for this achievement – not much else to do of an evening any more! ...

5 January 2008

Family Tree Update

With the return of the dark wintry nights to this sceptered isle, I’ve been taking the opportunity to flesh out my Family Tree a little more. And it isn’t just the addition of young Benjamin – since I last uploaded a tree eleven months ago, I’ve increased the number of individuals in my database by 55, to a total of 1114 from 307 family groups. But more than that, the quality and number of facts for many individuals has increased. This year, I’m trying to methodically work through my ancestors in a bit more detail and fill in some of the tricky gaps that I left last year when everything was new to me and there were plenty of “easy pickings” to be had. ...

31 December 2007

A LINQ Gotcha – First Operator

So, I was using the First operator to return the first item element in a sequence matching a predicate. I expected a null to be returned if the sequence did not contain any matching elements, but found (well, Scott found) that this actually throws an InvalidOperationException. Turns out I should have been using the FirstOrDefault operator instead…

14 December 2007

Edge Cases

Ten years of professional software development have given me a healthy awareness of edge cases – I’m always trying to code defensively, validate input, catch exceptions, use assertions, and of course pick holes in sloppy specifications (“ah, but what if…”). I must learn that these skills should not always be applied to my personal life though, as exemplified by a conversation with The Wife yesterday: _Jocelyn (excitedly): “We’re going to have a ‘Secret Santa’ for all the babies in our antenatal group!” Me: “Huh. How does that work then?” Jocelyn: “Well, we each buy a gift for under £10, put them into a bag, and each pick one.” Me: “What happens if you pick out the gift you bought?” Jocelyn (less excitedly): “Well, you put it back and pick another.” Me: “So, you have an even number of babies in the group?” Jocelyn (testily): “There are seven.” Me: “Then what happens if the last person picks their own gift?” Jocelyn (deflated): “Ian…! OK, so we won’t open any gifts until they’re all selected – happy now?” ...

10 December 2007

Benjamin George Nelson

It gives me unparalleled joy to announce the birth of Mr Benjamin George Nelson. Following a relatively swift labour, the new arrival entered the world suddenly at York Hospital on Wednesday at 22:24 local time (see this time in your time zone). Birth mass was 4.185 kilograms (9 pounds 3 ounces), length was 51 centimetres (20 inches).

27 July 2007

Paulo's Last Munro Photos

I’ve finally gotten round to processing and uploading photos from Paulo’s Last Munro weekend. The weather on Ben More was truly appalling, so the majority of the images were, unsurprisingly, taken within the cosy confines of the Craignure Inn, who gave us a wonderfully warm welcome.

4 July 2007

Software Architect 2007

Last week I had the pleasure of spending a few days in London attending the Software Architect 2007 conference at the Barbican centre. It was a good conference, providing me with some useful and interesting new ideas and food for thought, whilst confirming that our team at Marshalls are generally going about things in “the right way”, which is nice. Looking through my notes, the main themes that kept recurring within the different presentations that I attended were: ...

17 June 2007

A C# Postcode Struct with Parser

As discussed recently, I’ve been trying to knock together a class struct to represent a UK postcode, provide a means of parsing a string as potentially being a valid postcode (or optionally just an outer code), and split that postcode into “outer” and “inner” code. I say potentially because, as you’ll know if you’ve looked into this topic at all, it’s impossible to validate whether a string truly does represent a postcode without querying the (copyrighted and expensive-to-license) Postcode Address File. As a result, my solution is not very stringent – it is possible to persuade it to successfully parse an invalid postcode, but hopefully there should be no occasions when a valid postcode is rejected. ...

29 May 2007

Postcode Validation

Wikipedia cracks me up sometimes. I’m sat here at my desk, trying to knock together some C# code to quickly validate an entered string as being a UK postcode. Naturally I turned to this Wikipedia article for assistance, where I find this quip: “Automatic validation of postcodes on the basis of pattern feasibility is therefore almost impossible to design, and the system contains no self-validating feature such as a check digit. Completely accurate validation is only possible by attempting to deliver mail to the address, and verifying with the recipient.” ...

23 May 2007

SQL 2005 Unleashed

Many moons (and about four jobs) ago, a wise DBA by the name of David Hanson once recommended to me a book called Microsoft SQL Server 2000 Unleashed. I took his advice, bought a copy, and it rapidly became one of the most dog-eared and oft-thumbed computing books I have ever owned. It is comprehensive, deep, broad, well-written and covers everything one might ever wish to know about SQL Server 2000. With its help and guidance I came to love and respect Microsoft’s premier database product, passing the 70-229 exam by a comfortable margin. ...

18 May 2007

MSDN Technical Roadshow 2007

I’m off to the MSDN Technical roadshow in Harrogate tomorrow, and am actually really looking forward to it this time. These events are free, so always well worth attending when they’re local, but some years are certainly better than others – it mostly depends on the material being covered. I remember one year circa 2003-4, when .NET was well established, but before the Whidbey release, so the majority of the day was effectively just a sales pitch covering elementary .NET concepts, presumably for those laggards who hadn’t yet made the great leap from VB6. Another data-binding demo, anybody? Yawn. ...

12 March 2007