1. Make sure you test your changes. end to end.
  2. Make sure you write unit tests to cover your code. Every possible line
  3. And for the love of God, don’t ask me to review your work when you haven’t taken the time to test it yourself. Not only do you waste my time, but you waste YOUR time which could be spent fixing the problems I discovered anyway.

I’m just about close enough to join Outland….after my 4 months hiatus from WoW, ive basically power levelled my way from 45 to 57 (soon to be 58) in order to catch up with the others.

and then once i’m 70, with PVP gear, i’ll blow the priest away and try a class which can actually tank. stupid cloth armor.

Here i am on the armory.

There are a number of good pages which explain how to enable permalinks and rewrite rules for WordPress, such as:


None of them mentioned my problem – the main apache conf for the website had the setting AllowOverride None.

Hence my .htaccess wasn’t being honoured, hence my redirects weren’t working (and resulted in 404’s). Hence i ripped a clump of my hair out.

gah. hopefully someone stumbles across this and doesn’t waste as much time as i did.

In case i forget or lose the details on how i can post code in my blogs, here it is:

WordPress doesn’t allow you to post HTML code directly into your blogs. Sucks.

A bit of googling turned up embed-it. This WP plugin allows you to post HTML code into your blog. it does using the concept of “Custom Fields”. Essentially they’re parameters in the blog entry which get replaced by whatever code you want on-the-fly..

This frustrates me though because i blog using Drivel in an attempt to make blogging faster and therefore motivate to do it more often. And drivel has no support for this, and i doubt the wordpress RPC interface does either.

oh finally, the C# code formatter – awesome.

wow – I’ve just finished cleaning up a project conversion gone massively awry.

The proejct was originally in classic ASP, but over the years, people have extended it with ASP.NET parts (in this case, webservices).

The hosting provider was asked to configure the main root-folder of the website in IIS6 as a standard website, but a special request was made to the sub-directories into ASP.NET web-application folders.

…and of course here i come cleaning up the entire solution and migrating the classic ASP code to .NET and my deployments all break. why? because the webservices were expecting all of their own binaries to be nested within their sub-directory….a mess of binary files, and the website would just error that the referenced assemblies could not be found.

the solution? uncheck the web-application settings for all sub-directories and move the code binaries into the main bin directory.

i feel there’s more work to come on this solution…. 😐

I love this one. I don’t know the name of the pattern, but i love using it.

Imagine your system uses strings to represent the value of a status field. potential values of this field are:

  • New
  • Requested
  • Open
  • Closed
  • Deferred
  • In Progress
  • More Information Required

…and you want to write a method (or webservice) called UpdateStatus, which takes in one of these values.

Standard signature would look something like this:

public void UpdateStatus(string newStatus)

The use of “string” for the static type has the problem that someone could pass through a rubbish value as a string, and the UpdateStatus method is now responsible for domain validation of the input.

However, following the pattern below, you’re able to statically define your domain (if known at design-time) and enforce the stronger type in subsequent method calls.

public class IssueStatus
	void IssueStatus(string description)
		this.description = description;
		readonly string description;

	public static IssueStatus New = new IssueStatus("New");
	public static IssueStatus Requested = new IssueStatus("Requested");
	public static IssueStatus Open = new IssueStatus("Open");

and you can then use the strong IssueStatus type in your signatures:

public SaveButton_Clicked(object sender, EventArgs e)

public void UpdateStatus(IssueStatus newStatus)
	if (newStatus == IssueStatus.New)
	// do something here

I learnt this one on the job a few years back, and think it’s fantastic.

…and while i’m on the topic of Facebook – LOSE THE SHITTY APPLICATIONS, FACEBOOK!. Your website is becoming overrun by hundreds of thousands of lousy applications, most of which are focused on trying to make a quick buck out of the system.

if you leave something popular open, it will be exploited by those who see monetary value in it’s existence.

Google (on the other hand) use very closed-circuit tactics for managing their software and environment, despite the perception of an open system.

  • 1. Their search technology is closed-source and proprietry
  • 2. Ad-Words is tightly controlled by Google
  • 3. Google CSE
  • 4. Google Maps has no SOAP API – just AJAX.

