Sun 11 Jul 2004
Java on OS X
Category : Technology/javaOSX.txt
Just a word about WWDC. It seems like we're all on our own in the way we're using Java on OS X. We're building Cocoa applications using Java.
Attend a Cocoa talk, and it's all about Objective-C. Attend a Java talk, it's all about J2EE (which we are using) and things like Swing (or call Cocoa using, horrors, JNI).
If you're doing Java, there's no CoreData API for you (yet). Neither WebKit. Nor Cocoa Bindings.
So one can't help feeling that Java programmers are second-class citizens in the Cocoa world.
Then why do I feel, even more, that we're on the right track?
Well, if you're on Objective-C, even with Cocoa Bindings and CoreData, you're still only going to be allowed to call a SQL database locally, on the same machine as the application. Whereas, using JDBC, we can already call our accounting database from half-way around the world.
And you've got to wait for Tiger to come out. Because, then, OS X would have SQLite bundled in. But we've already waited four years for MySQL to get almost all the critical functionality of Oracle. I'd hate to have to wait another four years for SQLite to catch up. Apple may have valid reasons for their choice but SQLite doesn't interest me at all.
And I've heard people asking for better XML and WebServices support in Objective-C. Well, we've already got that, right now, in Java. And try writing a web server application in Objective-C. Or modelling the business workflows and business rules.
I wish Java is as elegant as Objective-C. But we've got to get something done now.
We're going to continue walking to the beat of our own drum. Probably the best way of maintaining our sanity. Luca proves that you can write a complete, full featured Cocoa application using Java. And you can do a bit more and make a web-server based application out of it. Or a cross-platform Swing application. And that's probably all we need now.
Posted at 1:35PM UTC | permalink
Category : Commentary/crash.txt
The server was down for about ten hours yesterday. The building we're on switched over to a new air-conditioning system yesterday and we had to switch off everything for the recommended ten-hour stretch - if we didn't want anything to be damaged in the event of a power surge.
It would have been easy to switch the server over to the spare iMac I had running at home (I've done that before and switched servers, on the fly, within 30 minutes, in the ultimate test of disaster recovery) but somehow, this time, I just let things crash.
It's been difficult to get going the last few days - so many things to do, along so many axes. So it's good to crash and start all over again.
Sorry, if you were trying to get hold of something here. Normal services are resuming and the process of recovery starts now.
Posted at 12:36PM UTC | permalink
Category : Commentary/wind.txt
I have the answer to my own question. It takes longer to fly back to Singapore than to fly to San Francisco because there is a constant headwind that reduces the speed of the aircraft by about 15-20%. (When flying to San Francisco, the plane was aided by a slight tailwind.) That's why it takes about 20% longer to fly back, increasing the journey by more than 2 hours.
So the next question is: why is there a headwind? And I believe it's like that the whole year round because it always takes longer to fly back. Why does the wind always blow from west to east, at least at high altitudes? What makes this puzzling is because I know, from sailing dinghies off Changi, that the wind usually blow in-shore from the east?
A quick search through Google turns up these two articles : What makes the wind? and Weather Systems from West to East.
So the earth's rotation is indeed the cause. But it's counter-intuitive. We should expect to reach Singapore faster when coming back from San Francisco because the earth's rotation swings Singapore back towards us.
But the earth's rotation also causes the hot air that rises from the equator, on its way towards the poles, to move east. This is because, due to something called the Coriolis effect, they maintain the speed of rotation at the equator.
"So, as these winds travel away from the equator, they move eastward relative to the ground beneath them - since the winds have a greater rotational speed than the ground. This explains why high altitude winds blow from west to east. And it is these high altitude winds that, to a large extent, control the weather."
So, mystery solved. But the point I'm getting at is that we can learn almost anything we want from the world-wide web, without going through formal school. Here's to Tim Berners-Lee.
Posted at 12:23PM UTC | permalink