8 requirements that good backup software needs to fulfil

20th May 2010 in General

I’ve been thinking about backup solutions, and have been trying to find one that fits what I need. I have yet to find one, and this post is the first step in outlining what I need (and hopefully what other people need), with the end goal of building the perfect backup solution.

Read the rest of this entry »

Wallpaper goodness

15th February 2010 in General

Quick note, I’ve uploaded some hi-res wallpapers on my photoblog site.

Right, back to work.

On Mono

7th September 2009 in C#, Programming

So, I’ve been playing around with Mono on a virtual machine for a while now, and want to just put down some thoughts. Note that this won’t be an in-depth review of Mono, but just my initial experiences coming from a MS .net background.

(for those of you that don’t know, Mono is an open-source implementation of the .net CLR. Go here for more details. It is actually quite a bit more than that, but coming from using .net, that is the part the interests me – at least at the moment.)

Firstly, one of the interesting things about Mono, is that you can take an assembly compiled using Microsoft’s tools, and run it under Mono, without any changes. Obviously, if you’re talking to the windows registry or using MS specific p-invoke calls, it wont work, but if your code is 100% managed, the chance that it will just work is pretty high.

Tooling

In terms of actually developing directly on Linux and using the Mono tools (rather than the Microsoft ones), there is an IDE called MonoDevelop that comes very close to the functionality of Visual Studio – in places its better (it can even open and save Visual Studio solutions and projects).

All the other usual command line tools are there, most importantly, there is a MSBuild clone called x-build, which lets you use your existing build scripts.

And something that is important for me, NUnit runs fine on mono.

For porting existing projects to Mono, there is a tool, called MoMA, which scans your source code, flagging any areas it identifies as being a potential problem.

Benefits

The most obvious one is that of licensing. Since Mono is open-source, and runs on an open-source operating system, there are zero licensing costs. This is attractive if you’re wanting to have multiple servers running your application. Windows licenses for 20 servers is a non-trivial cost.

Mono is also cross-platform. It runs in environments and on devices where you won’t find the Microsoft .net framework. Taken from the mono site:

Mono is built to be cross platform. Mono runs on Linux, Microsoft Windows, Mac OS X, BSD, and Sun Solaris, Nintendo Wii, Sony PlayStation 3, Apple iPhone. It also runs on x86, x86-64, IA64, PowerPC, SPARC (32), ARM, Alpha, s390, s390x (32 and 64 bits) and more. Developing your application with Mono allows you to run on nearly any computer in existence.

Distribution

I’m not sure about older versions, but the latest version of Ubuntu has Mono installed already. A couple of the pre-installed applications are written in C#.

To be honest, I’ve only used Mono under Ubuntu, so cannot comment on its availability in other distributions, but the Mono website recommends openSUSE.

Conclusion

So, in conclusion, I’m very impressed, well done guys. I’ve not yet had time to take one of our larger projects and get it running on Mono, but that’s the next step.

This is more a note to myself, but below is a list of things I want to investigate further around Mono:

  • Ease of porting a largish existing application to Mono
  • Do common frameworks run on Mono? (things like ASP.NET MVC, NHibernate, Castle Windsor etc)
  • Windows Forms support (this was spotty when I looked at it a couple of years ago – its meant to be better)
  • Performance vs the Microsoft stack

MSI version matching upgrade woes

8th July 2009 in C#, Programming

We’re distributing our .net application using Microsoft’s MSI installer technology (using the very powerful WiX to do it).

We’ve recently seen a problem with the installer not upgrading older versions, but rather just installing on top of the existing version, which results in the application being listed twice in the “Add/remove programs” (Programs and Features in Vista) section, one for each version. This results in weird things happening, like uninstalling one of them leaves the other one still installed with all the application files removed.

I ensured that we kept the same upgrade guid, with the version number incrementing, but all looked good. After searching and trying different things, I finally found this gem, hidden away in the MS documentation:

Note that Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field.

Why?!??

Our version numbers are in the order of 3.2.0.1234, 3.2.0.1456 (where the 4th number increments based on the Subversion revision number). The installer was seeing the version numbers as 3.2.0, i.e. the same, and not uninstalling the old version. Changing the installer version number to 3.2.1234 fixes this.

WP Super Cache not caching (solution)

1st July 2009 in Dwakn, PHP, Web, Wordpress

(this post is more a note to my future self than anything else)

The WP Super Cache plugin for WordPress is a pretty awesome plugin. The other day I was having problems with it not doing any caching and spitting out the following just before the head tag (where the wp_head() call is):

<!-- Page not cached by WP Super Cache. No closing HTML tag. Check your theme. -->

This was very odd. Everything I could find on the web regarding this problem was seeing this tag at the end of the html. Eventually I found a post that sounded similar to mine (and of course now I cannot find it again, unfortunately). It mentioned a plug-in using output buffering incorrectly. This makes sense, as looking in the source code of WP Super Cache, it outputs the message above in its output buffer handler if it cannot find a </html> closing tag. Needless to say, after a couple of hours fiddling, it turns out that it was a plug-in that I had written especially for the site, and it was doing exactly what the post mentioned (i.e. it was calling ob_end_flush() without calling ob_start()).

So it was all my fault, and I’ll probably do it in the future, hence this post!

So, note to self: If you see this in the future, check the plug-ins.