Archive for December, 2006

Best of 2006

My personal best of 2006:

Books read – fiction:

  1. Walter Moers: Die Stadt der Traeumenden Buecher
    A marvellous fantasy world where everything revolves around books and stories. Like many of Terry Pratchett’s Discworld novels, the German author Moers asserts the validity of living in a world of fiction, of being absorbed by whatever one determines to be his or her great passion.
  2. Rudy Rucker: Spaceland
    A novel of the fourth dimension. Emphasizes the “science” in science fiction.
  3. Nick Hornby: A Long Way Down
    Another good read from Nick Hornby. My favourites books are still Fever Pitch and About a Boy, but there’s something about the drifting characters of this novel.

Books read – non-fiction:

  1. Various: The Simpsons and Philosophy: The D’oh! of Homer
    A collection of philosophical essays on the Simpsons, arguably the most successful cartoon show of this decade and the 90s. Multiple authors dissect the hidden agendas, allusions and roles in the Simpsonian universe.
  2. Romeo Dallaire: Shake Hands with the Devil: The Failure of Humanity in Rwanda
    The dismaying report of the UN commander of the peacekeeping mission in Rwanda during the genocide of 1993/94. A detailed account of the cynicism with which the West approached and still approaches the peoples of Africa. Also a forceful statement in favor of an active UN peacekeeping agenda, that helping others in an armed conflict does mean risking “Western” lives, and that in not doing so one presumes that the own life is more precious than the other’s.
  3. Chad Fowler: My Job Went to India – And All I Got Was This Lousy Book
    On a lighter topic, Chad Fowler offers valuable insights why outsourcing software development is not a “magic sword” and how to keep one’s own job in a globalized economy. Tailored to programmers, but probably applicable to other professions, too.

Movies watched – yes, it was a pretty bad year in terms of movies.

  1. Martin Scorsese: The Departed
    Great story, great actors, great pictures, great movie.
  2. Pedro Almodovar: Volver
    Since I did not like Almodovar’s previous movie La Mala Educacion (Bad Education) too much, I was surprised how funny and heart-warming his latest movie turned out to be.
  3. Dayton, Faris: Little Miss Sunshine
    I saw this in a test screening, and loved every minute. It’s probably not the greatest piece of movie making and could use a few less stereotypes, but it is great entertainment.

Bands seen live:

  1. Tool – Vienna and Novarock: besides being my favourite band of this year, both live performances I saw this year were impressive.
  2. Metallica – Novarock: Yes, they’re old, and Some Kind of Monster did confirm quite a lot of stereotypes for metal bands in general and Metallica in particular, but they did an astonishing 3+ hours concert at this year’s Novarock festival in Nickelsdorf, Austria.
  3. Fettes Brot – Donauinselfest: German hiphop, a very powerful and entertaining concert.

Top personal moments – overall it’s been a hard year on me, on the other hand I learned quite some things about myself, and had some truly great times anyway:

  1. Attending the JAX Java conference in Wiesbaden, Germany. 3-4 days of interesting lectures and workshops, making me remember why I like programming so much.
  2. The sailing trip on the Baltic Sea. It wasn’t quite as cool as the year before, but everyone tried hard and made it a great experience again. Our next trip will be during the Easter holidays, which means lower temperatures, less waiting and a free summer to do something else (got some spare days left from this year, anyway).
  3. Jens’ wedding. A great weekend, including a visit to Adrian.

So what’s up for 2007? First and foremost, probably all-new projects at work, moving to a larger flat, addressing some social issues, stop thinking of money, stop thinking of getting older, porting Gametective to Ruby on Rails (including true internationalization, starting with English and German), expanding on my writing both in English and German, learning Swedish, doing more photography, attending the Nine Inch Nails concert in March, and whatever comes around.


Comments (1)

Kubuntu: Installing a Brother HL-5250DN Network Printer

I recently bought a Brother HL-5250DN mono laser printer. It features a duplex unit and can act as an autonomous network printer. Just for the fun of it, I decided to install it as a network printer and attached it to one of the ethernet ports of my Wireless LAN router. As expected, Windows installation was a breeze – but so was Kubuntu (Edgy).

Assign a static IP address to the printerFirst thing (for both Windows and Linux) was to assign a static IP address to the printer – launch the web interface (enter the printer’s IP address in your browser), go to “Network Configuration”, select “TCP/IP” and assign the printer a static IP address on your local network (by default, the printer uses DHCP – my router provides a table of leased IP addresses, so it was easy to find the newly attached printer).

Open Kubuntu’s System Settings screen (i.e. KControl), go to Printer –> Add Printer/Class –> Next –> Network Printer (TCP) –> Next.

