When and what to throw

July 23, 2007

Interesting post from Elliotte Harold, proposing a new nomenclature for exceptions, whereby checked exceptions are referred to as “external” and runtime exceptions as “internal”.

The discussion is also interesting. Like Ingo, the guidance I’ve been giving is to only throw a checked exception if it’s conceivable that the caller could do something about it. This is fine, but not so useful for programmers who lack the experience to spot opportunities for good error handling. I’ll give the internal / external approach a bash and see how it goes with people.

DSpace Foundation

July 17, 2007

Plenty of coverage of the launch of the DSpace foundation today. It’s been a long time coming, and I’d like to congratulate Michele Kimpton and congratulate and thank Julie Walker, MacKenzie Smith and others at HP and MIT who’ve worked over the last couple of years to make the foundation a reality.

P.S. It’s only now that I realize that “DSpace Foundation” sounds like an Asimov novel. No bad thing! 🙂

C#: Fat or Fit?

July 12, 2007

In C# 3.0 Considered Rubenesque?, David Ing considers (mainly) whether C# needs the functional extensions being proposed for v3.0 and by the by touches on a discussion I’ve been having internally about Java, Python and Erlang. The main points for me revolve around language complexity, the timing of the need for functional programming and when not to abstract.

Elliotte Harold has been vocal against adding complexity to the Java language. The complexity loving geek in my stamps his foot (“… but I want properties / closures / etc”) but Elliotte’s right – programming languages don’t have to accrete features, and in the real world most Java programmers get dazed and confused if you throw inner classes at them. On the other hand python has managed to support a functional style of programming (although I’m told that this isn’t totally pythonic) and is still considered easy to learn, so perhaps it can be done simply.

You don’t need to reach for Mother Shipton’s almanac to know that functional programming languages are going to be hugely important, with processors now not getting much faster, but gaining more cores. The languages that enable normal rank and file developers to take advantage of that are going to win in the way memory managed languages did, and in the way dynamic languages are doing. The question is not really “if” but “when”, and the answer probably depends who you are and what you need to do.

If I were writing an data analysis program to run a cluster (say 32 machines with dual-dual processors), then I’d be reaching for any language that let me use them as efficiently as possible – give the air con something to think about. Even if I had a dual-dual server dedicated to a single service I’d probably do so too, even though I’d be unlikely to get a 4x speed up due to I/O contention (example from Pragmatic Programmer). Most of our current web facing servers (where most of my code will end up running) are single or dual core, and aren’t due for an upgrade any time soon. So I’m better off sticking to what I know for now.

The final point is probably the most important, since it’s not future gazing: –

There is a school of thought that when you’re working with a relational database rather than a collection of in-memory objects, then you should not lose track of the various nuances and advantages of the stores – abstraction to save typing can come back to bite you?

Replace “working with a relational database” with “machine boundary” or “transactions” and it’s still true. Remember the first law of software complexity – you can’t get rid of complexity, just move it around. The more amazing an abstraction is at hiding complexity from you, the more likely it is to leak.

Stuart Lewis, via the DSpace UKUG list: –


Dear all,

The slides from the latest DSpace UK & Ireland User Group meeting are
now online:

http://hdl.handle.net/2160/315

Videos from the event will be posted in a few weeks time.

If you want an update on the progress of the DSpace Foundation, I can
highly recommend the presentation from the Executive Director of the
DSpace Foundation, Michele Kimpton.

http://cadair.aber.ac.uk/dspace/bitstream/2160/316/1/DSpace+Foundation.pdf

Miscellaneous links

July 11, 2007

Chemistry Central (and PMR) link the SPECTRa final report.

Nico Adams blogs about the Polymer Builder I’m now responsible for developing.

A couple of frameworks I’ve been playing with (for a pet project that got scooped by PMR at the end of a recent post).

Les Carr joins the blogosphere.

After the persistence of a shoulder problem was ascribed to my work posture I’ve been using work monitors to remind me to take “straighten up” breaks, and can recommend both Workrave (Win, Linux) and AntiRSS (OSX). Both far less irritating than their predecessors of a couple of years ago.

OSS watch have published a report by Julie Walker (commissioned by the JISC) entitled DSpace: a case study in sustainability, which explains the origins and progress of DSpace’s transition from closed to open source and the development of a more formal governance structure.

The DSpace@Cambridge project is looking for a DSpace developer.

I finished working for the SPECTRa-T project last Friday. As of today, I’m employed by the Unilever Centre. I’ll still be providing technical advice and software development management for the SPECTRa-T project, and involved in various JISC groups (especially the SWORD project which, incidentally has been garnering approval already!)

The role at the Unilever Centre basically splits into two parts. I’ll be working as software development co-ordinator and integrator (pumpkin holder) on the polymer informatics project, and I’ll be expanding the work I’ve been doing in my ‘spare time’ providing support for software engineering in the centre, with a much greater emphasis on providing training and best practice advice.

The SPECTRa-T project has appointed a developer, who will arrive (and be introduced!) in a couple of weeks. In the meantime, if you’re interested in the project, some initial documentation is appearing on the spectra-chem sourceforge site.