The Betrayal of the Spirit

I don’t normally like to do “link blogging” — I’d rather post nothing at all for several months (which frequently happens) than just copy someone else’s work. But I’ll make an exception for this XKCD strip. I think it actually brought a tear to my eye.

Scripting Excel: Can It Really Be This Horrible?

OK, I have managed to avoid this for a long time, but I guess it was inevitable: here comes Martin’s cheap, nonconstructively sarcastic I-hate-Microsoft post.

So I was visiting my parents this week-end, and my Dad asked me to help him with a little macro job on an Excel spreadsheet. It sounded simple enough. However, I had forgotten just how astonishingly horrible Visual Basic For Applications, the sorry excuse for a programming language built into Excel (and the other Office applications), can be.

As far as I remember, the last time I did anything with VBA was probably somewhere in the late nineties. Even by the standards of back then, VBA is a really shitty programming language. By the standards of 2009, it’s spectacularly bad. The only explanation I can think of is that somewhere high up in Microsoft Strategic Command, somebody decided to spend a lot of effort on making it as useless and infuriating as possible, while still keeping it just barely functional enough to be able to do the things you want to do with it, if you’re willing to go through a lot of pain. God only knows why they made that decision, but surely a language as bad as this cannot be created by accident.

Paying With Bits

In the course of a friendly discussion with Dirk-Jan, I’ve been reading up on the miracles of digital cash.

And by digital cash, I do not mean lame stuff like Paypal, which is basically just an ordinary bank account to which you can send transfer orders. No, what I’m interested in is the real heavy stuff, whereby you have a digital wallet full of cryptographic “coins” which can be transfered from one party to another, without a single central entity keeping track of the contents of your wallet. Ideally, you want to be able to transfer such coins even off-line, without the central entity needing to be involved with every individual transfer.

There are a couple of basic problems with the idea of using bits as money, which any “crypto cash” system will need to find solutions for.

I’m a Runner!

Today was the day of the 25th Dam-tot-Dam-loop, a 16.1km running event from Amsterdam to Zaandam. Yours truly was one of the 35,000 people who signed up for the event, and one of the 17,614 people who made it to the finish line!

FritzBox!

Wow!

I received my FritzBox 7170 today, as a present from XS4ALL for renewing my ADSL subscription for another year (cheap deal — I would have done that anyway). And it totally blows away my Thompson Speedtouch!

Workaround for XRandr Problem on Low-end Intel GPUs

Ever since switching my work machine to Ubuntu 9.04 (“Jaunty”), I had an annoying problem.

It turns out that the latest versions of X.org use the XRandr extension for multi-monitor support, instead of the older Xinerama. Now, there are many good reasons for that: Xinerama was hell to configure and it didn’t really support the kind of plug-and-play automatic configuration which users expect nowadays.

XRandr is more convenient and can make lots of changes on-the-fly without a restart, but that convenience comes at the price of flexibility. How it works is by simply setting up a virtual desktop inside the GPU, with dimensions matching those of your physical screen setup. So if you have two 1280x1024 monitors next to each other, then that’s a single 2560x1024 screen as far as X is concerned, except that the window manager does a little extra magic to make the ‘maximize’ button on windows work correctly. Using multiple GPUs in a single machine is not supported, except by running completely independent X servers on them.

If you have a fairly modern NVidia or ATI card, that will work just fine. However, many of the machines at work still use a somewhat older Intel chipset, which does not support framebuffers larger than 2048x2048. With the 2560x1024 setup mentioned above, DRI will be disabled, so you won’t have any kind of hardware acceleration. Window updates will be slow and Compiz won’t work.

Obfuscate Your Numbers!

Time for some silliness.

In a little over a month, I will be

years old.

What’s that, you didn’t get it? Here, I’ll repeat it for you in terms you may understand more easily:

At work, it has become a bit of a tradition that when people announce their birthday, they do so in an at least somewhat obfuscated format. Hexadecimal, binary and more obscure number formats are always popular, of course, as are silly descriptions of the form “my age is the ninth distinct biprime”. But last year I decided to take it to the next level, and write a little generator in Ruby for expressions such as the ones you see above. As you can probably guess, the expressions are generated using TeX.

You can play with it for yourself, if you want to, and also download the latest version of the code. But please be gentle with my server, as you can probably guess it’s a rather heavy application and I’m running this site on a little home PC..

Update: Now hosted on GitHub!

Arco Rocks

I got back this week-end from a nice week of rock climbing in Arco, Italy with Jeroen and Raimond. We stayed at Camping Arco, a really nice and fairly luxurious camping if you can manage to get a place there (they refuse reservations lasting less than 7 nights, or made less than two weeks in advance). The weather was perfect; in fact it was almost too warm for the time of year, and we skipped some of our planned activities because of that. Lessons learned for next year: go in April, and don’t climb south-facing walls in the middle of the day.

A couple of pictures, made by Jeroen or at least with his camera:

Why ‘.local’ Is a Bad Choice for an Internal Domain

I installed Ubuntu 9.04 on a machine at work this week, and that went quite flawlessly except for one weird little problem. I could access machines on the local network by their short name (e.g. ‘einstein’) but not by their fully-qualified domain name (‘einstein.intra.local’).

Now, if it had been the other way around, the explanation would have been obvious: a missing ‘search intra.local’ entry in /etc/resolv.conf. But being able to resolve short names but not long ones, that was a new problem for me. I used nslookup to verify that the local name server was responding correctly to both forms, and it was. But any other application, from ping to Mozilla Firefox, failed to resolve the long form.

A colleague put me on the path to the solution, however. In the zeroconf protocol, which is implemented in Linux as Avahi and on the Mac as Bonjour, the .local domain is magic and is considered a reserved name. Hence, when Avahi is running, any address resolution queries for a machine name ending in .local, are intercepted and the DNS server never gets to see them (nslookup bypasses the usual resolver API, however).

This is apparently a known issue, but it was new and quite surprising to me. I didn’t bother to investigate who is at fault here: did the zeroconf people blatantly highjack a perfectly valid namespace, or has .local always been reserved and everybody but me knew about it? Anyway, it’s fair to assume that zeroconf is here to stay now, so network administrators take note: better call your local domain something else.

Once you know what it is, the solution is easy. In my case I wasn’t interested in the functionality offered by Avahi, so I just uninstalled it (sudo apt-get remove avahi-daemon). Alternatively, here is a receipt for disabling the special treatment of .local, but keeping the rest of the daemon running.