Enter the printer’s IP address, e.g., and click Next.

For a quick test, select the HL-5170DN driver, or click Other… to select the BR5250_2.PPD file provided on the driver CD-ROM.The best driver currently available in Kubuntu seems to be the Brother HL-5170DN driver. It works, but may not utilize all features. Instead, insert the printer driver CD-ROM and copy Driver/PS/PPD/<your language>/BR5250_2.PPD to a local directory. Use a tool like flip to convert the line feeds from Windows to Unix format. In the model select dialog, click Other… and select the converted PPD file. Click Next. No you can print a test page and enter additional printer information – for me, this worked the very first time I tried. Duplex printing can be enabled in the printer’s properties. Nice done, (K)Ubuntu (and Debian). 🙂

Comments (7)

Merry Christmas!

img_2182_thumb.jpgI’m off to Kaisersdorf, Burgenland, a small rural village about 90 kilometers from Vienna, to celebrate christmas with my family (my parents and my brother). No internet, no phone calls, and no PCs. Just books, food and wine. Paradise!

I’ve also taken the rest of next week off, a badly needed vacation. A merry christmas to everyone!

Leave a Comment

IntelliJ IDEA: serialVersionUID generator

Cleaning up code I launched serialver to create serialVersionUIDs for some serializable classes. Wondering why IntelliJ IDEA did not seem to provide a generator for UIDs, I browsed the code inspection settings and it turns out that there actually is one – but it is disabled by default. To use it, go to

Settings -> Errors -> Serialization issues -> Serializable class without ‘serialVersionUID’

When editing a Serializable class without a serialVersionUID field set, IDEA now displays a warning and provides a Quickfix (Alt+Enter) to generate one.

Comments (13)

Remember the Milk!

Remember the Milk Logo

For some weeks I’ve been trying to organize my personal and professional tasks with Remember the Milk. It’s a free Web 2.0 application for organizing and scheduling todo items. Tasks may be tagged and associated with locations (picked via Google Maps). Tasks can also be shared with other users, which makes it an interesting (albeit minimal) tool for online collaboration. Similar to applications like GMail and Google Calendar, almost anything can be done with keyboard shortcuts. While it takes some time getting used to it, keyboard navigation vastly improves usability and makes all the difference for serious use.

If you’re like me, easily distracted and uneasy with deciding which task to do next, you should try Remember the Milk. While it may not be the most impressive Web 2.0 app out there, it’s fun and gets the job done.

Leave a Comment

Java 6 and JSP: Codesize Woes

Upgrading to Java 6 spells trouble for JSP compilers: the new bytecode verifier does not allow jsr and ret instructions previously used for generating try/finally-blocks. Instead, finally clauses are inlined on all “exit paths” of a try clause.

Why is this relevant for JSP pages? A JSP page is compiled into one large method, which is usually wrapped with a large try block including a non-trivial finally block for cleanup routines, e.g. for tag reuse. Looking at a reasonably complex JSP page with many tags reveals many exit paths from the try block, meaning that the finally block will be inlined hundreds, if not thousands of times for a single JSP page.

Memory-size issues aside, that still would be a rather cosmetic issue. Here’s the problem: even modern JVMs do have a 64k limit on methods and blocks. While no sane coder should ever hit this limit, this is a serious problem for generated code. It was quite easy to hit this limit before JDK6, and the new compiler makes it even easier.

As a workaround, it seems that setting both source and target to 1.4 (or 1.5) with “-target 1.4 -source 1.4” reverts to the old compiler behaviour, meaning that finally blocks won’t always be inlined and code size decreases. Where to set this parameter depends on the JSP container, in OC4J, for example, it is set in the the java-compiler entry in server.xml. There’s also a bug entry in Sun’s Bug Database.

Leave a Comment

Java 6 Compiler API

Java SE 6 was released earlier today. The list of improvements contains many new APIs, including scripting support (with built-in Javascript support via Rhino), JDBC 4.0, the Java Compiler API, and the Compiler Tree API.

The Java Compiler API provides an abstraction for Java compilers, while the Compiler Tree API provides direct access to javac’s AST. Sorcerer is a powerful source code browser generator based on the tree API, and I guess many more cool tools will follow.

I haven’t looked into either API too hard yet, but at least managed to come up with a trivial program that invokes javac on a given file:

JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
StandardJavaFileManager manager = compiler.getStandardFileManager(null, null, null);
Iterable compilationUnits = manager.getJavaFileObjects(new File(""));
compiler.getTask(null, manager, null, null, null, compilationUnits).call();

Besides being overly explicit for this rather trivial task (perhaps I missed a shortcut), it “just works” and makes life for anyone needing to compile some java files much easier.

Comments (2)

Older Posts »