I keep wondering… Why is it actually so hard to handle exceptions correctly?
There are a few ground rules to follow and still people tend to overcatch or throw far too general exception types. As a recent empirical study suggests, this seems to be a general problem throughout software development. There is a brief, very well written guideline for .NET development, I keep waving at my team. I bet there is a similar guide for Java as well – any suggestions?
But I think the problem with exceptions is not just some guidelines that should be followed. Not every developer (and certainly not every customer) is comfortable with the ideal of error that may pop up from out of nowhere. Errors are silently suppressed for the better looks. But missing functionality cannot be hidden. If it doesn’t save, it doesn’t save and I certainly want to know that…
Logging is a way, but there is no path around exceptions in object-oriented programming. Taken that, there is also no way around a fail fast ideology. If something has gone wrong and I cannot do anything about it, it’s best to tell the world and not to brush it under the carpet. That’s also the best way to learn, by the way.
So, the first thing to establish proper exception handling seems to be the introduction of a culture of openly accepted mistakes. “Anything we find now, we won’t find later on.” should be the new motto.
The day started promising with Jonathan Aldrich’s talk on “Assuring Object-Oriented Architecture”. For me as a software architect, this was the talk of the conference. He was giving a wonderful round trip through the various approaches on assuring architectures. I made loads of notes.
Frankly, the only other talk that really caught my attention on that day was Michael Haupt’s talk on a machine model for AOP. But it was the last day and I was already a little bit “fed up”. Michael’s talk on his and Hans’ work was very inspiring, although I did not understand everything.
In summary, it was good conference that really filled by agenda for the next month and has provided me with some directions for the next years. Which is actually quite nice, because that was the reason why I came in the first place. Another thing: It really encouraged me to find my research area and do a little bit of publication work myself. We’ll see.
Whoa, this have been some weeks. Sorry about the delay, but my workload was a bit over the top. 🙂
In addition to my last post, I also attended a rather interesting talk given by Mandana Vaziri of IBM Research. About the possibility to declare a notion of object identity beyond the error prone equals/hashCode approach. She has given an insight in the long term goal of querying the heap in the way of a relational database. My mind kept wandering after the talk. It seems like quite a change to the common OO model, but at the same time quite interesting. Much of the current efforts of keeping data objects in data structures would be rendered unneccesary…
On the second day, the Dahl-Nygard Prizes were awarded to Jonathan Aldrich and Luca Cardelli. Cardelli had his talk afterwards about his whole personal history from Simula to C# (He is now at Microsoft Research.).
In the afternoon, I skipped the session on Language Design in favour of a demo session. The first demo was Gael Fraiteur’s demo of PostSharp, a static aspect weaver for .NET. It actually has loads of interesting features and I surely will blog some of my experience with it here. On a side note, it takes quite some guts to travel to a scientific conference such as the ECOOP and talk about the real life features for real life developers the project features, leaving out all to scientific terms not to annoy potential developers. (Especially with Michael Haupt in the audience, grinding his teeth over more than just the overtime Gael took, I think.)
The second demo featured Tours and Traps, a student project from the Hasso-Plattner-Institute, presented by Peter Osburg and Michael Perscheid. It is a system for the planning of tours for a context aware mobile system, which also features traffic information. They implemented it in Smalltalk with Seaside. Each team member was new to Smalltalk, but they managed to deliver working software in a six month time frame without considerable overtime. In the discussion after the talk, we took some time to talk about the role of motivation as a key to project success. Quite inspiring.