Interfaces vs. Classes

Tuesday, November 14th, 2006

Apparently XOM and JDOM aren’t the only projects to consider interfaces to be more trouble than they’re worth. I just noticed that JAXB 2.0 now uses singles classes for its generated files rather than separate interfaces and implementation classes like version 1.0 did. Given that these are generated code that should not be directly modified or extended by the programmer, this seems an obvious choice.

Estimated Complexity

Monday, November 13th, 2006

From the Apache Harmony bug tracker:

Unknown Novice Moderate Advanced Guru Needs James Gosling

Porting a Java Program to PHP

Sunday, November 12th, 2006

In Processing XML with Java, I used an example of plain text, XML-RPC, and SOAP clients that communicate with a Fibonacci number server I run here on www.elharo.com. Originally I wrote the servers in Java using the Java Servlet API. However, problems with Tomcat meant that the server went down every few months. When I moved this server from Linux to a Mac I didn’t even bother to reinstall Tomcat, and instead decided to port the servers to PHP 5. PHP has its own idiosyncrasies, but I use it for other things on this server (including this blog), and it didn’t seem worth keeping Tomcat running just for a few simple scripts.
(more…)

Getting to Empty

Saturday, November 11th, 2006

Today I reached a milestone I haven’t seen in years: an empty inbox. Well actually, not quite, but close enough. There are now exactly 423 messages in my inbox and each one of them has one of four labels:

Action
Something needs to be done about this message
News
A tidbit I’ll eventually post one of my web sites
Waiting
Something I’ll need in the near future, but not until I get a response from someone else
Read and Review
Something interesting to look over when I have a minute, but not urgent. Mostly weekly updates from sites like IBM developerWorks and JavaWorld.

Along with Thunderbird’s built-in “Unread” label and sorting by date, these allow me to quickly and easily see what I need to deal with at any given time. Only the relatively small number of “Action” messages actually require me to do something. News, Waiting, and Read and Review can all be managed as time or interest permits. This also means I shouldn’t lose track of messages I need to reply to or act on for months, as I sometimes have in the past.

Several thousand other messages have been archived into various folders. This is all part of my ongoing efforts to implement David Allen’s Getting Things Done program.
(more…)

Ad-blocking Yahoo Groups

Friday, November 10th, 2006

Recently Yahoo Groups mailing lists seemed to all start sending out obnoxious image ads in various messages:

Yahoo Mail Ads

Needless to say, this makes me a lot less likely to subscribe to yahoogroups mailing lists. Most new lists are going to Google anyway. However there are several legacy groups I subscribe to that probably aren’t going to switch immediately.
(more…)

AWT on the Event Dispatch Thread?

Friday, November 10th, 2006

Last night I was teaching my Intro Java class about Swing windows, and specifically discussing the event dispatch thread. I dutifully warned everyone that all creation and update of Swing components had to happen on this thread, usually by calling SwingUtilties.invokeLater(). Then one of my students asked a question that stumped me:

Is the same true for AWT components?
(more…)