Archive for December, 2006


December 18th, 2006

Originally posted by Shakespeare:

- Claudius kills Hamlet (sr), becomes King.
- Hamlet (jr) kills Polonius.
- Claudius tries to kill Hamlet, fails.
- Hamlet kills Rosencrantz and Guildenstern.
- Ophelia kills herself.
- Claudius poisons Gertrude, the Queen, by accident.
- Laertes and Hamlet poison each other.
- Hamlet kills Claudius, then dies from the poison.

Rated R for violence and strong language.

    The plot is like a Lethal Weapon movie. However, the weapons are different, and there aren't any explosions.

    But I gotta say the play is still enjoyable for the artistic dialog. While the plot is boring and obvious, the small talk entertains your mind, I like that.

    Hamlet: Begger that I am, I am euen poore in thankes;
    but I thanke you: and sure deare friends my thanks
    are too deare a halfepeny; were you not sent for? Is it
    your owne inclining? Is it a free visitation? Come,
    deale iustly with me: come, come; nay speake

    Guildenstern: What should we say my Lord?

    Hamlet: Why any thing. But to the purpose; you were
    sent for; and there is a kinde confession in your lookes;
    which your modesties haue not craft enough to color,
    I know the good King & Queene haue sent for you

    The King sent him to talk to Hamlet. Guildenstern doesn't want to admit it, but doesn't deny it. Hamlet calls his bluff. What a fun way to talk.

    Also, if Shakespeare's editor had done proper fact checking, he would know Poland and Norway have never been at war. Poland and Sweden, indeed.

    Hamlet should be read at leisure, like a Donald Duck comic book. Anyone expecting some grand revelation is in for a big disappointment. In fact, better read Erik's play, which is more intricate.

    the idiot's guide to dish washing

    December 15th, 2006

    Just because something is simple, doesn't mean a lot of people won't get it wrong. I've been living without a dishwasher for the first time in my life, and while that's not been a problem for my own sake, it's other people not using one that's more of a bother. Because I hate reaching for a plate, and getting my hand greasy just from touching it. We do share the same dishes after all.

    The idiot's way

    You cook food, you leave the dishes to be done after you've eaten. By the time you get back, the remains of the food have dried and have stuck to the dishes. You scrub like a madman and realize it's very hard to get everything, so you get the worst bits off, then leave the dishes to dry.

    The normal way

    You come in to do the dishes, you see the food has dried. You pour water over the dishes, put some some dish washing liquid in there as well, and let it soak for half an hour. When you come back, most of the food comes off without touching it, the rest you gently scrub.

    If you don't know this, then you aren't terribly astute. A ten year-old will, at some point, have seen *someone* pouring water over dirty dishes while you were watching. I don't care if it's your uncle or your home ec teacher. When you saw that, it should have made you ponder why it's being done.

    What is clean?

    Clean = pure porcelain. If you run your fingers over a plate and you feel tiny crests on it, it's not clean. If you see tiny dots on it, it's not clean. A good way of checking is running water over it. If the stream of water reveals that the surface isn't even, then you know it's not clean. All you have to do is scrub some more and it will come off, trust me. And be generous with the dish washing liquid. Forget that "one drop is enough for a bucket" crap, you can afford to wash your dishes properly.

    Also, just washing one side of a plate isn't good enough. The whole dish has to be clean on all sides. If you cook rice in a pot, and wash the pot, but on the outside there are long streaks of white, it's not clean. Pans will eventually look pretty nasty, because of all the burnt food. If you have a pan like that, you're not obligated to remove all the dirt on its sides and bottom. Just restore it to the condition it was in before you started using it.

    I inspect every dish I need before using it, and wash it if need be. I wish we had a machine to sterilize them after use.


    December 14th, 2006

    I'm generally not a big fan of science fiction, and I first heard of Dune through the excellent game Dune 2000. The real advantage that game had over the Command & Conquer series was a proper story, not something cooked up in 20 minutes.

    Dune is the novel by Frank Herbert, from 1965. It is known as one of the finest works of science fiction, and the first novel spawned a whole series, upon which movies and tv-series were based, and several computer games. And while the book is now quite old, it doesn't seem outdated.

    I find the story very compelling, it is "my" kind of science fiction. That is a fictitious world, yes, but with a significant element of realistic technology. In a word, it makes sense. It is internally coherent, there are no strange, unexplained loose ends. The world of Dune is very complicated, the mark of a good sci fi story. There are lots of angles and aspects to this world. Although the account is driven by one thread, by one set of people, there are lots of entities with different motives and interests, so the interplay between them is interesting.

    It is a futuristic inter-plantery world. There are several noble Houses, which are feudal societies. Each has a leader, a blood line, and its own home planet. The two protagonist Houses in Dune are House Atreides and House Harkonnen. The Houses are in a sense united (but fierce rivals) under the imperial House Corrino, ruled by the Emperor of the Known Universe. The Emperor is supposed to be the neutral moderator/arbitrator between the Houses, but he has his own motives. Every house has its own army, where the Emperor's elite army are the Sardaukar, the finest in the universe. The Spacing Guild is an independent entity, which has the monopoly on space travel. Then there is the secret female order of the Bene Gesserit, with members all through the different Houses and their motives are completely different from everyone else's. Their ultimate goal is careful inbreeding between the Houses, so as to produce the perfect genes to create their perfect being, the Kwisatz Haderach. The Bene Gesserit allow themselves to be exploited by the various Houses for their abilities of premonition, while pursuing their own goals. All of the Houses (and the Guild) depend upon the precious commodity, the spice melange (the monetary unit in Dune). This is found only on the wild planet of Arrakis. Arrakis is a desert planet, plagued by a complete lack of rain, by giant sand worms marauding the desert and incredible sandstorms. Most of the planet is uninhabitable. The Houses take turns in controlling this planet. Arrakis has a native population - the Fremen, a desert peoples who are born in this climate and brave the elements to the point where they are part of the desert. They also consume the spice and depend on it to live. Finally, the strong leaders often have mentats, a human trained to think like a machine, fed as much data as possible and performs computations to reach conclusions. Mentats, like a machine, cannot lie, but has a full set of human emotions (so while they cannot conceal a fact if asked about it, they can still be scheming and devious).

    All of these people are humans, just with different cultures and gene histories. All of these groups generally have a hierarchy of power, so there is often struggle between the layers in this hierarchy, and of course struggle between the different groups. The Houses are bound by the Great Convention, whose breach is a very serious transgression, and always covert. There is much political ambition, diplomacy, deception, treachery, bribery. The key characters are very intelligent, and there is a fine play between what is happening and what is being said. So the politics are very complex, and that makes it interesting.

    The most interesting single character is perhaps the Baron Vladimir Harkonnen. This leader is more or less the symbol of evil, and most of the plot unfolds through his actions, direct or indirect. Highly astute and educated politically, a brilliant schemer.

    But what is probably the most interesting aspect of Dune, is the mental/physical powers of these people. Most of the people are just humans as we know them, but those trained in the school of the Bene Gesserit (and certain children of nobility) have powers of awareness and senses developed far beyond what we know. Their awareness of their own body is very extensive, they can examine themselves for disease and injury, control their muscles with incredible precision, "hibernate" under extreme conditions into a mode where only the core functions of the body operate (by controlling the breathing and heart rates), they have techniques to handle any emotional situation (like death of kin) and push it away to retain full control over their mind, methods of relaxation under extreme stress and so on. They also have wide ranging outward abilities, like being able to read a person's emotional state through the tones of their voice (for instance to determine whether he's lying), to twist their voice so as to induce an emotional state upon a person, to decipher a new language based on a short conversation. Venturing into the more fantastic, the Bene Gesserit have the ability to be in more than one consciousness at the same time, to convey their awareness to another Bene Gesserit (basically a transfer of all knowledge and memories from one person to another), to foresee the future in certain limited ways.

    Another fascinating idea in Dune is the Missionaria Protectiva, a bit of "religious engineering" on part of the Bene Gesserit. On Arrakis, they spread myths and legends about the future, about a leader who is to come and realize certain prophecies. This religion is later realized by that leader, who is able to exploit the religion to become leader of the tribe and lead to whatever political goals he has, without any kind of dissent among the population.

    I mentioned technology, and there are some ingenious technological concepts in Dune. The Fremen, the desert people, have a very powerful culture of preserving water (obviously in the desert water is precious). To this end, they carry stillsuits, a body suit which covers the whole body, collects all the moisture radiating from the body and recycles it. So essentially, a Fremen loses no water at all, and drinks the recycled water through a tube (which is a pretty good justification by the author for creating a peoples who live in the desert, something we consider impossible). Other technologies in Dune include laser guns, electro magnetic shields, spice harvesters (which harvest the spice in the desert), atomics (nuclear-like weapons), various kinds of air transport, but also domestic items. Close combat, however, is chiefly with the use of blades.

    In such a magnificent world, the story is really quite secondary. Even a poor plot (which it isn't) would make an interesting story. The story is told through fragments of days or weeks of time. Fragments which tell of much more than just what is told in its space. From chapter to chapter, we join different groups of characters in what they are currently doing, which describes not only the present situation local to them, but also the world at large (the relevant world at least) and prospects of the future. So although the total amount of real time covered isn't great, through it the story conveys much greater bits of time. This has the elegant feature of always being in the present, but without having to give background or comments.

    Not Invented Here illustrated (here)

    December 13th, 2006

    Say you were starting a project to develop a common application, like an email client, a web browser, a chat client, something along those lines. You would be well aware of the existing applications in this space, indeed that was your very reason for writing your own, you didn't quite like any of them. But in your quest to Build A Better World, would you consider re-using elements from existing applications, those elements which were entirely common and for which there was no reason to do otherwise? If you said yes, you're an exception. Because many would not.

    Let's look at emoticon themes in different chat clients. Emoticon themes are so simple that defining a theme truly isn't more complicated than making a list of emoticons - and for each one, a list of replacement strings. This is how they do it.


    Nothing fancy here.


    Kopete's syntax says "look at me, I use xml, I'm so sophisticated".


    Most elegant of all, perhaps, defining the emoticons as a native dictionary in Python, which is what Gajim is written in.

    Three different clients, different syntax for each. But tell me this, is there any semantic difference between them? No, the all mean the same, they convey the same information, exactly the same. Each of these files has to be parsed differently (Gajim's natively, so the developers don't even have to write code for it), and each has to be written separately. Now, for someone, let's say, who creates an emoticon theme and wants to support these clients, that person has to deal with three different configuration files. Since they are semantically identical, it's not very difficult, but all the same it takes the effort to do it. And these three are just clients which make emoticon themes easy to use, there are others which aren't quite as easy on the user.

    So what stands in the way of having one common syntax for this? One common standard? Kopete re-using gaim's format? Nothing. Other than isn't it awesome to write it from scratch?

    Miranda IM : braindead design

    December 12th, 2006

    I was on a quest to find a Windows jabber client That Doesn't Suck, which is a surprisingly tall order. Along the way, I came across Miranda, which looked promising at first. The project's goal, apparently, is to develop a small and easy client. The website makes a good impression, in fact it turns out to be a lot more fetching than the client itself, which isn't beautiful. But enough about looks. I was testing for a certain subset of features, and the first impression was good. Multi protocol client, low memory footprint, small windows, and it seemed to have all the essentials - file transfers, avatars.. hm no emoticons? Turns out Miranda is so small that emoticons are treated as a plugin. I download the add-on, a .dll (not the first thing that comes to mind when you say user friendly) and dump it in the right place. Yes, emoticon themes are supported. I'm interested in that, because I maintain one.

    Now, it's bad enough that every client has a different way of dealing with emoticon themes. And these approaches do not vary in what functionality they provide, all of them do the exact same thing. Making an emoticon theme is no more complicated than this:

    angel.png *angel* *A*
    biggrin.png *biggrin* *g*
    blind.png *blind*

    The above is from gaim. It's simply a picture, and a list of replacement strings which activate it. There's nothing more to a theme declaration than this. For the purpose of my emoticon theme, I wrote a few simple scripts which generate these files (which are all similar). Thusly, I wanted to find out how to generate a theme file for Miranda.

    I was in for quite a surprise. The declaration itself is very much the same, of course:

    ; defines-----------------------------------------------------------------

    Smiley = ".\OGSmileys.dll", -127, "*biggrin* *g*"
    Smiley = ".\OGSmileys.dll", -122, "*blind*"
    Smiley = ".\OGSmileys.dll", -111, "(B) (b)"

    But what of the smilies themselves? They're in a .dll file! That's right, in Miranda's Smaller, Faster, Easier spirit, they have stored the images in a .dll. This simply means that the same bits are aggregated in a library, there's nothing more happening there, they're not being compressed or processed in any way, just plain stored.

    Need I mention that emoticon themes are supposed to be easy to create? It's not supposed to take a coder to do it, it's a feature for users to enjoy, to tinker with, without needing any help.

    So for someone who wants to make themselves an emoticon theme for Miranda, they need a compiler! Yes, nothing easier than tossing a few images into a directory and setting up a definition (like the one for gaim), that any schmuck can figure out, no you have to compile the bloody thing. Screw that all the other clients are doing it this way, we don't give a shit, compile it or piss off. Needless to say, for me to find and set up a compiler just for this would be a humongous hassle and no sooner did I discover this interesting little quirk did I dump Miranda altogether.

    The Miranda people are so in love with .dll's, that connecting to Google Talk (which is also an add-on), you need to download another .dll. Then you need to install an openssl library as a whole separate install. Yes, ssl also an add-on, who would possibly need that?

    UPDATE: Apparently there are other ways to do this.

    UPDATE2: Factual errors were discovered after this entry was written, as such I posted the link above, to the Miranda forum, where the clarification was established. However, not unreasonably so, the Miranda people have urged me to clarify the situation right here as well, so as not to misrepresent their client.

    Emoticons in Miranda were historically stored in .dll's. That explains why the theme that comes with the plugin is as such. However, that is not the only way to store them, and the emoticon definition example included in the plugin (which I failed to notice), explains the different options, including just using pngs.

    It was never my intention to misrepresent Miranda, and while my observation about .dll's was not incorrect, it was incomplete.