Where Google makes its success is in providing hundreds of little tools and applications to interface with their technologies within their controlled environment. Facebook gives you open slather to do whatever/whenever and rewards and promotes people for referral of applications – hence it is now a cesspool.

…soon enough the next big thing will be upon us and facebook will slowly phase out if they cant get it under control.

Does it concern most people that Facebook (as one particular example) basically allows you to show and share virtually everything about you?

I don’t particularly care if any of the 390 odd people on my friends list check out my photo gallery, or tagged photos of me, but surely there comes a point when people you haven’t seen or spoken to since forever are able to go through all your info.

one half of me asks “well why are they even on your facebook in the first place, if you haven’t spoken to them for so long?”…..and the truth is….i dont know. i can’t explain my compulsion to want to try and re-contact people from my past. but at the same, i highly doubt i’m the only one does this.

so now you have a growing culture of people just adding each anyone and everyone else…..and access to information is easily available. only those who are truly anal go about changing the privacy settings from the defaults.

At my last job, this quote was printed on an old, half dog-eared, half-torn piece of paper, and stuck to a random pillar in the office.

As fate would have it, I sat next to this pillar for my first few months there, and this message seemed to resonate with me since then. It’s (quietly) one of my life mantras.

I don’t know who came up with the proverb, but i believe it’s quite accurate of how people should be treated (and ironically the complete opposite of how i was treated at the company).

Reward Success – This one is pretty easy. If you do a good job, you should be rewarded for your efforts

Reward Failure – Important point. if you try, but fail. you’re still successful. You’re successful in that you’ve managed to try something new. You’ve managed to attempt something difficult, and although you didn’t get there, you’ve learnt more from failing than you possibly would have from succeeding. Sometimes it’s important to know that by touching a hot iron, you’ll get burnt. lesson learnt for future (yes i’m reliving a childhood memory there 😉

Punish Inaction – Fundamental point. If you do nothing; if you sit back, and let things go on around you without actively addressing the issue, you’ve failed miserably. knowing of a problem and doing nothing about it is the worst course of action that one could take. The problem spirals out of control and the you’re in the thick of it.

Why am i posting? Because i learnt that while i was on holidays a member of my team discovered that one of our computers was compromised, and failed to act on it. I discovered the problem myself, and have taken the (only) course of action which is to bring the servers down and re-build with a post-mortem to come. But to learn of a serious breach of security, and NOT do anything about it is undeniably the complete opposite of how the problem should have been addressed.

Reward Success – if the problem was acted on, then i would be blogging about the reverse right now

Reward Failure – if the problem was discovered, and they were unable to fix it, but managed to contain the damage, that’s still commendable. You can’t hold someone liable if they don’t know how to fix the problem.

Punish Inaction – the problem was not acted on. The problem was left around for nearly 2 months until my return, and subsequent discovery. Who knows how deep the problem has gone, and we’re now all entangled right in the middle.

it’s been a shitty week.

This morning i managed to install run Photoshop under Ubuntu Gutsy. Wine
never stops to amaze me.

At the bare minimum, i was impressed at how the installation was flawless.
well….almost ;)….it looked like it had crashed towards the end, so i
killed the process, but by that stage, everything had already been installed
and registered, it seems.

Once installed, I had to add the Photoshop.exe to run under Windows 2000
emulation, otherwise things like keyboard accelerators aren’t recognised.

and how did it run? Brilliantly. it was clean and fast…..lightning fast.
Working on hi-res images, rotating layers, applying layer masks – all of it
worked at full speed…you’d never guess there was an emulation layer
sitting in the middle.

the only gotcha i seem to be coming across is the error message: “Unable to
continue because of a hardware or system error. Sorry but this error is
unrecoverable.”. It seems that this happens when the user profile becomes
“corrupt” and the only way to fix it is to blow away the photoshop settings
profile on boot. To do this, hold down immediately after
running photoshop, and answer yes when it asks you to delete the preferences

appears tat you have to do this everytime you run the program though. O_o
…..i’m not convinced and i’m sure more digging around will disprove that.