Digital Magpie

Ooh, ooh, look - shiny things!

Swing Font Defaults

Fonts in Java look as ugly as sin, we all know this. Now, if you’re writing your own app or have the source code then you can get around this by setting the rendering hints on your JComponents. But if you don’t have the code, or can’t alter it because, for example, it would invalidate a support contract, is there any way of telling swing to use antialiasing on fonts by default? I’m hoping that there is some magic value that I can just add to my swing.properties file and be done with it, but an hour of searching on the net hasn’t found out what it is.

Java Multiple Inheritance

Can somebody answer this question for me please: why does this code not work?

1
2
3
4
5
6
7
8
9
10
11
12
13
interface FooNode {
  public FooNode getSelf();
}
class BarNode {
  public BarNode getSelf() {
    return this;
  }
}
class FooBarNode extends BarNode implements FooNode {
  public FooBarNode getSelf() {
    return this;
  }
}

As far as I can see it should be fine, since FooBarNode is a FooNode and also is a BarNode the compiler should have nothing to complain about. Of course it doesn’t work, and I can see that this is so from the language specification; but the question remains: why? My complaint is really that this breaks the semantic model completely. What, in essence, is being said by the FooNode.getSelf() interface method is that it returns an object which conforms to the FooNode interface. Given that FooBarNode does conform to this interface it should be fine as a return type from this method. I assume that there is some deep reason, probably to do with efficiency of the virtual machine, why the language behaves like this; but having seen some of the design decisions to come out of Sun’s Java group I wouldn’t be too surprised if it was just an accidental fuck up.

Irrational Opinions

What Charles Miller is that the ability to hold irrational opinions is taught at an early age by a large number of schools in the states. That whole Creationism thing just cracks me up every time I hear somebody mention it (God given right Charles? What were you thinking when you wrote that!). To answer Lonita in the comments who mentions the right to bear arms, that’s an irrational belief as well. My understanding is that you get to keep and bear arms in order to be able to defend yourself from the tyranny of the government; now, is that really a practical attitude to take in an age where arms capable of doing this must, of necessity, include tanks, aircraft, chemical and biological agents and so on?

Eclipse & Netbeans

Talk of merging Eclipse and NetBeans is off then, according to this recent post. I can’t say that I’m surprised, since many of the differences between the two ‘platforms’ have become religious issues. What I’d like to see, however, is soome commonality and code sharing between the two where it makes sense. For example in the resource management / virtual file system APIs, or their action API. This kind of thing would make writing plugins that work with multiple IDEs much easier, and would avoid duplication of effort, allowing the developers to enhance the two products in new ways.

Gnome Wish List

My thoughts on the OS News Gnome wish list, others have already commented. Now I haven’t been following too closely the new features in 2.6, but here’s my thoughts anyway:

  • Nautilus Scripting a new plugin API and smart menu merging would go a long way to making Nautilus cooler, assuming of course that developers step up to the base and write plugins for it! And by the way, we really need to change the (legally incredibly dodgy) icon for this app!

  • Spatial Mode I can’t wait for this, assuming the implementation doesn’t totally suck it will be way cool.

  • Metacity Features Viewports == Crack. But the magnetic windows feature in metacity is broken, so it’s fair game for criticism as far as I’m concerned.

  • File Selector The new file selector does suck. As far as I can see the two problems with the current file selector are that it looks ugly as fuck, and that it lacks even basic features. The proposed new design solves the fugly problem but doesn’t appear to add any features. I’d like to see, at least, improved filtering, and more details of files being displayed.

  • Development Tools I don’t use Glade so I don’t know whether it sucks or not. I suspect the same is true of Eugenia so these comments don’t really seem fair. That said, what I’d really like to see is a GUI builder integrated with Eclipse, maybe as a new back end for the VE project.

  • Drag and drop, copy and paste Yeah, this sucks, but now that there are Free Desktop specs for this the situation should improve.

I’ll update this as I get time over the next couple of days.