Wednesday, 31 December 2008


This has caught me out a couple of times now. I was getting this exception: Castle.MicroKernel.ComponentActivator.ComponentActivatorException: ComponentActivator: could not instantiate MyNameSpace.ClassName ---> System.ArgumentNullException: Value cannot be null.
Parameter name: types
at System.Type.GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type implType, Object[] arguments, Type[] s
The exception could be a bit more informative - it turns out this is caused by not providing a public constructor on the class (it was accidentally set to 'protected').

Tuesday, 30 December 2008

RAA Rounding Error

I went to renew our RAA membership this morning. The paper bill said we owe $170.

I went to the web site to pay online, but was greeted by this:

TOTAL (including GST) $170.01

Yes, they’re overcharging me by 1c.

I rang them up to let them know (and also paid the correct amount while I was at it).

Could this be salami slicing, or more likely someone’s made a silly rounding error. Can’t those IT people ever get it right?


Monday, 29 December 2008

Wednesday, 17 December 2008

Fast hard disks

So exactly how much faster are the latest hard disks? A number of people commented that using the old IDE disk on my Dad’s new Vista 64bit box wasn’t the best idea. I grabbed a copy of HD Tune to get some benchmarks of each of the 4 disks in the system to get an idea of how the drives compared.

Here’s what I found:

Measurement IDE Disk 1 IDE Disk 2 WD2000JD WD10EACS
Transfer Rate Minimum (MB/sec) 1.1 7.6 32.1 37.2
Transfer Rate Maximum (MB/sec) 43.5 45.1 55.1 90.5
Transfer Rate Average (MB/sec) 28.8 33.8 48 68.3
Access Time (ms) 14.5 14.3 20.5 15.5
Burst Rate (MB/sec) 53.3 49.8 91.9 124.6


Graph showing relative speeds of 4 hard drives

So that 1Tb drive really is quite a bit faster than the other drives after all.

I’ve since re-configured the new Vista box to use the fast drive for the operating system, and left the other drives in for video files (but with the knowledge that it will be a simple upgrade path to swap them out for additional SATA drives as required).

Monday, 15 December 2008

CAT.NET and Xss

Microsoft Code Analysis Tool .NET is a new tool to detect certain vulnerabilities in your code – including Cross Site Scripting, SQL Injection, Process Command Injection, File Canonicalization, Exception Information, LDAP Injection, XPATH Injection and Redirection to User Controlled Site.

Also there’s a beta release of version 3 of the AntiXSS library which can help reduce the chance of cross-site scripting vulnerabilities in your ASP.NET application.

Tuesday, 2 December 2008

Google Transit for Adelaide

I saw this mentioned on Australian IT today – if you open up Adelaide in Google Maps, you now get the option of listing directions by “public transit”.

So for example, if I wanted to get from “Westbourne Park to Glenelg”, just enter exactly that phrase and search, then click on the ‘public transit’ link

View Larger Map

As you can see from the map, it indicates the bus route (216), then you change to a tram (), then finally you walk (). The directions panel contains bus stop details and the service times.

Ever since I owned an Apple Newton MessagePad and more recently a few Windows Mobile devices I’ve had an idea for an application that would allow you to interactively find out when the next bus was, and tell me what time I would arrive home – taking into account that I used to catch two buses and a train to get home. Well it looks like Google has pretty much implemented that idea for me!

Monday, 1 December 2008

Useful PowerShell snippets (part 1)

Some things I’m finding useful:

Processes running on a machine

Get-WmiObject Win32_Process -ComputerName mymachine | Select { $_.Name }

Currently logged in user on a machine

Get-WmiObject Win32_ComputerSystem -ComputerName MyMachine | Select { $_.UserName }

Does a machine have .NET 3.5 SP1 installed

function Get-Net35SP1([string] $machineName)
    $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $machineName)
    $regKey= $reg.OpenSubKey("SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" )
    if ($regKey -ne $null) {
        Write-Output $regKey.GetValue("SP", 0)
    } else {
        Write-Output "Doesn't have .NET 3.5"