Monthly Archive for: ‘January, 2005’
I love my DAB
Here’s a technology that I do appreciate though – DAB Digital radio. For Christmas Jocelyn gave me a Pure PocketDAB 1000, and it’s bloody brilliant – one of the most thoughtful gifts I’ve received in a long time (especially when combined with the Sony headphones she gave me for my last birthday).
One caveat before I continue – you really do need to make sure that you’re in an area with good quality reception, or you’re likely to find the whole experience quite frustrating as I discovered on Christmas Day. Our home doesn’t receive a good signal, rendering a gorgeous bit of kit virtually worthless. However, at the office I have a perfect reception, so my days are now filled with crystal clear BBC 6 Music from dawn to dusk, and it really does brighten my days (and it goes without saying that I’m a more productive coder as a result
I love the eclectic nature of 6 Music, even during “prime time” – it’s really rekindled my love of music which was previously suffering from a poor diet of the mass-market stations. God bless the BBC; this is worth the license fee alone.
VoIP – am I missing something?
I like to think of myself as an early-adopter, but I just don’t get all the hype surrounding Skype and VoIP in general. What, exactly, is the point? Why would I want to waste some of my valuable bandwidth on voice conversations when I have two perfectly good telephone lines for doing that?
Every time I read about VoIP it’s sold on the low price of calls, but landline call charges (in the UK at least) are a pittance, at least if you stear clear of the big players like BT. Joce and I use 1899.com for our landline calls, and pay just a 3p connection fee for all our calls to the UK and USA – how can you beat that? Over the past few months we’ve only racked up a few quid worth of calls, so I just don’t see that it’s worth the effort going the VoIP route.
If I’m missing something, let me know. I’ve been wrong before, but all this hype seems misplaced to me..
Lexy’s Stag Do
Much respect to everybody who turned out for Alex’s stag do in Edinburgh at the weekend. I think it’s fair to say that a truly excellent time was had by all, and we even managed to entertain some of the locals with our antics. I hope my own stagger in Newcastle this April is as much fun.
A bunch of poor quality blurred photos are available for your viewing pleasure at http://www.flickr.com/photos/iannelson/sets/311974/ , and if anybody else has some pics to add to this collection, feel free to pass them on to me.
Comment Spam
Bah. Comment spam is driving me utterly crazy. I reluctantly resorted to implementing a Captcha to my blog entries which has worked well, but now my nGallery photos are being bombarded with hundreds of online poker adverts every day – so I’ve had to turn off comments on the gallery for now. This really sucks, even more so than email spam IMHO – it’s just so incredibly rude…
Two random conversations with my future wife
From earlier this week:
Jocelyn: "I bought you another shirt today."
Me: "Cool, thanks."
Jocelyn: "Hey, incidentally, what shirt size do you take, anyway?"
Me: "When we have kids, I’m going to teach them mathematics."
Jocelyn: "I’m going to teach them history."
Me: "Who won the Battle of Agincourt?"
Jocelyn: (pause) "OK, you can do the British history too. I’ll teach them American and Middle-Eastern history."
I love her so.
Wedding List (UK)
Those kind generous souls amongst you will be interested to know that we have today set up a wedding gift list in the UK at Debenhams. Click here to view the full list, or call into any Debenhams store (a store locator is here).
Our list in the USA is held at Macy’s, and can be found at this link.
Thank you in advance for any presents, and those already received at Jocelyn’s bridal shower last Autumn.
Framework for persisting .NET classes into SQL Server image fields, with locking ability
There seems to have been a lack of .NET-related stuff on this blog recently, so let me show you something I cobbled together for work purposes last Wednesday:
A common requirement we have in our ASP.NET applications is how to reliably persist object instances for a lengthy period of time. End users shouldn’t have to concern themselves with the concept of Session expiry, and it’s unacceptable for them to return to their PC after nipping off for a coffee to be confronted with the dreaded "Object reference not set to an instance of an object" when they try to continue editing their basket / sales order / timesheet / whatever.
One pattern to solve this, detailed by Martin Fowler in Patterns of Enterprise Application Architecture, is the Serialized LOB (Large Object), which works by serializing the object in question into binary or text which is then stored in a single database field.
An excellent example of how to achieve this using SQL Server and .NET is given by Peter A Bromberg in this Egghead Cafe article.
Building on this example, I’ve put together a generic assembly for persisting and retrieving serializable classes into SQL Server, referenced by a combination of two strings (a username and a key). It is essentially an alternative to storing objects in Session or ViewState. As an additional benefit, it allows you to "lock" objects based on the key, so that only one user can store the same object at a given point in time.
The zip file below includes the source and a SQL script for setting up the required database table and four stored procedures, as well as some unit tests (yes, I am sticking to my New Year’s Resolution!).
The DataStore class contains the various static methods necessary to add, retrieve and delete objects from the store. For example, to save an object you can simply make a call along the lines of:
DataStore.Add("joebloggs","order1234",objOrder);
DataStore.Add("joebloggs","order1234",objOrder,true);
SalesOrder objOrder = DataStore.Get("joebloggs","order1234").StoredObject as SalesOrder;
Updated 30 October 2005:
I’ve reworked this code for .NET 2.0, and removed the dependency on the Microsoft Data Access Application Block. Also, the NUnit tests have been replaced with VS2005 unit tests.
- Download .NET 2.0 version (86 Kb)
- Download .NET 1.1 version (116 Kb)
Rhubarb and Gay Sex Bombs…
…although admittedly not together, unless you count the way in which these two quirky news stories found themselves nestling next to each other in my inbox this evening:
First, Jez found this corking piece of reportage from The Times on Saturday:
A WOMAN who attacked her 72-year-old brother with rhubarb is facing an anti-social behaviour order after her neighbours complained.
Residents of Askrigg, a village in the Yorkshire Dales, say that Margaret Porter, 50, of nearby Newbiggin, caused “fear in the community”.
Porter assaulted her brother, William Porter, with whom she does not speak, in May last year. He had incensed her by laughing at her. She hurled three sticks of rhubarb that she was carrying at him, hitting him in the eye, which he reported to the police. Porter admitted common assault and returned to court yesterday for sentencing.
http://www.timesonline.co.uk/printFriendly/0,,1-2-1440613,00.html
Then Rosie told me about the much-reported news that The Pentagon had considered developing chemical bombs intended to persuade enemy combatants to make love, not war (as long as they could put up with the stink):
Sky News:
It was hoped their “distasteful but completely non-lethal” homosexual behaviour would hit moral in the barracks, the New Scientist reports.
http://www.sky.com/skynews/article/0,,31500-13282758,00.html
BBC:
Researchers pondered a “Who? Me?” bomb, which would simulate flatulence in enemy ranks.
Indeed, a “Who? Me?” device had been under consideration since 1945, the government papers say.
However, researchers concluded that the premise for such a device was fatally flawed because “people in many areas of the world do not find faecal odour offensive, since they smell it on a regular basis”.
http://news.bbc.co.uk/1/hi/world/americas/4174519.stm
You couldn’t make this stuff up!
.NET SP1 broke my blogs :-(
Thanks to Jez for pointing out that since I rebuilt my server over the New Year period, the submit buttons on my sites haven’t been working on certain versions of Internet Explorer. Turns out it was entirely due to my being a good boy and installing Service Pack 1 for the .NET Framework, as this thread from Paul Wilson’s blog explains:
http://weblogs.asp.net/pwilson/archive/2004/09/16/230591.aspx
The problem is resolved by copying the newer version of WebUIValidation.js into the aspnet_client folders for each website. There’s one to remember for the future.
Upside: Everything still worked fine in Firefox and other “down-level” (arf!) browsers which don’t benefit from the WebUIValidation.js code.
Downside: Everything also still worked fine for the evil comment spammers who POST directly to the relevant URL and bypass the form and it’s submit button altogether. So I’m good for online poker and viagra links for a while, thanks.








