Posts from September 2008

Sep
28
2008

Loading Resources from a Static Class in Java



Posted in Programming

If you’ve ever needed a static method to load a resource, there’s a lot of conflicting information about how to get a resource contained in your JAR. I tried SomeProg.class.getClassLoader() and a few others but ended up with either a null value or an exception. Eventually on a whim I tried the following, which worked.

Read more »

Sep
20
2008

Nicer Permalinks in MovableType



Posted in Programming

I recently switched from WordPress to Movable Type for my software blogs. This site still runs WordPress because there are too many extensions which I need. My software blogs though, were just more or less the same site with different colours and about different products. I only use them for posting new release info and it was too much of an ordeal to update five WordPress blogs everytime an update was released.

One of the more annoying things about Movable type is the URL structure it uses by default. Everything is statically published by default, which works quite well and isn’t a problem in itself, but there’s something about seeing a .html or .php extension which makes a site look amateurish.

There’s an easy way to change Movable Type to use permalinks like http://leghumped.com/post-name instead of http://leghumped.com/2008/09/post-name.html

Read more »