Archive for February, 2007

Fun with the GEZ

Tuesday, February 20th, 2007

Rumors say that I’m a pessimist. That’s definitely not true. Surely after a hard day at work I know how to cheer me up. And of course the evilest things are the most fun. I once heard of a guy in a pub who was pretty drunk, stepped on a table, threw his backpack around and yelled “for Allah”. Uhm, yes, that was in the dark ages when everybody was on steroids about terrorists blowing up the planet. But there is a more evil thing that you can do if you are lucky to live in Germany. (And as opposed to the pub action it doesn’t even make you sleep in jail.) Germans have the GEZ (GebĂĽhreneinzugszentrale) that is responsible for collecting charges from everybody who is watching TV. Those fees are supposed to finance TV and radio stations governed by public law. They are so avid for money that their organisation works similar to a secret service. They get their information about the people from half-legal sources. They have agents everywhere trying to trick people into paying fees. And they are even a private company (even when being commissioned to collect fees by the government). Basically everybody hates the GEZ and telling others that you work for the GEZ is the shortest route to finding a fresh brick in your car’s window every morning. Funnily they have a website where you can opt in. Do I really have to mention that there is no way to opt out? And of course they don’t verify who opted in. Imagine what happens if you accidentally opt in someone else… ;)

(Don’t get me wrong. I think that the publicly-operated TV stations are worth their money when looking at all the junk that’s on TV. But the modus operandi of the GEZ is so weird that I hope the european parliament will quickly kill it.)

If only I had studied partially… err… partials

Monday, February 19th, 2007

I have to admit it. Like millions of people everywhere I wasted my best years sitting in dusty lectures learning about 20 year old technology. (The technological elite of this country seriously learned from books where they talked about green CRTs and that color tubes are about to be invented… and that was in the 1990s.) The evilest lecture was called “theoretical basics of programming”. You learned about concepts that you would forget the instant that the semester ended. It was just a pretence to throw out half of the students. At least I had expected to learn something about programming. What did I learn? LISP, Assembler and Modula-2. Those languages are arguably not very useful. Okay, I understood the difference of functional and imperative programming languages. But later in my studies I found myself with no knowledge about object-oriented programming or at least C.

Last week most of my “master of computer science” arrogance suddenly dropped to zero when people in #pylons told me about “currying” and “partials”. I assumed to be an educated programmer but a dozen people flooded my IRC window with supportive comments like “that’s one of the most common paradigms besides recursion - didn’t you know that?“. Neither the Wikipedia page nor Pythons PEP309 really made sense at first. But now I understood the principle and it has already come handy…

A partial is just a function with preset parameters. Imagine that you have a function that takes a certain number of arguments. And you need to call that function time and again in your program. You may discover that one of the parameters always needs to be set to a certain default. How do you do that? Well, usually you pass that parameter along with every function call. With a partial you create a new function from the old function with certain parameters set. Say you have:

  • myfunc(foo=42, a=3, b=51, c=58)
  • myfunc(foo=42, z=12)
  • myfunc(foo=42, j=’hello world’)

You can create a new function with that foo=42 parameter already set:

  • myfunc2 = partial(myfunc, foo=42)

Now you can use that newly function and don’t have to care about foo=42 any longer:

  • myfunc2(a=3, b=51, c=58)
  • myfunc2(z=12)
  • myfunc2(j=’hello world’)

This may look ridiculous. But I already found my first use case for that. I needed to set certain arguments and then passed that newly created function around. Another part of the program would then just execute my function with the parameters I gave it
while adding further parameters.

The word partial is not very descriptive. But the word currying makes a lot more sense. You start with an empty pot on your oven and add ingredients (parameters). No idea if that’s the right metaphor but at least that tastes like I can remember that. :)

Getting back to the topic: my mentors at university tried to persuade me that studying is a good idea because you learn a lot about concepts that come handy for your job later. While I tend to believe that partially… why do I work with studied mathematicians and physicians in a network administration department? And most Ph.D.s I know at my employer create slideshows and emit buzzwords. Wasted time I tell you.

Joy and pain of patch panels

Monday, February 19th, 2007

