Skip to main content

Gabriele Carcassi

Gabriele Carcassi has been working for more than 10 years in scientific computing. Is currently employed by the Brookhaven National Laboratory in the control systems group for the National Synchroton Light Source II, building tools for physics and machine operation.

 

carcassi's blog

Generics puzzle

Posted by carcassi on August 4, 2011 at 12:18 PM EDT

Running integration tests and unit tests separately in Maven

Posted by carcassi on April 21, 2011 at 4:56 PM EDT

If you, like me, need to build libraries that need to be tested against a live server (integration tests), here's what you can do.

Applets/JavaFx in OpenSocial/iGoogle (and bugs that need to be fixed...)

Posted by carcassi on December 30, 2010 at 12:40 PM EST

I have started to look for some framework to put together in the same web page different contributions from loosely coupled applications.

How to prevent an applet from being silently closed (with unsaved data)

Posted by carcassi on September 27, 2010 at 2:05 PM EDT

It is generally a good idea to ask the user before closing an application without saving the data. If you deploy an applet, the situation is even worse: the user may get distracted, follow some link, forget what he was doing, and close the whole browser without realizing he closed the applet too. Fortunately, it's very simple to tell the browser to display a warning.

Two problems with generics in Java

Posted by carcassi on April 9, 2010 at 8:21 AM EDT

Since generics were out and I started using them, there were always a few cases in which I couldn't make them do what I wanted. I always thought it was my problem, and that I didn't understand what was going on... Turns out: it's not. There are at least two things that are implemented in a way that break what I thought were very safe expectations.

Building a fluent API (internal DSL) in Java

Posted by carcassi on February 4, 2010 at 4:53 PM EST

In this post I am going to sum up things I have learned while creating a fluent API (or internal DSL) in Java. I'll talk about the search API I created for my current position: it's not a toy problem, it's a real problem, which has a significant amount of complexity. Because of that complexity, you get to see techniques and ideas that you don't usually see in toy examples.

Simple guide to checked exceptions

Posted by carcassi on September 25, 2009 at 1:11 PM EDT

While much have been written on checked vs unchecked exceptions, I found very little practical, down to earth, advice on how and why to use them. Here are my thoughts after years of rumination.

Java plug-in wish list: JVM scope

Posted by carcassi on March 5, 2009 at 3:11 PM EST

The second generation plug-in really made me reconsider applet as a viable deployment method (though people who are not aware of the improvements think I am crazy). For the project I am working on (http://irmis.sourceforge.net/) we decided that the user interface would be a series of applets that communicate through a Java API to a REST Web Service.

Scripting Java with Javascript: trapping Swing events

Posted by carcassi on November 12, 2008 at 10:59 AM EST

A few months ago, we had to decide which technology to use for the front end gui of our project. We ended up choosing Swing/Applets due to the progress that they both have done in the past couple of years.

Finite State Machine with Annotations

Posted by carcassi on February 2, 2007 at 9:16 PM EST

This is an exercise that I did more or less an year ago to learn how to use annotations. The idea is to use the then new Java 5.0 language features to create finite state machines with no separate configuration files. By this time, probably there are already a million implementation around, but the excercise did help me quite a bit to understand how annotations can be used.