Archive for July, 2003

SJUG Javablogs

Thursday, July 31st, 2003

Brendan and I went along to the local Java user’s group, SJUG, to hear Mike’s presentation on Javablogs and its technology. I liked the presentation and it was good to catch up with a few people. I’m playing around with webwork2 right now so that it was quite relevant to me.

I sat behind Dion so I could heckle him about Maven – just kidding. It was good to chat. One of Mike’s slides was about Maven and it actually generated a fair bit of discussion. It was good and I took away some of the issues people are having with Ant so that was useful.

Considering that we had the developers and contributors of Checkstyle, Clover, Jira, Javablogs, the Ant and Maven PMC chairs, and who knows who else, there, you’d have to say that Aussie Java is pretty healthy.

I guess that Brett Porter must have been there although I do not know him. Cool.

Maybe we should do a Sydney JavaBloggers dinner.

Dropped from JavaBlogs?

Saturday, July 19th, 2003

Hmmm, I added this blog to Java blogs a while ago and now it seems to be gone. Was it a technical glitch or did I not produce enough Java releated stuff? I’ll try again …

Shutdown hooks

Tuesday, July 15th, 2003

I recently worked on an Ant bug report to do with shutdown hooks. This bug involves the firing of shutdown hooks in JVMs started with Ant’s <java> task when Ant itself is shutdown.

The bug in Ant was that these processes were not given time to complete once they had been destroyed (that sounds pretty funny but it’s true). i.e. These processes did not get to fire or complete their own shutdown hooks. This is now fixed. Unfortunately that only works on Unix systems since Windows does not fire the shutdown hook at all. JDK 1.3 seems to fire the shutdown hook but it is not allowed to complete fully. JDK 1.4 does not fire it at all.

I’m not into bashing Sun but the “Not a bug” response in Bug 4485742 leaves me nonplussed. I’ve added my 2c but I doubt anyone would see this. Perhaps it is worth raising this again as a new bug.

Ant 1.6 is cooking

Tuesday, July 15th, 2003

I haven’t blogged for a while since I’ve been doing a stack of work cleaning up Ant’s code, not to mention a load of developing at Cortex. One of the things I’m trying to get happening right now is Ant 1.6. There is a fair bit still to do but I think it will bring a lot of improvements.

We’ve begun seriously checkstyling the code. I’ve deferred doing much in this area in the past due to the parallel Ant 1.5 branch. Trying to merge across a bunch of style related fixes is not fun.

I had dinner with Oliver the other night (plus Matt, Brendan and Malcolm). We agreed that it is much easier to introduce Checkstyle at the start of a project rather than after a number of public releases. Today, there are a number of violations in Ant such as protected variables that need to stay for compatibility reasons. Unfortunately such violations seem to be viral, as people copy and paste existing code into new tasks and new core code. Matt’s solution is a bit extreme. Anyway, we are making progress on Ant in that regard.

I’ve also removed the use of the lcp.bat classpath utility currently used to launch Ant under Windows. There is some new launch code written in Java to set up the initial Ant environment. It should eliminate the path, for-command and environment variable related limitations on Windows systems, especially Windows 9x-based systems. Amazing how many people do development on those systems.

I want to encourage as much testing of this release as possible. Perhaps a preview release before a final 1.6 release would work.

Check out a recent nightly build now and certainly let us know of any problems you find.

ICFP2003

Tuesday, July 1st, 2003

Matt and I both entered this year’s ICFP programming contest.. I have to say thanks to Matt since I used his GUI code with a few hacks to work on my solution. We also kicked around ideas and chatted on Yahoo in the wee hours of Saturday night.

It was tremendous fun to watch my little car repeatedly crashing into the wall and then trying again, getting a little better most times. I achieved some reasonable times in the end but nowhere near the top league of results that I have seen. I have uploaded my submission here. You are free to check it out. You’ll realize just how much I relied on Matt’s GUI. My main contribution is in the LapDriver class. Funny when you are trying to code quickly – fields quickly become public and there is lots of dead code from experiments that didn’t work out. My times were

track

1 2 3 4 5 6 7 8 9
time

10307

16346

18557

20957

6351

5399

3989

10884

Not attempted

It makes you realise just how incredible the human brain really is. Just looking at the track picture, anybody could find a reasonable path in seconds. Sure we can optimise that with a computer program and we can write that program with a little effort. But to write a program to find that initial path – that is hard. Not only that, it’s amazing how the brain can keep the rest of you going when you should have been asleep hours ago.

Speaking of programming contests, I recently heard that MacTech is stopping their programming challenge. That was a great series. I only entered it once to write a Java Virtual Machine in 1996, I think. I wrote that in C++. It wasn’t the fastest sicne I solved a more general problem than required and others used PowerPC assembler. Nevertheless I learnt a huge amount about the Java VM in a very quick time. Some of that code lives on in the Ant <depend> task, now rewritten in Java.