Archive for the ‘observable java’ Category

Swing has it backwards

Monday, April 2nd, 2007

One of the questions that I have been asked (and have asked myself) is why I’m even doing this project when Swing seems to give you a viable alternative. For example, for a JList, you can grab the ListModel and use it to register for event changes on the JList. At first, this all seems well and good, except for a really important issue: this is backwards.

(more…)

be careful of the hashCode()

Sunday, April 1st, 2007

Update:

As it turns out, I was (mostly) being a horse’s ass.  It was a bit difficult to find, but Java does provide a mechanism for getting the equivalent of Object.hashCode() on any given object (not in a general way, i.e. get the un-overridden behavior, but for this case specifically).  That method is System.identityHashCode().

One of the side-effects of the way Java is designed is that it is hard to identify an object. By this, I don’t mean identifying it by its apparent value, as in a List is the same as another list with the same stuff in the same order. What I mean is identifying an object as this object, not by its value, but by its physical existence in the whole program world thingamabobber. This usually isn’t too big of a problem, until you really start working with the collection framework’s HashMap.

(more…)

multiple inheritance or something like it

Sunday, March 25th, 2007

I’ve always felt slightly offended by the people who write off multiple inheritance in one fell swoop as being something akin to the fight against guns – it’s always misused, and there is no real useful purpose, so we might as well get rid of it in its entirety. There is a slight truth to the statement, as it applies to both guns and MI (the misuse, for example), but the conclusion is oh. so. wrong.

(more…)

Independent Study – It Begins!

Monday, March 19th, 2007

For my last quarter at RIT, I decided to take as few courses as possible to stay a full-time student (and thus keep my scholarships) and still graduate. Since I’m required to do a 2 credit honors project, I figured that if I also did a 2 credit independent study and took 2 other courses, I would have a total of 12 credits, which is full-time. To that end, I’ve decided to do an independent study around observable collections in Java. Time to put my money where my mouth is, I suppose.

(more…)