Welcome to my homepage...

My name is David Hammerton. I'm a university student at the University of Melbourne, undertaking a B.Arts (History) and a B.Science (Pure Maths, Computer Science). I'm also a computer programmer, doing consulting work for various companies. I'm an environmental activist, with particular interests in Victoria's forests.

Here you'll find a whole variety of things. the software page describes a very small portion of the software that I have worked on, which I'm making available here. My blog contains random posts about software, environmentalism, politics and other random stuff. Finally, the enviro page contains just a brief overview of areas that are of interest to me, and contains links to some enviro groups and websites I work with.

Feature item...

Check out Snapper. A really cool little screenshot taking application for windows.

Latest blog posts...

Explicit Interface Implementations in C#

June 25, 2008

Well, you learn something new every day. Although explicit interface implementations are fairly common when you are implementing two interfaces with conflicting (ie, the same) member signatures, they can also be used to “hide” a interface member.

While working with the RegistryKey class today, I noticed that even though it implements IDisposable, it does not publicly expose Dispose(). Read on to find out why.

(more…)

Filed under: Software — Tags: — David Hammerton

A Generic Singleton Form Provider for C#

June 19, 2008

An interesting, although generally basic, problem with Windows Forms is how to implement the singleton pattern on the forms. What do I mean? Well, consider this…

You’re writing a Windows Forms application and you have a bunch of Forms, such as a Preference window, an About window and so on. You’d like these forms to be modeless, yet you don’t want the user to be able to create more than one of them.

It’s a common problem, but there’s no built in way to handle it. Moreover, I’ve yet to see an elegant solution to it. The method explained below, which is as elegant as it’s going to get, creates a pseudo-factory class to manage the problem for you. Read on to find out more.

(more…)

Filed under: Software — Tags: , — David Hammerton

The new craz.net!

June 17, 2008

So, welcome to my newly designed website: my little home in cyberspace. Here you’ll find a small collection of things that I have, well, collected, over the years. The software page is probably the most interesting, for now.

This blog will see periodic updates about various topics. Mostly, you’ll see software development related stuff on here, but really, you’ll just have to wait and see. Anyhow, subscribe to the RSS feed and I’ll catch you soon ;-).

Filed under: Uncategorized — Tags: — David Hammerton