Friday, August 29, 2008

Java Applets

Java Applets

Some years back, when I was teaching myself Java, I put a couple of Java applets up on my web page that I had written. One of them was a cute little visual toy that I called "Pong on Speed" (even though it wasn't really a video game). The other was a generic plotting tool that took CSV (comma separated variables) files and plotted them. The first data sets that I made available were crime statistics (crimes per 100,000 people) for California counties for the period 1952-1993. (Yes, I had strange notions of what to do with my spare time back then, transcribing data from ancient history--back before any of this stuff was available in a machine readable form.)

Anyway, back when I was doing this, the various web browsers in common use weren't too smart about Java applets. To solve this, I had to put all sorts of stupid JavaScript in there to get them to work with the common web browsers.

Well, the world moves forward. Just about everyone seems to know about the APPLET HTML tag now--and the old JavaScript didn't work with Firefox, and probably a few other browsers. So I went through, cleaned up the mess--and I believe that these should work with all browsers.

Yes, I didn't worry much about this because I wasn't looking for a Java job. Now I suppose that having this stuff operational might be worthwhile.

In case it isn't obvious: the crime plotting applet displays the rates for all counties, and the state as a whole. Pulling down on Plot to the Configuration menu lets you select a county or multiply select counties.

I also took the opportunity to put some Google AdSense advertising at the top as well. How appropriate that the first ad that came out on the Robbery page was MoveOn offering to give away one million Obama buttons!

No comments:

Post a Comment