Detecting BlackBerry JDE Version

Recently, I went back and added some preprocessor code (it’s pretty much necessary in the world of J2ME) to ensure that Hecl would compile with older versions of the BlackBerry JDE. However, I also faced a problem: how to figure out what version of the JDE we’re using. It could be my latest cold clouding my mind, but I couldn’t find a simple way to do this. It never seems to be simple with the BlackBerry platform, unfortunately.

I did, however, finally find a nice way to obtain this information programmatically: the bin/rapc.jar file, which ships with the JDE, contains a file called app.version, which, indeed, contains the version of the JDE in use. I hacked up this code to read it and print it out:

File Selector for Java ME

I recently did some work to make Hecl read files, which also means that it can execute Hecl scripts from the phone’s memory. This is especially important for environments like Blackberry, where we will be distributing a signed version of the Hecl application. To create your own Hecl applications, instead of simply replacing the script in the .jar file, you can point to a script on the device’s file system. This is also available for normal Java ME phones, but unfortunately, for an open source project, the cost of a code signing certificate are prohibitive (on Blackberry, it’s only $20, so I bought one with my own money).

In any case, as part of this effort, I developed a very simple ‘file browser’, which is used in Hecl to select a script to execute.

The results are, like all of Hecl, available under an Apache license, which means that you can use it pretty much wherever you want:

http://github.com/davidw/hecl/blob/master/files/org/hecl/files/FileFinder.java

http://github.com/davidw/hecl/blob/master/files/org/hecl/files/FileFinderCallback.java

Of course, if you spot any ways to improve it or fix problems with it, I’d appreciate it if you sent patches back.

Mysql, Oracle and the European Commission

I am a bit of a cynic, and my cynic-sense definitely lit up when I read this:

http://monty-says.blogspot.com/2009/12/help-saving-mysql.html

He wants to have his cake and eat it too. Or as they say in Italian, he wants to have his wife drunk and the barrel full (really!).

He sold Mysql to Sun for a great deal of money – around one billion dollars. Even if his share is only 1% (which I doubt), that is still 10 million dollars, which is enough for anyone normal to live the rest of their life without ever having to work again. If he walked away with 10% of the deal, that’s 100 million dollars.

Monty writes:

I have spent the last 27 years creating and working on MySQL and I hope, together with my team of MySQL core developers, to work on it for many more years.

Since it’s under the GPL, he can do that himself for as long as he wants – he doesn’t have to worry about making a living, after all. If he took away something closer to the 100 million number, he can also fund several of his friends to work on it for years and years, without worrying much about income. They could always do consulting if they wanted to make a few bucks, in any case.

Now, what he’s worried about is that Oracle will no longer put money into Mysql. I agree that that’s a real risk.

However, I also think that since it’s Oracle’s money that is being spent, they have the right to do as they see fit, within certain limits, and this case is well within those limits. My view is that there are plenty of cases when governments should intervene. For instance, if Mysql were the only competitor to Oracle in the database market, it might be quite unhealthy to let them buy it. But that’s not the case – not at all. There are numerous competitors, both closed and open.

So the risk to ‘the public’ is relative: people bought into a product that may now stagnate, but if they really want, they have plenty of other places they can jump without too much pain (SQL is a standard, after all). It’s like if FreeBSD disappeared tomorrow: you could switch to OpenBSD or Linux or something else. Perhaps not painlessly, but it wouldn’t be the end of the world, either (let’s hope FreeBSD has a long and happy future ahead of it, though).

We’re back to wanting to both have and eat the cake: Monty seems to want the EC to force Oracle to divest itself of Mysql or impose various restrictions on its development. If he had imposed those conditions on Sun when that sale was made, they might not have done the deal, or placed a smaller value on it. He didn’t, but now he is back and trying to impose them on a deal in which he is not a participant (although I suppose he may have some Sun shares). That doesn’t strike me as being entirely fair: if he really wanted to ensure the future of Mysql, he would not have sold the company.

In terms of open source, keep in mind that Mysql was not released under the GPL until 2001:

http://www.mysql.com/news-and-events/generate-article.php?id=23

For many years it was under a “sort of open” license that was not proper open source.

Then there’s the Richard Stallman angle: that somehow, Mysql “deserves” to have developers funded to work on it. I don’t buy that, either. Mysql is a nice project, but I don’t think that there’s any moral imperative that the government should step in and fund some open source projects. Should the EC step in and say that Oracle should also fund Postgres development while they’re at it? There are plenty of deserving projects that could use some cash to fund their development. For instance, my friend Salvatore is looking for donations for Redis development. It’s not as big or “important” a project as Mysql, but it’s good code and already being taken up by various companies. For that matter, I’d like to keep working on Hecl full time.

In short: I hope that the EC approves the sale “as-is”. I also hope that Oracle continues to take good care of Mysql, but if they don’t, that is ultimately their decision as long as there remain plenty of competitors in the market.

I think that our time as “the open source community” is better spent fighting for more important things: against bad software patents, for open standards in governments, and that sort of thing, that will benefit everyone, rather than trying to wrest control of Monty’s code back from Oracle after he’s already been paid handsomely for it.

So Long, Debian

I went ahead and officially retired from Debian today. It’s something I probably ought to have done a while ago, but have been putting off. I’ve had some great times with Debian and met a lot of good people. Debian is also where I really got my start with free software. For me, and others, Debian is something of a stepping stone: it’s fairly easy to start packaging up some program, and before you know it, you’re hooked on the whole open source thing. These days I mostly use Ubuntu, but hold Debian in very high regard in terms of the technical quality. And I’m also glad that they’ve held the line on free software over the years: with a Debian CD, I know I can make as many copies as I want for anyone, and use it both myself and for whatever commercial applications my clients need. How cool is that?