24 March 2006

EclipseCon 2006 Day 4

I skipped the Borland keynote so I could pack up my stuff and get ready to return to Victoria. I started the day with a talk on Testing Applications Using the Eclipse Test and Performance Tools Platform (TPTP) which included an amazing demonstration of automated GUI testing. TPTP is definitely something that requires more research and contains many interesting elements including manual testing, performance testing, execution histories.

Next was an Overview of RCP GUI Building Tools for Eclipse, which was a little dry, consisting of PowerPoint slides of point-by-point features of Visual Editor, WindowMaker and Jigloo. I think a demonstration would have been better. I snuck out before the finish, so I probably missed any demo, if there was one.

Had lunch with Martin, and we took the jFire, jLibrary and uDig placards and merged them all into one "Open Source" table. The table actually filled up and we met a couple new people, including Ira Heffan, who gave a talk titled "Getting your Plug-in Legal: A Primer for Eclipse Developers" which I wish I had attended rather than the GUI tools one. We all chatted about open source projects and the reasons for choosing licenses. Also met Dicky Johan from hippojump.com who is working on interesting agent software. Also at the table was Jens (didn't catch his last name or what he worked on) from Denmark and we had a great exchange on the issue of Hans Island.

I then shadowed Philippe Ombrédanne from room to room. This guy gives great talks! His first one was a nine minute long rant about Eclipse entitled Top ten Eclipse Annoyances. He then briefly talked about ten great, strange or weird open source plug-ins and RCP applications. Applications that he noted that I think warrant further investigation are Mylar (of course), eclipseutils, abbot, RSSOwl and anyedit. He then joined John Kaplan and gave a long talk about Contributing to Eclipse that detailed the process of successfully reporting, fixing and submitting bugs and feature enhancements to Eclipse.

Last was a talk by Jeff McAffer regarding best practices for programming Eclipse and OSGi. I was fairly tired at this point and had trouble following along, but of the topics I did notice, we are following them already in uDig. I said good bye to Alex, Daniel and Martin, had some Thai food and made my way to the airport. The flight itself was quite an ordeal. Despite numerous setbacks, I made it to Seattle early.

That was a fantastic conference and I am looking forward to hopefully attending next year.

23 March 2006

EclipseCon 2006 Day 3

Comparing Apache and Eclipse

This keynote speech was given by Greg Stein of Apache/Google. Ed Burnette has a good summary.

Morning

I spent the first half of the day giving more demonstrations of uDig. It was fairly quiet in the morning but picked up quite a bit later on. I became acquainted with Alexander Bieber and Daniel Mazurek of jFire. Billy Biggs and Ben Konrath of GNOME both helped me diagnose some of the problems we have been running into with uDig and GNOME. I also met Vladimir Varnica of Omondo. Mark Powell of NASA's Jet Propulsion Laboratory stopped by, as he was interested in how uDig converts the AWT BufferedImage generated by GeoTools to an SWT image.

Building a Community For Your Open Source Project

After the exhibit hall closed, I attended Ian Skerret's talk about open source communities. Some good information there, and I can say that his recommendations have been very successful in the uDig community. He is interested in using uDig as a case study as a successful use of RCP.

Short Talks

I then attended a series of short talks:
Eclipse and GCJ/GIJ for Linux: About packaging up Eclipse so that it can be provided in Linux distributions. I should try running uDig in GCJ sometime :)
Managing APIs with the Eclipse API Scanner: This one was quite interesting, and seemed to be a very powerful tool to ensure that an API is always functional and documented, and helps prevent API breakage.

I then attended the poster reception (food and free beer!) with Alex, Daniel, and Martin. I chatted a bit with Duane Ellis, who has run into more internationalization problems than uDig could ever hope to.

BOFs

I attended the BIRT (Business Intelligence and Reporting Tools) BOF. I didn't get much out of it, as it was fairly advanced and I haven't even really looked at BIRT before. There is a possibility that we could use it for printing in uDig.

More interesting was the later Update Manager and Repository BIRT, with several interesting people. A lot of issues about the current update manager in Eclipse were raised, and further discussion will continue on the platform-update mailing list.

I got back to the hotel near midnight and pretty much collapsed.

21 March 2006

EclipseCon 2006 Day 2

So today was the start of the Open Source Pavilion at EclipseCon, I spent almost the entire day there. I decided to head back to the hotel once it was finished rather than participate in any of the BOFs. My feet are quite tired and I am feeling quite tired myself.

Morning

The Pavilion opened at 9:30 and I was there right as it opened. My neighbours included Colin Samplaneau of Spring, Martin Perez of jLibrary, Carsten Pfeiffer of KDE, as well as the two guys from jFire whom I hope to speak with more tomorrow. Also nearby was GNOME and RadRails.