I must admit it: when it comes to OSI layer 1 I plain suck. We built a house and the most important thing of course is making it get a proper structured cabling. (I assume that some freaks invented the cryptic number EN 50173-1 for it so they wifes don’t discover what useless thing they spend their money on.) Thanks to the generous loan of a coworker I could test my new patch panel and the sound of that centuries old device when displaying FAIL sounds like the ringtone of Marvin from the Hitchhiker’s guide. I can still hear my friend who helped me set up that cabling and milling slashes into the wall… “Don’t make the cable hanging out of the wall too long or it won’t fit in there when the wall will be concealed.” So the CAT6 cable was just 10cm short which makes it close to impossible to get that wires into a network jack in the wall. The first 8 jacks were hard… just the last one worked at once. Telegärtner are easy to get into the wall but try to get the 16 wires through the back of the jack without selling your soul. AMP jacks are hard to install into the wall (the song “if I had a hammer” came to my mind) but at least my LSA+ tool easily made it connect the wires. Just don’t make me start about the minimal bending radius. That jack hardly fits into the wall even when the CAT6 cable is creased pretty badly. I don’t know which optimist wrote that specification but if you intend to install network jacks into your house your best bet is to just use an LSA+ tool to connect the wires and use extreme force to press the jack into the wall. If your network tester tells you that you have short-circuited wires then you likely have squeezed wires into the metal casing when tightening the screws (shame on you). Otherwise if the wiremap is just b0rked then check the cabling at your patch panel. Connecting those 9 jacks made me have nightmares about that. Now that everything works I think I’ll try to never touch OSI layer 1 again.

The real reason Firefox was renamed to Iceweasel

Monday, February 19th, 2007

Today I had yet another phone conversation with a developer of a commercial web content filter. While trying to track down bugs I was cursing my firef^H^H^H^H^Hiceweasel for being so slow. The Linux-Magazin recently tested several common browsers. Among them the Firefox, IE and Opera. They said that Firefox is still a bit slower than IE but when I look at my browser when surfing the web I wonder what kind of supercomputer I need to buy to make it usable. I have accepted that Firefox on Linux is slower than Firefox on Windows. And I also came to accept that on KDE it takes ages (up to a minute) to open the Gtk file dialog to save images, pages or downloads somewhere. (Do they intend to persuade me to Gnome?) Recently I “strace”d this monster and it looks like Firefox is interested in my timeofday() every few microseconds. Does it need a wristwatch? Trying Opera I saw how fast browsing the web can be. But since Opera doesn’t have those nice add-ons that I run on Firefox it’s nice for a speed test but otherwise not really my browser of choice. (Check out the “Web Developer” or “Firebug” add-ons if you don’t know them yet.) On some AJAX-overloaded websites my system load is 0.5 even though I’m not even on the virtual desktop where Firefox lives. If only I knew if this is a common problem or if my system is ready for a reinstall. Or perhaps it’s called iceweasel because it’s close to freezing my system

Is TELNET is the only stable MUA?

Monday, February 19th, 2007

The first time I read mutt’s slogan I laughed: “All mailers suck - but mutt sucks less.” But after years of searching for a stable MUA (mail user agent aka mail client) I start to believe that no matter how cryptic mutt is - it seems to be one of two pieces of software that I can actually use to read my mail. After I was offline for a week (thanks, german T-Com) I fired up kmail and it told me that I have 10832 unread emails (nah, not just fan mail - there are mailing lists, too). kmail can’t even fetch mail from a single large maildir folder without crashing. The kind people of #debian-kde recommended me to install the debug version of the KDE libraries to help them track that bug down. And I’m still collecting crash backtraces. But this is ridiculous. I’m restarting kmail time and again. I know that I hear myself ranting about M$ products but even though Outl00k sucks badly it’s at least stable. I think kmail will shortly make room for my good old-school mutt window. mutt is surely cryptic but it’s the only MUA that has all the features someone needs who is seriously working with lots of emails. And if even mutt starts to betray me there’s only TELNET left. Or maybe I’ll start working with email like my old boss when I was a “Hiwi” at university: he had his secretary print out all the emails and put them on his desk. :)