What am I doing at Sun?

It’s been a few weeks since I started my new job at Sun (actually, it’s almost exactly two months already), and maybe this is a good time to wrap up what happened and what am I going to do.

The first 3 weeks I spent in the US, one in San Francisco, attending JavaOne 2009 as a speaker (Caciocavallo, yay!), which was very nice (seafood at Fishermen’s Warf, yay!) and exciting. After that I spent two weeks in Burlington close to Boston, where I met my team and started to get my hands dirty. Actually, I spent most of my time setting up my working environment, ramping up with all the new stuff that I am going to do, etc. I even managed to push my first little fix into JDK6.

Then back home, I needed to do some additional work environment tweaking, setting up VPN, VirtualBox and Ubuntu (yeah, I was ‘working’ – wasting time – on Windows a couple of weeks…). Slowly I was working my way through lots of new code, new people, new work environment. Now what am I actually working on? At the beginning, I could not really tell, it was all quite diffuse, but at this point, a couple of different (!) tasks are shaping up:

  • I am going to implement a new servlet/webapp that will handle auto update for JRE (and likely other Sun software). This is much more fun than I suspected. Java EE has come a long way since I last tried that ~6 years ago. And Netbeans makes it even easier. And it’s a challenging task too, to make it so that it doesn’t melt the servers with the massive load that it will need to handle.
  • There will be some new API for JNLP/WebStart that I am going to design and implement. This is driven in part by Java app store, but will be useful for improved enterprise deployment in general.
  • I will continue to work on 2D stuff a bit. Most importantly, I would like to improve community bootstrapping/involvement, as this was a bit stale the last couple of weeks. As a start, I took over the OpenJDK 2D bugzilla yesterday (yeah, like a pirate, and with a  bottle of Rum 😉 ) and updated a couple of bugs. There are a number of bug entries in the 2D bugzilla, with patches from RedHat and Google that haven’t made their way into OpenJDK yet, which is a shame. Then there is the FontManager overhaul, which is already going on for over a year (it’s almost finished now, really!). And another longer term project is coming up on the horizon, which is a floating point rewrite of the fixed point based pisces renderer (volunteers??). Lots of stuff to do. The problem here is, that this is not actually part of my work assignments and my boss won’t be happy when I spend too much time on that, but I want to dedicate at least some of my spare time (ehe…) on it.

This post kills 99% of all germans

Really. This was what I read first on one of these bottles that are everywhere in the US. I can’t tell you how scared I was! Of course, it was ‘germs’ not ‘germans’, but the first impression spoiled it for me.

Not only was I surprised by the fact that these bottles are everywhere, but also that people actually make use of it! How scared must people be? I even saw quite a couple of people wearing mouth protection, I guess they are quite scared by those pesky little bacterias 😉

I have my doubts that these sanitizers do anything useful. Sure, they kill some germans (ups), but imagine how many people touch these bottles. And they _first_ touch it, and _then_ kill some germans (sorry, can’t resist this running joke now anymore…). So all the bacteria are collected on the outside of the bottle, and they don’t get killed. SCARY!

I believe people generally totally over-panic about these kind of things. The latest hype beeing the swine flu thingy. I believe that this is just a big marketing bubble of the pharma industry. You see, it’s easy. This industry would have quite a significant loss last year. So what? Let’s invent a cool new flu and do some (scary) studies, let the media pick that up (no need to manipulate them, they pick up bad news willingly enough). Now sit back and watch how that virus (the media hype, not the real thing) spreads until people are scared enough. You see, there are some dead here and there. Ok, some other things are involved as well, but who cares? Dead is dead, right? Still, politicians seem a bit relaxed still. Let the WHO declare it a pandemic (eh what?? pandemic like this thing that wipes out whole areas like the pest?). Now those politicians need to move, otherwise the (very scared) people will not elect them anymore next time. So a couple of countries preorder vaccines for whole populations (!!!) for billions of $$$. ZAZING! Profit! $$$ Easy, right? Funnily, from this point on the media were not overly interested in this swine flu thingy anymore.