We were all located in the back corner of the exhibit hall, and we did not receive very much traffic in the morning. Around lunch a large wave of people came in as the other talks ended.

Mylar: A Task Focused UI For Eclipse

At 13:00 we had a break for two hours, so found a comfortable chair and just relaxed and at some food for a while, then I attended Mik Kersten's talk on Mylar. Us uDiggers know about the Mylar project, but I had never seen it in action before, and it is much larger than I thought. It seems capable of making development in Eclipse much more usable. I will definitely try it out when I return.

We implement a small Mylar-like feature in Eclipse that, when enabled, brightens the selected layers in contrast to the others. I am hoping he might stop by tomorrow and I can give him a demo and perhaps receive some input.

Evening Reception

At 15:00 we were all back at the pods and demoing away. Traffic steadily increased until there were actually people crowding around the pod and the laptop staring at uDig. It probably helped that they stationed an alcohol bar and food table nearby (Free beer! And delicious food - tempura vegetables, fruit, and miso tofu. Very delicious!). There was a fairly steady flow of people until closing time.

Some of the people who stopped by include:
Nick Edgar, one of the leader developers for the Eclipse RCP who asked for feedback on our experience with RCP, but I am afraid I did not give a very useful answer; Bruce Donald Campbell from the University of Washington, who was interested in UVic's Neptune project, as well as deep-sea research in the Juan de Fuca Strait; Lorenz Maierhofer of Logic Mind Guide; Anna Griffith of Discovery Machine who wanted to know if uDig could assist her with her gardening; and Dag Rende of Total Eclipse.

Some interesting notes:

Two people asked if we had thought about having the framework aspect of uDig hosted as an actual Eclipse project. I hadn't even thought of that before.

Jody's location view was a big hit. Combined with NASA's JPL satellite imagery, people were able to look at the area around their houses.

The update manager and community space also seemed very popular.

It looks like some photos have been posted. I saw Ed Burnette take a picture of the uDig pod, so hopefully it will be posted at some point.

I have also thought that it might be a fun idea to start an open-source BOF for tomorrow night, although it might be more interesting for me to attend some of the other ones.

20 March 2006

EclipseCon 2006 Day 1

My first tutorial started at 8:30 and I was hoping to be there bright and early. I woke up at 8:15! Oops! I had set my alarm to 21:00. Had a super fast shower, threw my stuff in my backpack and flew out the door. Fortunately the hotel has a shuttle to the convention center and I was there at 8:30. Unfortunately the line for registration was huge! At 8:50 I had acquired my Eclipse gear and was at my first tutorial.

Just Enough Intellectual Property Law to Manage an Open Source Project

I took this tutorial presented by Cliff Schmidt so I could fill a large gap in my knowledge base. I've always had a problem learning about licenses and intellectual property, and especially given that I am a GeoTools PMC, I thought this would be an excellent choice.

Cliff did an excellent job of presenting the material and covered almost all of it in the time allotted. He covered many of the different terms used, and gave a brief over-view of some of the more popular open source licenses. It surprised me to learn that the term Open Source is trademarked!

Lunch

Each table had a placard with a topic on it so that people interested in that topic would sit together. I browsed the tables looking for an interesting topic. I was about to pick GNOME when I noticed that they actually gave uDig a table! I was surprised at this, but I was even more surprised to see that someone was already sitting at the table! Turns out it was David Heath, from Transform Software and Services, who had seen uDig in its infancy. I hope to give him a demo tomorrow.

