Yearly Archives: 2008

.Net Development – XslCompiledTransform with XMLWriter ignores output method

As XslTransform is now obsolete, I now use XslCompiledTransform to transform my XML and XSLT documents. When transforming I want an XmlDocument returned so that I can further manipulate the output, to achieve this I use XMLWriter but for some unknown and baffling reason XMLWriter does not respect the ouput method of the XSL document and will ALWAYS give you XML and by XML I mean closing self closing tags etc. which is no good when you’re outputting HTML with textarea, link and script elements. I hate to do it but the only way to be confident of correct output was to parse the output string and replace these elements using a beefy regular expression. Does anyone else know how to force XHTML or even HTML output when using XMLWriter and XslCompiledTransform. I’ve given up looking.

Triathlon number 3 – Llanrwst 2008

Last weekend I completed my third triathlon (Llanrwst tri 2008) but this time it was in Wales (where I live now). It was a 400m swim in a very small 20m pool, 25km bike ride on a surprisingly hilly course and finally a 5km run on a very hilly course which was half road and half off-road in a forest. It was a great day and I was very happy with my times and my position (23rd/172). My speedo on my bike decided to stop showing me my speed so I had to rely on how much my thighs were burning and my Garmin 405 to know how I was doing. Pete’s Dad took the photo below of me coming out of the second transition and starting my run. Despite the smile my legs were on fire and felt like jelly after the bike.

Triathlon-Llanrwst-2008-Phil-cropped-2-web.jpg

Adidas marathon series 2008

Last year I competed in the Adidas Frank Duffy 10 mile race and came 487th overall. I’ve been training non-stop since then and last Saturday I did the same race again and came 143rd taking nearly 11 minutes off my time (1:04:44 this year). You can see from the photos below that it wasn’t an easy race to say the least 🙂

Frank Duffy 10 mile 2008

I ran with the guy on the left of the picture for about 3 miles before he lost me. I nearly caught him at the end though.

Frank Duffy 10 mile 2008

A sprint to the finish.

About a month ago I also did the Adidas 5 mile runner challenge and came 123rd (31:21).

Adidas 5 mile 2008

Next year I’ll be setting my sights on the top 100…… Bring on the marathon.

On another note, the proof watermark is there because marathonfoto.com want €25 for each photo…. OUTRAGEOUS!!!!!

Archive of an SVN changeset

All too often I need to release changes to a staging or live server and I always felt the releases were taking too long.

At Karova we use SVN and I always try and commit any releases in one changeset. I wrote a python script to archive all the files listed in a changeset. It’s been very very useful so far. Simply run the python script in the root of your repos and you will be prompted for the changeset number. The script then archives all the files in that changeset in a zip file named by changeset. You’ll need the svn client in your path for it to work though.

svnarchivebychangeset.zip

Enjoy.

Too long in visual studio?

When do you know when you spend too long in visual studio?

When you finish writing a document in Open Office and find yourself repeatedly ‘Ctrl+Shift+B’ ing. I chuckled out loud when I realised what I’d just done. I think it’s a default muscle reflex now, just ‘Ctrl+S’ is.

Web Application installations with Wix…. Awesome

This week I set off with the goal of making one of our web applications alot easier to deploy. The tools I chose were –

  1. Web Application Installer (WAI)
  2. Wix (Windows Installer XML)
  3. WixEdit

I’d played with all three before but never really got past prototype stage. I’ve spent the last day learning wix and all the elements relevant to me. The Web Application Installer is collection of scripts and a template for different types of web applications. Firstly you use WAI to generate a list of files to install and the use WixEdit to edit that list and many other properties of the wix installation. Once happy with the configuration of the installation WixEdit will generate an msi for installation on your target machine. They truly are an excellent collection of tools. I now have an msi installer that sets up a web site in IIS, sets the ASP.NET version to 2, sets all the required permissions, creates a DB in SQL Server Express (specifying where to save the mdf and ldf files too) and changes the connection string in web.config accordingly. Todays quota of job satisfaction has now been achieved – saving about an hour per install (I’ve to install this app 28 times for different clients so the work was definitely worth while).

One huge pit fall which made me silly amounts of angry was that the SQL script you use to generate the tables and initial data for your database MUST be saved in Unicode (UTF-8). If it’s not then wix won’t be able to read it. I lost 3 hours yesterday with this!!!! as SQL server management studio express by default saves to UCS-2 Big Endian. Very little documentation on this fact so hopefully this post will help a little.

