Archive for the 'Tech Talk' Category

“Welcome to Facebook in German”

This is how facebook greets me this morning:

Facebook in German

Welcome to Facebook in German… Now German speakers all over the world can join.

I am not sure if I have the heart to switch it to German though: It just “feels wrong”. And after all, I think it’d result in a horrible mixture of English and German, wouldn’t it?

Famous Songs in Code (What’s Your Guess?)

Inspired by Philipp Lenssen’s fabulous idea to express idioms in code, I came up—just for fun—with the following 10 well-known song titles, written in horrible C/Java/PHP pseudocode.

Have fun… and take a guess in the comments!

// Song 1:
it = b

// Song 2:
for (i=0; i<people.count(); i++)
  people[i].attributes |= (shiny | happy);

// Song 3:
function get(want) {
  if (random.bool() == true)
    return want;
  else
    return null;
}

// Song 4:
//function leave() {
//  return new Color(0,0,0);
//}
// Oh, I think I screwed this one up, so here it goes:
// Version 2.0 of Song 4: ;-)
function leave(me) {
  me.setColor(0,0,0);
  return me;
}

// Song 5:
who = fire.getStarter();
assert(who != us);

// Song 6:
function cry(person) {
  return (person.gender == female);
}

// Song 7:
person = king.getWife();
person.dance();

// Song 8:
life = me.getLife();
life.setSunshine(you);

// Song 9:
person = USGovernmentEmployees.getRandom();
while (person.boss != null)
  person = person.boss;
person.writeLetter();

// Song 10:
train = trains.getLine(A);
you.take(train);

Update: I fixed Song 4 and 9 because they made way too little sense. Oops ;)

Firefox 3 Beta, Portable

Ah, for those of you who have wanted to try out the latest Firefox 3 Beta all along but were hesitant because they feared it screwing with their local data (current profile etc.):

PortableApps offer the Firefox 3 beta as a USB-stick-ready package that won’t touch anything on your local computer, making it safe and fun to try out for anyone who’s feeling curious:

Mozilla Firefox®, Portable Edition is available packaged with Mozilla Firefox 3 Beta 3, allowing you to test all the latest features in the upcoming version without disrupting your current Firefox installation.

Have fun beta-testing!

Xen: NetBSD VM on a Debian Dom0

It’s been a while since I have blogged geekiness, but this one is really necessary: Today I installed a test box with an instance of the Xen Virtual Machine Monitor, with Debian Lenny as the Domain 0 (or Device Driver VM, as the researchers at my university like to call it).

The reason was that I have to run a piece of legacy software that is in SCO Unix binary format, which is incompatible with the (unaltered) Linux kernel. There is the linux-abi project whose kernel patches bring SCO binary compatibility to Linux, but I always try to avoid rebuilding the kernel because I won’t be able to update it anymore with the distro’s means; instead, I have to rebuild the kernel myself when I want to update, and (much worse), before long I am likely to end up in a situation where I am unable to avoid breaking package dependencies — keeping an up-to-date system should just not be that hard.

Thus the idea was born to run several virtual machines on the same hardware, dedicating one of them to the task of running the legacy software, and another one to running the more up-to-date standard services.

However, this still doesn’t change the fact that I would have to build a special linux-abi patched kernel, and this time even worse: It would also have to be modified for running in a Xen domain. To save myself that pain, I looked for alternatives and found the binary compatibility page in the NetBSD docs, stating that it supports UNIX binaries (including SCO) out of the box (and many more). Furthermore, NetBSD has apparently been supporting running on Xen since quite a while now.

Installing NetBSD into a Xen VM (following the howtos) is supposedly quite easy. I created an LVM volume on the harddrive to put the new system into, set up that partition as well as a current NetBSD ISO image as virtual devices, and pointed the config file to a special NetBSD installer kernel image for Xen that NetBSD provides. Then I tried to start installing the VM. But, ouch, Xen claims: “incompatible kernel”. Hm. Wasn’t that easy after all.

