Saturday, 27 June 2009

Saasu

(or two things I remember from this month's SQL Server user group meeting)

This month, Rob presented on "SQL in the cloud". It was an interesting talk, if nothing else for the interesting direction(s) that Microsoft have taken trying to get this whole "cloud database" concept up and running.

Rob's joke turned out to be quite good (considering the context of a SQL Server User Group - "A man walks into a bar, sees two TABLEs and says 'Can I JOIN you?"

The other thing which he mentioned as part of a discussion on cloud computing was Saasu – an online accounting site. Think MYOB or Quicken but entirely online. This attracted my interest as I've been using MYOB Business Basics to track Narelle's scrapbooking business for a few years, and I've come to discover that particular product isn't really suited to a reseller type business.

Saasu is free to join and if you keep below 15 transactions a month it is free to use. Following the familiar service model, once you start using it more often than that you need to pay a small amount each month. That cost would probably be less than having to buy an upgrade for MYOB each year, so it is quite competitive. Even though it's a global site, they have facilities for handling Australian accounting and tax requirements (eg. GST and BAS).

So far, I'm quite impressed, especially considering they support handling inventory (something Business Basics couldn't even do).

Monday, 22 June 2009

Tracing and logging WPF

Whilst researching unit testing WPF applications I came across Bob King's answer to this question on StackOverflow.

WPF DataBinding can appear to be a bit of a mysterious black box, but I now know that you can enable diagnostic trace sources to see what's happening under the covers. Mike Hillberg shows some examples in this post.

Saturday, 20 June 2009

42% discount from Manning

I saw today on Jeffery Palermo's blog that Manning are offering a limited time discount on "Alt.Net" books if you use the discount code "alt42" before June 25th. I've taken up the offer and ordered the following:

Some good reading, and just in time to claim for a tax deduction too.

Wednesday, 17 June 2009

Error message of the day – "Something has went wrong"

And I think I was probably the one who was responsible – a bit said for someone who normally does take the time to correct grammar and spelling errors :-)

Thankfully not something end-users get to see, but it does seem quite appropriate for an error (in an ironic kind of way).

Sunday, 14 June 2009

David and Fiona Meier

It’s not every day that your sister gets married, but it was yesterday!

My sister Fiona married her fiancé David Meier at The Corner Uniting Church.

The service was lovely and it was great to see lot of family and friends there. Following an afternoon tea at the church, we joined the bridal party for photos, then after leaving the kids with a babysitter headed off to the reception at Belair Park Country Club (situated in the grounds of Belair National Park).

The reception was very enjoyable, with musical entertainment provided by Heidy De Ruyter. Some really good speeches were given by the best man, bridesmaids and both fathers of the groom and bride.

My mum (the mother of the bride) came out of retirement to make possibly her last wedding cake, and she did a fantastic job.

Sometime you hear of weddings that don’t go to plan, have awkward moments or end up with the bride (and others) distressed and embarrassed. Maybe you’ve even attended one? I’m pleased to report that yesterday it was nothing like that! Everyone (especially the bride and groom) had a great time, enjoyed themselves immensely and went home knowing that David and Fiona are going to be very happy together.

Fiona and David chose Meg Hansen as their professional photographer (I took the ones you see here!) and Pete Dobré as videographer (who when he’s not videoing wedding can be found taking spectacular photos of Australian landscapes)

Monday, 8 June 2009

CodeCampSA website

I could keep dropping hints waiting for CodeCampSA to get its own site – or I could just go ahead and create it myself!

So, I’m please to announce www.codecampsa.com – the new home of Adelaide’s own .NET Code Camp.

So let’s get the word out amongst Adelaide’s .NET community. Pass the word to your colleagues and developer friends. Tell any higher education or training organisations – what a great way for students to network and make contacts in the industry!

If the name “CodeCamp” puts people off, feel free to call it a “.NET Conference”! In fact call it what ever you like to get people to come along, because once they’re in the door I’m confident they’ll be glad they came.

Friday, 5 June 2009

CodeCampSA 2009

According to an email from ADNUG’s Peter Griffith, Adelaide’s CodeCampSA 2009 will be held on July 18-19th. As in previous years, it will be at UniSA.

I’ve offered to do a talk about Pex. I wouldn’t be surprised to see WPF guru Nigel popping up on the speaker list, and I’ve encouraged Ben and Timothy to think about whether they’d be interested in speaking too.

I still think having a CodeCampSA website would be a great help for promoting the event too.

Wednesday, 3 June 2009

When PreRelease really means Release

Once upon a time, I’d installed the 180-day trial version of SQL Server 2008, and prior to that I’d been running the last CTP.

The expiry time was fast approaching, and I also needed to install the Integration Services components so I figured it might be time to uninstall the trial version and install the proper licensed one instead. The main reason I’d been putting this off was I knew it was going to take a few hours of uninstall/reinstall.

So I uninstalled everything in Add/Remove Programs that looked vaguely related to SQL Server, rebooted, then installed a fresh version….

Only to see “10.0.1600.22 ((SQL_PreRelease).080709-1414 )” in the About box of SQL Server Management Studio.

Hmm.. In desperation I then uninstalled everything vaguely related to Visual Studio 2008, and then tried again…

Same result!

It was only then that I found this post in which I discovered that no, SQL_PreRelease really means RTM!

Oh well, I guess it means my Visual Studio and SQL installs are fresher, but a bit of a pain nonetheless.

Monday, 1 June 2009

"Parameter count mismatch" calling Resolve<T>()

I was seeing this exception being thrown in some code recently:

System.Reflection.TargetParameterCountException: Parameter count mismatch.
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at Castle.Core.ReflectionBasedDictionaryAdapter..ctor(Object target)
   at Castle.MicroKernel.DefaultKernel.Resolve[T](Object argumentsAsAnonymousType)

The original source line was something like this:

IDictionary<string, object> args = new Dictionary<string, object>();
args.Add( "paramName", "value" );

_kernel.Resolve<ISomething>( args );

That all looks fine, and let’s assume the Something class has indeed a constructor with a string parameter named ‘paramName’. So why isn’t it working?

I should have noticed the clue[1] in the stack trace, but was sure I had identical code elsewhere that was working correctly, so it had me stumped. It was only after taking a break from the code, then playing around with a very simple test project that I realised that while there is a method Resolve<T>(IDictionary), that’s not the one that was being called here. Why? Because instead of using var, I’d declared the variable to be an IDictionary<string, object> – and surprisingly that interface does not imply you implement IDictionary (the non-generic version).

When I went back and checked other instances of the code that were working, sure enough I was using var and because Dictionary<> does implement both IDictionary<> and IDictionary it was working as expected.

[1] The clue was the type and parameter name for Resolve - “Object argumentsAsAnonymousType” is obviously not the same as IDictionary!