British Gas continue to amaze

Yet again British Gas have been at it. Last December the electricity account for my old house was closed after hours on the phone and email trying to get the account set up first (after two years) so that I could close it. Last week I was on holiday and came back to two letters stating I owed £241 for electricity used form June to December. I then got another letter today threatening legal action. Why on earth did this take 8 months!!!!!!!!!!!!!!!!.

They didn’t have any forwarding address and found me from my new account in my appartment here which I didn’t think was very fair.

What a crowd of shams. I’m livid here, I thought I was done with all that hassle.

Norway Holiday 2008 – Epic

I’m just back from my, what is turning out to be, annual trip to my Mum’s summer house on the Helgeland islands off the coast of Norway. It’s a long journey involving 2 planes, an overnight ferry and a short car ferry. Well worth it though. Myself and my brother were there on our own for a few days before the rest of the family arrived (9 adults and 3 kids at the end of the trip). I did plenty of fishing, running, cycling, swimming, walking, reading, baby sitting and eating. The summer house is not yet finished it’s renovation so we spent some time helping out getting things order – specifically the sewage system in the cellar which invloved digging up the concrete in the cellar and laying new pipes (a fun job 🙁 ). I took loads of photos which are all online @ http://halfviking.com/norwayjuly2008/ – below I’ve chosen a few of the best ones.
norwayjuly2008 An arty photo attempt with my shades and one of the flies that pestered us for most of the mountain trip.
norwayjuly2008 Base camp on the mountain with a lovely river to the left and lakes scattered throughout the peaks of the island’s mountain.
norwayjuly2008

Cooking some of our catch
norwayjuly2008 Very very tasty – especially after a days fishing and hiking.
norwayjuly2008 Mid air pose. The water was freeeeeezing!!!
norwayjuly2008 Some of the farm’s horses roamed along by the shore. Very friendly beasts.
norwayjuly2008 My brother fishing on the shore
norwayjuly2008 My white self up the mountains
norwayjuly2008 In total we caught 94 trout in just over two days up the mountain.
norwayjuly2008 Count them…. 94!!!!
norwayjuly2008 One of the most amazing sunset’s I’ve ever seen.
norwayjuly2008 Me and the sunset and Peter in the background supping down a well deserved brewski.
norwayjuly2008 Ringnes… My Norwegian beer of choice. Only because it’s the cheapest mind you.

Where is the godforsaken context!!! [email etiquette]

The time has come for another rant about the proper use of email.

I spend a lot of my time in my inbox and far too often I receive email that just infuriates me. There are a few rules I follow and live in hope that some day others will follow too.

  • email account name: Your email account name eg. “Philip Roche” should include your company name eg. “Philip Roche (Karova)”. This helps people know who you are and what company you’re from without having to check the email address domain.
  • email subject: Always have a descriptive subject. You need to describe the contents in the email in a few words. NEVER send an email without a subject, It will more than likely get ignored. The subject should under every circumstance relate to the contents of the email.
  • describe context of the email: Every email needs context, you wouldn’t start a normal spoken conversation without some context as to what you’re talking about so why should it be any different in an email.
  • signature: Every email should have a signature and the signature should include your full name, title, company name, company url and  phone number. Don’t include your logo in your signature, you’re just clogging up my inbox with pointless graphic attachments.
  • forwarding: When forwarding an email to someone – always explain why you’re forwarding it.
  • simplicity: Keep your email styles simple (font family and colour).
  • replying: When replying to an email, reply inline – it’s a lot easier to follow and the context of your comment is already there.

It’s all about context. All the above suggestions will help in the searchability, readability, understandability, sorting and professionalism of an email.

Follow these suggestions and I guarantee that the recipients of your emails will appreciate it (unbeknownst to them or not).

Did I miss anything?

Wimbledon 2008

I rarely watch tennis apart from when I’m staying at my Mums who’s quite a fan of the sport. I do however always watch Winbledon. this year I thought was spectacular – especially the final last night. Raffa Nadal and Roger Federer are absolute machines. They played for well over four hours with two only two short breaks (due to rain) and the fourth and fifth sets were phenomenal – I’ve never seen anything like it.

I also saw wheelchair tennis for the first time – holy mosses those guys are fast on their chairs.