Next, Andre Oosthuizen joined us. The other day Jody had recommended that he come and see uDig. We chatted a bit about South Africa, flights, and briefly on GIS and Business Intelligence (something I don't quite understand).

I also was thoroughly unimpressed by the quality of the meal itself. They apparently did not prepare enough vegetarian dishes, and I had to wait until everyone at my table had finished eating their desserts before my plate arrived. It was lukewarm and very bland, but I was hungry so it didn't really matter.

David and I made our way to the OSGi tutorial, where he quickly demoed his project's very impressive CRS chooser. You can view and rotate a globe or a flat map of the world, and mouse over an area and choose a CRS that is relevant to that area. Much better than our simple filtered list in uDig.

Component Programming with OSGi

I took this tutorial with the intention of gaining deeper insight into how the technology that uDig uses really works. Unfortunately the tutorial proceeded at a slower pace and had some technical difficulties, so I only made it through about half of the material before I headed to the Eclipse Community Awards presentation.

Presented by Thomas Watson and Peter Kriens, I found the material to be too high-level, and was confused by some of the terminology at times. Later I will review the notes and work through the examples that were missed and perhaps a lot of the information will have sunk in by then.

Eclipse Community Awards

Afterwards I made my way to the Eclipse Community Awards and Gameshow. They were presented by Ian Skerret and Bjorn Freeman-Benson. uDig was nominated in the best open-source RCP category, but the winner went to Gumtree, used for running scientific experiments. And my congratulations to Andre who won the award for best deployment in an enterprise. Ian announces the rest of the winners.

Tomorrow is the Open Source Pavilion! I'm sure I will meet lots of interesting people, but I bet it will be tiring.

17 March 2006

Problems with Java Internationalization and Eclipse

During development on uDig, I have had plenty of time to examine and use the internationalization tools that come with Eclipse. The Externalize Strings wizard is quite powerful and we have been using it very successfully, but we have run into a couple of hiccups.
I present the problems here, but I believe the solutions are fairly obvious. Perhaps I will detail them in a later post.

1. The Externalize Strings wizard retains no history

For the uDig project, we follow Eclipse's recommendation to use one Policy object per plug-in that tracks its own ResourceBundles. We also only had one ResourceBundle (messages.properties) file for all of the source code in a plug-in. The advantage of this Policy object is that it loads and unloads itself when the plug-in is loaded and unloaded.

The main problem with the Externalize Strings wizard is that every time you run it, you must enter in the different values again. We use a nonstandard class (Policy, vs the default Messages), a nonstandard method call (bind() vs getString()), and because we only use one ResourceBundle for all the source code in a plug-in, there is only one messages.properties file, which will often reside in a different package than the current Class being edited. It would be nice if the wizard would at least remember the previous values entered.

An ideal solution would be the ability to set project-level configuration options for internationalization. If you have multiple projects in your Eclipse workspace, they might each do internationalization differently.

2. The Java way of Internationalization is problematic

A bit of background first. Scroll down if you are familiar with how Java does internationalization. The standard way to indicated that your String is internationalized is to insert a comment at the end of the line:
label.setText(Policy.bind("WizardPage.label.text")); //$NON-NLS-1$
This will tell the Policy class to look up the internationalized String with the key "WizardPage.label.text" and return the proper String according to the current locale. The //$NON-NLS1$ indicates that this String has been properly "externalized."

The comment is also used to indicate that a String should not be externalized:
private static final String RECENT = "RECENT"; //$NON-NLS-1$
This String is used for saving of recently entered values for a text widget. It is a constant that is not intended ever to be displayed to the user, therefore it should not be externalized.

The problem with this is that the indicators are separated from the Strings they reference. If someone deletes the String parameter to label.setText() and points it to something else, the marker comment remains behind, often forgotten about it, because it is a pain to remove it. Later, if someone comes back and changes the code to label.setText("some string that the user will read"), the marker comment will still be there, and it will falsely indicate that this String should not be externalized.

I can't imagine what would happen if we ran Jalopy on the uDig source code. It wouldn't surprise me if long lines containing these comments were split in half, causing the Externalize Strings wizard to run over all of these Strings again.

3. Developers are lazy

When Eclipse is complaining about something, the easiest way to fix it is to hit Ctrl-1 and then enter to have it perform auto-fix. In the case of Strings that need to be externalized, that means adding //$NON-NLSn$ to the end of the line. Yes, the Externalize Strings option appears when Ctrl-1 is pressed, but, as explained earlier, it is a pain to use, especially if one is in a hurry.

Most developers are actually quite good about this, and I have only encountered it three times so far (and I admit to doing it myself). But any falsely marked Strings will prevent a user interface from ever being completely internationalized.

4. What does that key mean?

When reading source code that contains externalized strings, the reader see something like:
label.setText(Policy.bind("WizardPage.label.text")); //$NON-NLS-1$
What does that mean? Well, looking at the key here, we can presume that it is the text value for a label. That doesn't really help indicate what the text is being used for. If I want to look up the value of an externalized string, I have to hunt down the ResourceBundle that contains the value, and that might not always be easy to find (I have a hard time remembering which package I put it in when there are over 10 packages in a plug-in - The solution here would be to standardize where the bundles lives. It's on my todo list.). Once I have found the file, I have to search the file for the key. Not an easy task if the file is not sorted and contains hundreds of keys (although a search will often do the trick quickly).

It would be nice if there was a seamless way for the developer to determine what the value of a key is.



These are all issues that I would love to address in my spare time. I have given some thought to solutions to all of these problems, and will likely present them in another post sometime.

Links:

uDig has some quick and dirty documentation on how to externalize strings:
Plugin Internationalization (plugin.properties)
Plugin Internationalization with ResourceBundles (Java source)

Java internationalization tutorial