Category Archives: software

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.

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.

Using Wireshark

We had a support ticket at Karova which resulted in me having to look at the http data being sent between two servers via Soap over http. I’d read about Wireshark before and had it downloaded already. I installed it – found a way to filter the captured data by IP address and logged all traffic between both servers. All in under three minutes. It’s a awesome piece of software, I’ve been meaning for so long to re-visit the workings of the http protocol but always let it slide down my list. With Wireshark you can at least see what you’re learning in practice.

Step away from the code

Since coming back to Karova, I’ve been doing ALOT more management of projects than I did before. Usually what happens is I get the projects once they’ve been spec’d (and prototype’d if appropriate) and then I manage the completion of the project from dev->staging->live and then pass it back to billing.

We always have a good number of projects on the go and my stack is always packed full of project details. The problem I’m having though is being able to step away from the code. I love coding and I know of no other feeling (achievable in an office environment) better than being in the "zone". With so many projects on-going it’s imperative that I delegate rather than try and get stuck in too much even if I know I am most familiar with a piece of software or technology.

It’s a great opportunity for me to step back from code and focus more on managaing and looking at things from a technologist point of view rather than a coder. Under that role I have already been able to play with Linq, ASP.NET 3.5 and SubSonic. Has anybody been in the same situation and have some advice?. For now I just know I need to stay disciplined and step away from the urge to start ‘xslt’ing and coding my ass off.

Outlook is awesome

Outlook is awesomely crapOutlook is awesomely crap. I really do hate it. It hangs all the time. It’s rules are rubbish and not very intuitive to set up. I can’t “edit as new” and it’s tagging/flagging is not very good as the flagged state of an email is not very apparent. It also irks me that it insists on SHOUTING it’s process name to me in the task manager “OUTLOOK.EXE”. Where are thou oh loveliest of loveliest thunderbird :). Rant over

Ajax header image rotation

Previously on Philroche.net, the header images were populated from a PHP Array which generated a ul with javascript links to change the header image. Not nice as it relied on javascript. After some ajaxian fun, the list is now generated from an XML playlist and the list is fully accessible with click events attached to each link to change the header image. You can view all the source below but there’s also an example page. Please note that this is version 0.1 (read- possibly buggy) so if there’s any problems let me know and I’ll debug.

Source code

Geek resolutions

As it’s new year and my motivation is at an all time low, I think a list of TODOs (or new years resultions) is needed. Some of those listed are techy and some are not but all of them are aimed at improving my life.

I will

  • Finish the new design of this site – as you can see, it’s still a work in progress
  • Comment my code
  • Finish projects I have started
  • Document my code properly
  • Use UML – even if it’s just in my head
  • Move to Ubuntu on my home machine
  • Caption all my photos – all 8500 of them
  • Read all the books I bought
  • Read non-techy books too
  • Cook more
  • Eat less
  • Eat healthier
  • Find some way of feeling healthier that I can actually stick to (Gym is a bit too much commitment)
  • Start to budget my outgoings properly
  • Stop calling my dog “the rodent”
  • Learn that Friday does not have to equal “getpissedday”
  • Stop watching soap operas – comedy series like King of Queens and Scrubs will remain on my Sky+ planner though
  • Contribute to an open source project
  • Help fellow developers more
  • Always keep in mind that I know only a fraction of what I think I know
  • Be in a good mood
  • Write another useful Firefox extension that uses a custom XPCOM component
  • Use Patterns in code more
  • Stop driving like an idiot just so I can get home quicker
  • Go to Ireland to see my friends and family more
  • Go to the summer house in Norway
  • Save money
  • And finally – keep this blog up to date

There’s quite a few there so I think it’s more of a two year plan. I have been working on an eight year plan with Gill too, but it’s still a bit up in the air but very exciting – as along as all goes well –

I will also (I thought of some more)

  • Move to IMAP instead of POP email
  • Backup more
  • Learn how to use SVN properly
  • Go to LinuxWorld in London (as long as it’s not on Gill’s birthday like last year)
  • Get a whiteboard at home
  • ……..I’ll add some more as I think of them

Christmas Charity – the Open Source way

Every year for the last few years I have given to charity at Christmas. Last year it was Oxfam but this year I wanted to do something a bit different. In the early days of Aggreg8 development, I got a $10 donation and it freaked me out, I coded for days with a crazy energy and a boosted ego, knowing that someone thought that what I was doing was worth some of their hard earned cash. So this year, I have decided to give $5 to 10 different Open Source projects. The projects I have chosen are ones that I use on a day to day basis and really admire.

If we could all do something like this then Open source would continue to thrive and we will all reap the benefits for years and years to come. Joel noted that most people don’t want credit for donating but I do as donating is clearly not a selfless act ;).