If you look at the facts, the thing looks like one of the most harmless virus you can think of, at least in the context of other virii. In germany we now have something between 2000-3000 infected, with some hundreds more the last couple of days. I have no idea how many ‘normal’ flu infections we have, but I guess we talk about >100000, maybe many more, with growth rates in the 1000s not 100s. Almost all the H1N1 infections are totally harmless, are treated with the standard paracetamol and stuff, and don’t do any more harm than any other flu. Sure, there were a couple of deads, but most of them had other diseases too, and it’s not clear if dead could be connected to the flu. Compare that to the 80000 or so deads from normal flu every year.

I say: the chance to die from stinging bees is much higher than to die from swine flu. People, those pesky bees are EVERYWHERE. DON’T GO OUTSIDE. Ah, and if you need to, I have a nice thing to sell you, that protects you from bees. Only 30$/package. Lasts a whole month, so only 1$/day!!!

Let me make a prediction. Next year or maybe in 2 years, we will see another kind of superdangerous pandemic flu. And we will see the same pattern all over again. And in the end, those governments will sit on mountains of unused vaccines. And then??

How I make my Ubuntu more beautiful and (even more) usable

I think Ubuntu is a pretty good and solid Linux distribution. However, after installation, there are still a couple of things that I tweak to make it better match my taste. Namely, I think Ubuntu has a pretty bad default theme, and made some strange decisions regarding usability. (E.g. I like the new logout menu, but what is that with the new notifications? It does not help me with anything. Or this one: yes there is a problem, because firefox is not consistent with the rest of the desktop, but the solution is a bit weird: make Nautilus also be inconsistent with the rest of the desktop.) Note that most of the stuff is probably a matter of (my) taste and preferences, so take this as it is. So here is what I usually change:

  • Install Epiphany browser. I don’t see any immediate advantage over Firefox (I don’t make heavy use of plugins, and the stuff that I want, adblocker, etc, is in Epiphany too), and Epiphany is just nicer and blends better into the desktop than firefox. The rendering engine is the same anyway, so there are no compatibility issues either.
  • Switch Nautilus to spatial mode. Actually I have no real preference of browser vs. spatial mode. But I made an interesting obervation with some non-computer-experts like my wife or my mother. They found the (default) browser mode quite confusing. Like, after clicking on a folder to open it, ‘where is the other folder gone’. Then I need to teach them, there are no such things as folders, it’s a browser, and you navigate in the folder hierarchy (wtf is a hierarchy) etc. I believe the spatial mode is much more intuitive for non geeks, and the experts know how to change to browser mode anyway.
  • Turn on the couple of icons on the desktop: Home folder, Computer, Network, Trash, etc. I don’t really like to navigate to the Places menu, and infact I think it’s just a bit less intuitive. (Similar in style as the point above: it needs additional thinking/searching to find what you need if you don’t know it yet).
  • Make the panels translucent. Looks a bit better IMO, but this is really a matter of taste.
  • Change the GDM theme. Really, the default GDM theme of Ubuntu 9.04 is just aweful. It might be well suited for heavy metal fans, but for normal people (mother, wife, kids, ..) I would be ashamed to give them a desktop with such a login screen. Mostly black with yellow-brown-reddish colors doesn’t exactly trigger positive feelings. (As an occasional Heroes of Might and Magic series player, it reminds me most of the demon fraction ;-). ) The previous Ubuntu GDM theme was at least kind of neutral (not beautiful). I like the Linsta theme the most (I just like nature motives).
  • Change the desktop theme and background image. My personal favorites are Clearlooks theme and the backgrounds that ship with vanilla gnome. The default Ubuntu background is just weak, and the human theme is, well, boring.

To make the long story short, I mostly turn off all Ubuntu modifications/theming of the GNOME desktop and in most cases use the default GNOME settings, especially on computers that are also used by my family. Ubuntu has a lot of good points, but theming/artwork surely isn’t one.

Branching snapshots / virtual disks in VirtualBox

I recently became a big fan of VirtualBox. It’s a great virtual machine / x86 emulator, has great performance and with guest additions integrates nicely in the host system.

The only feature that I missed (and others too) was branching of snapshots/virtual disks. A typical use case would be to install an OS into a virtual disk, make that virtual disk read-only and use it as base image for several branches. For example, in one branch I would do testing/debugging of stuff that I develop. There might be several branches I use for testing. Then I might need a branch in which I install a build environment for OpenJDK, which could in turn be used for several more sub-branches for OpenJDK6 builds and OpenJDK7 builds. In another branch off the base image I would run tax software. Etc etc. You get the idea.

