Friday, May 25, 2012

I just have to share this with you

A link has been going around among the Bioclipse developers lately. It links to a page in japanese using the Bioclipse scripting language (BSL). As my japanese is non-existing, I have had to depend on google translate to understand their text. Google translate actually seems to make a good job but the BSL code is even easier to understand. What the script does is taking the output from Metaprint2D and visualise it in 3d using Jmol.

This is just the sort of thing I was envisioning back in the days when we drew up the design for Bioclipse 2 with scripting (as can be found on some old dusty wiki page). The addition of a scripting language truly give the users the power to do things the developers of the program did not think of. What nice things can you do with BSL that we haven't thought of? :)

Tuesday, March 6, 2012

I just got asked to explain my choice of exception in a blog post

Today I got back to writing Bioclipse code for a while. The pile of bug reports had become big enough for a day of Bioclipse work. Among other things I added code to create the "Gists" project where newly downloaded gists are stored. That was something that had been working but which now had been forgotten in some refactoring. Anyway, as can be seen in the commit, the project.create and methods throws CoreExceptions and I decided to catch them an rethrow a RuntimeException.

What also can be seen is that Egon wondered why not to throw a BioclipseException. I will now attempt to answer. However first let me say that the exception handling of Bioclipse probably is a bit of a mess...

Bioclipse exceptions are used for user friendly error messages. In my perfect world they contain an explanation of what went wrong and how to avoid similar things in the future. They are presented in a somewhat different dialog and are just generally more polished. However, in this case the error would be of the "This should not happend" sort. Meaning if we fail to create or open that project we are in great trouble and we do not want the polished error dialog but the real one with stack trace and the whole shebang.

Then again, as I said. The Exception handling of Bioclipse could really use some love and this is just my thoughts on it...