Thursday, June 21, 2007 12:46 PM | rahel luethy | 0 comment(s)

touching the void

given the fact that i have been working with java for almost 8 years now, i am always surprised about language functionality that i have never met before — my latest encounter: java.lang.Void (since JDK1.1).

the importance of this class has dramatically increased by the introduction of generics, and you probably want to use it along the lines of:

Wednesday, June 20, 2007 4:54 PM | rahel luethy | 3 comment(s)

threads and swing

anyone who has done some serious swing development has (hopefully) heard about the "single thread rule":

Once a Swing component has been realized, all code that might affect or depend on the state of that component should be executed in the event-dispatching thread.

the rule is well explained in the classical threads and swing article.

SwingUtilities.invokeLater() is your friend, so this rule is not particularly difficult to follow. however, until a few minutes (read: some posts) ago, i wasn't aware that the rule has changed in 2004:

To avoid the possibility of deadlock, you must take extreme care that Swing components and models are created, modified, and queried only from the event-dispatching thread.

it is the subtle difference between realized (setVisible(true), show(), or pack() has been called) and created. while it was totally fine to launch your UI like this:

you are now required to create and show all swing components in the EDT (from the official sun swing tutorial):

i am a bit puzzled — can the real swing experts please stand up?

Tuesday, June 19, 2007 8:53 AM | rahel luethy | 0 comment(s)

chickenpox

if some totally untalented person had to draw a sick toddler as part of a pictionary game, the resulting creature would probably look like little chickenpox-filipa. i wouldn't have guessed that chickenpox was such a mean thing. she's got red dots and blisters all over her body (actually even under her hair and inside her ears, mouth, and nose), and if you add that gothic extra tint of white ointment, that's how she looks like now; and this stuff must hurt and itch like hell!

chickenpox is quite a harmless disease, which explains why the vaccination is not part of the official swiss immunization strategy. however, it is among the most contagious diseases known. for us, this means that we will be trapped inside our apartment for the next ten days. at least our vacation is a safe two weeks away...

Saturday, June 16, 2007 8:47 PM | rahel luethy | 0 comment(s)

shut up and sing

michael moore recently wrote that one of the explanations for a lot of american movies to be really bad, could be the fact that

many who run hollywood believe that the american people are too stupid to enjoy a film that respects their intelligence

after quite some time, we made it to the movies last evening. we've seen an american documentary called "shut up and sing", which chronicles the ups and downs of the dixie chicks, an american country music trio (actually the highest selling female group in any genre).

the movie was brilliant. in case you haven't heard about the history behind it: in 2003, at the time when america entered iraq, lead singer natalie maines expressed her disagreement about the war by stating that she was "...ashamed the president of the united states is from texas". while the dixie chicks continued their tour in europe, the statement totally backfired in their home country. they were denounced by bush supporters, radio stations boycotted them, and former fans destroyed their cds.

the movie follows the band during the three difficult years after "the incident", documenting their day-to-day life between band business and family challenges. it shows them as great musicians collaborating with some of my personal favorites (i am still proud that i immediately recognized rhcp-drummer chad smith) as well as caring mothers (including some sex-and-the-city-like girl talk). some of the most impressive and funny scenes are when they listen to the raw takes of their new songs together with producer rick rubin (headbanging dog included) or a lively discussion about brangelina while emily robison is giving birth to twins.

to come back to michael moore's quote: at some stage, the band decides to steal their enemies' thunder by appearing on the cover of entertainment weekly with slogans such as "traitors," "saddam's angels," and "dixie sluts" printed on their naked bodies. in the movie, some marketing person is worried that the readers would not get the message...

(what is actually kind of weird: while the chicks are totally naked on the original cover, they suddenly are partially dressed on the us movie poster. moreover, the "dixie sluts" label has been censored to a moderate "dixie bimbos". all in line with the film's official tagline: "freedom of speech is fine as long as you don't do it in public").

Wednesday, June 13, 2007 10:26 PM | rahel luethy | 2 comment(s)

zfs on leopard

while rumors about apple's integration of sun's open solaris zfs filesystem are still going back and forth, they somehow got me interested in what zfs would actually bring to leopard. i don't have a mac, nor do i use solaris. however, i can see that it could be an advantage for apple to be able to use one filesystem, all the way through their product line, i.e. use the same one on their mac books as well as on their servers.

while it seems clear that zfs would be a good choice for their servers, the question arises: does it make sense to use zfs on a laptop? this article answered most of my questions and it is worth a read if you know as little about filesystems as i do.

zfs seems to have obvious advantages, even for aunt annie. the gist of the article:

  • offers built-in incremental backups (so called snapshots)
  • survives partial disk failures (by keeping multiple copies of sensitive meta data, stored in disk locations which are unlikely to crash simultaneously)
  • offers built-in compression (lzjb or gzip)
  • is able to serve as a software RAID (which will become increasingly more important, the faster flash memory prices are dropping)

accents

i seem to have a dictionary-english accent (surprise ;-)):

What American accent do you have? (Best version so far)

Northeastern

Most people don't know it but this is actually what dictionaries are based on. If you don't believe me, pick up any American dictionary and look up "source" and "sauce" and you'll see they are written with the same vowel pronunciation.

Personality Test Results

Click Here to Take This Quiz
Brought to you by YouThink.com quizzes and personality tests.

with respect to my swiss-german dialect, chuchichaeschtli-orakel has pinpointed a "Pratteln, Ziefen, Liestal, Hölstein, Eptingen, Villigen, Lenzburg" variant. these locations are all pretty much located in between zofingen (where i grew up) and basel (where i've been living the last ten years).

mouse gestures

as kyb has pointed out recently, anyone who has learned to love firefox mouse gestures will miss gesture support in all other applications. at work, i probably spend about 80% of my time with eclipse, and about 5% each with firefox, thunderbird, aterm, and open office. launching the eclipse context menu when accidentially doing the back gesture was thus a very frequent annoyance.

if you are a windows user, just follow kyb's suggestion and try strokeit to get system-wide mouse gesture support.

on linux/kde, i managed to get khotkeys do the job. you can configure it through kcontrol (as of KDE 3.2), via KDE Control Center > Regional & Accessibility > Input Actions.

there are a lot of example actions set up, so it was a walk in the park to get my eclipse-specific ones running. i created a new "eclipse" group and added simple Gesture -> Keyboard Input actions. the gestures can then be drawn/recorded, and only need to be mapped to the corresponding keyboard shortcuts (e.g. Alt+Left for back navigation, Alt+Right for forward navigation, and Ctrl+W for close).