Today I realized that this is actually already possible, it’s just not obvious how to do it. Steps to create branches from a base image:

  1. Setup base VM with base VDI.
  2. Install OS into this VM.
  3. Take snapshot of this base installation.
  4. Now you have your original .vdi file readonly and another .vdi file with a cryptic name as the new working difference for that VM.
  5. Create a new VM and attach the original VDI to it. This will create a NEW .vdi, again with a cryptic name, based on the readonly snapshot.
  6. You can repeat that process, even for sub-trees.

In the screenshot below you see a Windows XP base image with tree sub-trees. The first subtree has another 2 subtrees. Note that in each VM you only see one path in snapshots. And of course you can not delete/merge snapshots with more than 1 children.

Back in Ubuntu land

After some weeks of having to deal with Windows, I finally upgraded my laptop to Ubuntu. What a relief! Here’s a (not so) short list of immediate advantages that I missed badly on Windows:

  • Virtual desktops. Really, can’t live without this. Desktop becomes utterly cluttered when more than 3 windows are open. And I usually have 20 or so. I know there are tools that do similar on Windows (my laptop had one from NVidia) but this is really not the same.
  • All important software and drivers on board. Installation was a breeze (a few clicks and 20 minutes waiting) and when finished, _everything_ just worked. Including wifi, printer, scanner. Maybe I was just lucky, or maybe Linux dramatically improved over the last couple of years. And of course, no day long searching web for stuff, installing tons of crapware, etc.
  • More consistent, usable and clean UI. On Windows, every app seems to be proud of looking and behaving differently. This is nice for the bling, but makes using the computer unnecessarily difficult. And then there’s small but significant details that make life easier on Ubuntu.
  • Worldclock applet. Extremely useful when your team is all over the world.
  • Language support. I always considered this obvious, but apparently, it’s not.
  • No need to run millions of apps in the system tray to keep your system half up to date. (The other half still needs manual updates 😉 ).
  • No need to run all kinds of security software, firewalls (they are still a good idea, but I usually don’t  use them on my laptop and never had any problem), virus scanner.
  • It uses all 4 GB of my RAM. Which is actually quite important when you make heavy use of virtual machines (for running Windows 😉 ).
  • Cultural stuff: Apps on Linux usually install themselves, and not a handful of other pieces of software. Recent example on Windows: After having installed some codecs (yay, I was thinking that codecs are a non-problem on Windows, but it’s not the case..) I found that I now have Google Chrome as well. Not that I object trying Chrome, but I prefer to be in control of what gets installed or not.

I probably could continue this list, but I leave that task to you readers if you like ;-). The point is, I have absolutely no pressing need (as in Hardware or Software that only works with Windows) to run Windows as base OS. It’s actually much better to run it in VirtualBox, where I can easily reset it to a clean state when I want to. This is cool for testing anyway. And working on Ubuntu instantly gives me a productivity boost of at least 50-100%.

Java is a Doom Trojan Horse

At least according to Symantec.

I want to make a screenshot, but I don’t know how to do this in Windows XP. I probably need the Ultimate Edition or so. God, this crappy OS doesn’t even have the most basic functionality, or it hides it so well that nobody finds it. No, the print key doesn’t work.

Folks, I really gave this OS another serious chance. Actually I was more or less forced to, due to my new job and new hardware and lack of Linux install CDs for 2 weeks in the US. But it so gets in the way of everything and is generally so unusable, I think I really do the same update that David Gilbert (*) mentioned in the article above.

Interesting side detail: I tried a couple of games in Windows that I tried in Wine before, it must be said that nowadays almost all games I would want to play work perfect in Wine (Heroes series, Starcraft, Baldur’s Gate, Settlers series), some show the same buggy behaviour in Windows as in Wine (SimCity4) and some others actually work better in Wine (!!), namely Settlers IV and Baldur’s Gate I. As far as I found out it’s a bug in the NVidia driver not supporting DirectDraw properly.

* David, is that you: http://en.wikipedia.org/wiki/David_Gilbert ? 😉

Update: Ok, thanks to Robert I managed to make the print key work. Here is the screenshot:

Java Doom Trojan Horse