As it turns out, the problem is that current Debian kernels are all compiled with Intel’s physical address extensions (PAE) enabled: In short, common 32bit hardware can only address 2^32 bytes of physical RAM, that’s about 4GB. For modern systems, this can be a little short, so extensions where built to support more than that. Modern Linux distributions support them and they usually don’t harm even if you have less RAM than that; sadly, the stable NetBSD distribution does not support PAE yet, and running two systems on the same physical box that have a different understanding of how to talk to physical memory does not work.

But, lucky as I am, just a few weeks ago, NetBSD/Xen hacker Manuel Bouyer has implemented PAE support for NetBSD to an extent that allows it to run on a Xen system with PAE-enabled dom0. Thanks, Manuel!

The respective installation and regular kernel images can be found among the daily builds on the NetBSD FTP server, and if you use these kernel images instead, you’ll easily be able to get a NetBSD instance up and running without touching the stock Debian kernel.

As expected, NetBSD was able to run the SCO binaries, so far without problems. A few iptables rules on the domain0 will soon be in place to transparently forward requests for this service to the NetBSD VM, so clients will never know that it is not the Linux server itself responding to their request, but a little virtual machine running in the background.

Subversion bulk move

The version control system Subversion comes with a handy function to copy or move an already versioned file from one place in the repository to another: The command svn move.

This is particularly good (and superior over, for example, CVS which is unable to do so) because the version history of the file is kept, and also the copy on the server is done lazily, meaning just because the file was copied there won’t be a second physical copy created on the server (yet, until you write to it).

A drawback of the command, though, is that it is only possible to move one single file or directory at a time. If you have a lot of files to be moved, this can get very tedious.

However, if the files you want to cover have something to be distinguished by, you may try the following (which I blog here mainly so I can get back later when I have forgotten the syntax again ;) ):

find . -name "06*" -maxdepth 1 -exec svn mv "{}" 2006/ \;

Note that I am filtering by name here (everything starting with 06), with a maximum tree depth of 1 (to avoid pulling in the .svn folder) and I am moving the respective files into the (recently created) subfolder 2006/. Also note that the the -exec flag of the find command wants to be terminated by a semicolon, but since that is a reserved character for the Bash shell, you need to escape it. This is something I trip over every time.

Anyway, I hope this helps.

Microsoft’s “Absolutely Outdated” Biometric Employee Monitor

Looks like it’s George Orwell’s lucky day: Microsoft has filed a patent application for “a computer system that links workers to their computers via wireless sensors that measure their metabolism. The system would allow managers to monitor employees’ performance by measuring their heart rate, body temperature, movement, facial expression and blood pressure.” (The Times, emphasis added).

Needless to say privacy experts are not particularly enthused, especially over here in Germany where the data protection laws are slightly on the strict side anyway. What I though was interesting is a quote by a German privacy expert, who said that while Microsoft may earn money from selling the product eventually, the companies who use it almost certainly won’t profit from monitoring their employees: She referred to a study made by the London School of Economics for Microsoft in 2003 which states that monitoring employees decreases their productivity and creativity. As such, the privacy expert says, Microsoft’s idea is “absolutely outdated”.

Considering the document was filed in June 2006 already and has only just came to public attention, the “outdated” claim may not be too far off after all.

Side note: As always, my blog represents my opinion only, and not Mozilla’s or anyone else’s. Just in case this was not perfectly clear to begin with.

French Dorm: Craigslist is Evil

When my girlfriend recently tried to access Craigslist on her French dorm’s internet, she got this instead:

According to the current security policy, the URL you have requested is blocked.
Host : ‘www.craigslist.org’
URL : ‘/…’
Categorie : ‘Pornography and Sexually-explicit Content

Weird.

Maybe somebody should have told them that regex-matching agains three-letter words is not exactly the best method of keeping your students from surfing around on “dirty” websites?

The page she wanted to see was a harmless “best of craigslist” story after all — I doubt it would survive long on Craigslist otherwise.

Everybody stand back: I know regular expressions.