I started the trip on Monday morning and wanted to arrive in the afternoon but unfortunately the first train from Bremen to Hamburg was canceled by Deutsche Bahn. Because of this I missed the only direct train to Aarhus and had to use slow trains like RegionalExpress and arrived about 3 hours later at the conference. Unfortunately I was only able to listen to the final keynote on the first day, so I missed the talks I wanted to visit on the afternoon.
The "party keynote" was about "Cool Code", held by Kevlin Henney. He presented lots of nice code fragments "that are interesting because of historical significance, profound concepts, impressive technique, exemplary style or just sheer geekiness". Unfortunately the room was so big and the screen so small, that most code parts were unreadable. You were still able to follow, but the coolness of the shown code was not really visible. Alltogether, the talk was very interesting and a must to follow! After this keynote, still very hungry from the train ride, I attended the conference dinner, met lots of people. On my table were people from Siemens, one of them was Frank Buschmann, who hold the talk "Seven Secrets Every Architect Should Know" on Wednesday.
The next day was packed with lot's of talks. Unfortunately, I still had to discuss with Robert Muir through Google Talk about Apache Lucene issue LUCENE-1536 (applying Lucene filters low, once it is committed, I will write about it!) and a bug in our FilteredQuery#Weight implementation, so I missed the first talk. I started with "Eigenharp: Experiencing Music Differently (and what programmers can learn from it)" which compared music instruments with user interfaces and what developers can learn from music instruments and their long history.
After lunch I attended the talk about node.js by Bert Belder, who had some problems to do his live demonstration on Apple computers (yes: "die, Apple, die"). It gave me some ideas, how to use a select-based webserver for Apache Solr. Maybe we will use the Java-only JBoss' Netty for Solr in the future!
The Java User Group: My talk about the Java 7 launch bug
On 15:50, the Java 7 event started in Kammermusiksalen. Martin Boel from Javagruppen did some introduction about the new features in Java 7 and introduced myself. He showed features, I did not know about, like an improved swing user interface. These are all features, I generally don't use in my code. One goodness is the new "try-with-resources" statement, that can make your code cleaner, as you don't have to take care of closing all resources when an exception occurs. Java 7 does this automatically (in fact, the Java compiler adds the correct statements in complicated finally blocks automatically to your code). We are using a similar infrastructure in our IOUtils class in Lucene. Recently I already upgraded it (LUCENE-3334) to make use of the new Throwable.addSuppressed() functionality to log supressed exceptions in the stack trace of the original exception. As Apache Lucene is still compatible with Java 5, I added a convenience reflection-based method to IOUtils, so we can log the supressed exception if the code runs on Java 7.
After the introduction, I started with my talk. In the following hour I showed a lot of slides (download them here as PDF) and explained the whole story of the Java 7 launch bug, as I did in my previous blog post. I also explained, for the first time, why Java 7 crashes on the Porter Stemmer code:
During the investigation of the bug in July, I had no idea, why Porter Stemmer's ends() method crashed with SIGSEGV - but almost identical code in the Java String class did not. When preparing my presentation, I analyzed the comments by hotspot's developers and was able to understand it for our case. The reason why ends() crashes in our case is also related to a loop unwinding bug. The difference to the String class is the underlying char array, which never changes in Java's final and unmodifiable String class. On the other hand, the Porter Stemmer code modifies the char array and leads to a bug because it used wrong assumptions. Java 7's string optimization routines make the hotspot compiler assume String.length() is constant (which is, of course, true). In the Porter Stemmer case, these lengths are generally very short (it checks for short strings only), and unwinds the loops in end(). Unfortunately the underlying char array used by Porter Stemmer is not unmodifiable, but length checks were removed leading to the bug. Not using string optimizations like Java 6 without -XX:+OptimizeStringConcat therefore prevented the bug (as the loop optimizations cannot be applied).
My talk was also followed by some Nokia guys from Berlin (I knew them from Berlin Buzzwords conference). After a short reception we went to Aarhus' nightlife and visited some bars.
The first talk I visited was Hannes Kruppa's (he works at Nokia in Berlin and joined us the evening before) "Improving Search Ranking Through A/B Tests: A Case Study". After that I went to "Questions for an Enterprise Architect" by Erik Doernenburg, and finally had some lunch. I left the conference at about 14:00 to head back to germany. This time with no train problems.
All togther a very nice conference! Thanks to all who organized it!