Workbench: Programming, Publishing, Politics, and Popes

Java applet takes forever to run

One of my favorite works of art was executed as a Java applet. I bought Every Icon by John Simon Jr. in May 2000 and have been meaning to put it on my Web site ever since. The display of the work takes several hundred trillion years from start to finish, so I don't feel so bad about taking almost four years to share it on Workbench. ... read more

Java 1.5's quirky new static import

David Flanagan has been experimenting with the new static import feature in Java 2 version 1.5, which provides a shorthand way to refer to class variables: import static java.lang.System.out; class SalutonMondo { public static void main(String[] args) { out.println("Saluton Mondo!"); } } That seems simple enough, but as Flanagan demonstrates, the static import keyword does some things you might not expect. ... read more

Peer into the future with JXTA

My November 2003 Java Matters column for Linux Magazine is now available online. It covers JXTA, a set of XML protocols for peer-to-peer network programming created as an open source project by Bill Joy and Mike Clary at Sun Microsystems. JXTA's an extremely ambitious project with a steep learning curve. A quote from the column: The formulation of networks on the fly, with or without a central server, through firewalls and with authentication and encryption, atop the Internet and other networks -- just writing a ... read more

Native2ascii handles Java's character flaws

Recently, I was struggling in a Java programming project with a huge XML file that was supposed to be in UTF-8 format but contained some non-UTF-8 characters. This prevented it from being parsed by XOM, an open-source XML processing library that militantly rejects non-well-formed XML. One of the things that helped me solve the problem was Kris Wehner's excellent weblog post on dealing with badly encoded character data using Java. His first suggestion is to use native2ascii, one of the lesser-known tools in Sun's ... read more

Apache developers start weblog community

A weblog community has been launched for members of the Apache Software Foundation. Planet Apache is organized through syndication, presenting an aggregated view of weblogs published by Apache developers. It currently includes Sam Ruby, James Strachan, Stefano Mazzocchi, and several dozen others. ... read more

James Gosling on Moore's law

Java inventor James Gosling is using before/after photographs of himself to illustrate Moore's Law, comparing the PDP-8/I mainframe he used for satellite programming in 1969 to a Java smart-card ID from the present: I find it amazing that the hot machine [of 1969], capable of doing all sorts of interesting things with satellite telelemetry (including making high resolution photographs, which was a neat trick with only 8K!), has less horsepower than the cheap piece of disposable plastic [of today]. What will it ... read more

Logging stack traces with Log4J

The Dining.Name Web application uses Log4J, Apache's logging library for Java, to log the behavior of classes that import XML data into a MySQL database. Log4J is a simple class library -- the basics take no more than a half-hour to learn, as I described in a Linux Magazine article in 2002. It supports four levels of logging and external configuration. Right now, I'm building Dining.Name at debug level and getting verbose output. When I'm confident that it works, I'll change it to fatal level by tweaking a ... read more

Subscriptions

Twitter

NFL quarterback Steve McNair dead in apparent murder-suicide. Link about 22 hours ago

Working On






Miscellany

Home | Comments | Books | Code | RSS Feed | RSS Spec | Copyright 2009 World Readable