Wednesday, October 22, 2008

Everything tastes like cloves


My coffee tastes like cloves, as does the banana bread and my strawberry yogurt I had for lunch. The icecream I had last night tastes like cloves, as did the Tilapia and boiled vegetables. I swill my mouth out with water, but that only makes the clove taste even more intense. I even smell like cloves (so I am told).

Currently I am recovering from having all my wisdom teeth removed on the 10th of this month. After developing dry socket over the weekend (worst pain ever, thank-you very much, and that is despite me taking heavy-duty prescription painkillers) my oral surgeon has packed the sockets where my impacted wisdom teeth once were with gauze soaked in Oil of Cloves.

Oil of Cloves is obtained from the clove plant, Syzygium aromaticum, in fact from pretty much any part of the clove plant. The only active ingredient is eugenol, and it and Oil of Cloves have some pretty weird and wonderful uses. It is basically the clove-like smell associated with going to the dentists, as it is a natural topical anaesthetic (hence it being stuffed in the gaping holes where my teeth once were). It is also present, at smaller concentrations, in Cinnamon, Nutmeg and Bay Leaves. But its also toxic when ingested in large amounts (lethal dose for humans is 3.7g/kg) and is used to euthanize fish, in addition to being used to polish and clean Samurai swords.

And it tastes horrible. Really quite nasty. Try spending every waking moment for several days tasting it - if it weren't for the fact that its saving me from indescribable agony I wouldn't put up with it. But as Molecule of the Day notes, eugenol is not that dissimilar in chemical structure from vanillin, and vanilla is one of my favorite flavors. Artificial vanilla flavoring used to be synthesized using eugenol as a starting point, although now different methods (in the 60's the predominant one was based on Canadian wood-pulp) are used (at least, thats what wikipedia claims).

To think I would never have known all this had it not been for those damn impacted wisdom teeth!

[Image of eugenol structure taken from the Molecule of the Day eugenol entry]

Who contributes most to the Linux kernel?

The latest Redhat magazine has an interesting aside on who contributes most to the Linux kernel. According to Greg Kroah-Hartman's (*) analysis, and as measured in raw number of patches the general community comes in first, with Redhat coming in second. Canonical, the commercial sponsor of the now popular Ubuntu (a spiffy modification of Debian) comes in 79th.

The overall largest contributions to Linux code come from individuals who have no apparent affiliation with any company, as Kroah-Hartman surmised by looking at their e-mail addresses. Red Hat came in second overall, with 11,846 patches.

By comparison, Canonical, the company behind Ubuntu Linux, is the 79th most active contributor, with 100 patches. Kroah-Hartman said that such behavior on the part of Canonical will be detrimental to the company and the Ubuntu distribution over time [emphasis mine].

“Then there are the distros that base themselves off of other distros, like Ubuntu and [Lance Davis’] CentOS. These distros have yet another layer between them and the original developers. Patches rarely, if ever, flow backwards into an upstream distro, and the developers are very unlikely to push their changes into the upstream packages as they don’t feel the need or don’t realize the issues involved as they rely on the upstream distro so tightly,” said Kroah-Hartman.

This is interesting, and not just as food for a meaningless distro-war. While I personally prefer Fedora to Ubuntu or Gentoo, I can recognize that as a distribution Ubuntu is pretty slick and well structured, and has done a lot to combat the myth that Linux is unfriendly and difficult. Ubuntu has been the most popular distribution according to distrowatch for several years. But somehow the heavy work on Ubuntu has not not flowed back into the kernel, at least as measured in patches. Why?

If forced to speculate without any evidence to support it I'd guess that much of the work on Ubuntu has been in terms of user-interface and applications, and not at the deeper level of the Linux kernel. Yet Redhat clearly feels the need to work very heavily at the kernel level. So this guess doesn't satisfactorily answer the question.

If anyone has a better hypothesis or insight, please let me know.

(*) Greg Kroah-Hartman works for Novell's SUSE labs division.

Mini-review: Star Wars: The Force Unleashed


My overly-long post criticizing Halo 3 now seems a little out of proportion. I finally got Star Wars: The Force Unleashed (Xbox 360 version) to cheer me up while I recovered from having my wisdom teeth out. Boy, that is really a game with fundamental problems.

I was aware of the less-than-ecstatic reviews by X-play and gamespot (following their rather over-hyped pre-launch coverage), but sometimes things that bug other people don't really end up being something that bothers you (e.g. I liked the repetitiveness of Assassin's Creed, because that stuff was fun for me and I liked doing it again and again).

Given my generation I have a soft spot for Star Wars and even Star Wars games, and ST: TFU is great... in parts. Visually, even story-wise it varies between good and great.

But every now and again I ended up spending two hours trying to jump over the same damn chasm, or gap between two bridges, in an endless loop of button-mashing frustration.

Dodgy auto-aim, check. The only enemy any near me is a purge trooper right in front of me, except the auto-aim has my force lightning zapping off at some crate at 90 degrees angle to where I'm looking. Try to throw something with the force, and half the time it wont go where you want.

Boss battles where the bosses are immune to half of your force powers - thats just nasty - but add in the suddenly fixed camera and quick-time events spoil what should be epic cinematic moments. I don't remember any of the awesome moves Starkiller is supposed to have performed killing the Bull Rancor or defeating Vader, because all my attention was focussed on the bottom of the screen looking for the next X, B, A, Y to appear.

And don't even talk to me about that stupid bit trying to pull the star destroyer out of the sky. Which also looked totally different to the preview trailer they produced a year or so ago. Yes, lets create a situation completely different to the rest of the game control-wise and not explain any of it at all. Another hour or so of frustrated load, struggle, die, load... etc before I gave up and searched the web on what to do.

Anyway, it did have enjoyable moments, but the flaws were real and significant. I can't imagine that play testers didn't point out the problem areas that broke the flow and immersion of what would otherwise have been a pretty spectacular (if short) game.

What now for Star Wars fans? Bioware has finally announced what was long suspected: A Star Wars MMORPG set in the time of the Old Republic. I love Bioware's RPGs, but an MMO? It appears Bioware has accepted that almost everyone will want to be either Jedi or Sith, but I wonder how well balanced this will work out to be in practice.

[ST: TFU image from the gamespot review of the game.]

Saturday, October 18, 2008

Replay: Halo 3

Why am I only replaying the Halo 3 campaign for only the second time now, almost a year after it came out? That is the question I'm asking myself. I can't remember how many times I replayed the original Xbox Halo campaign, but the number is probably near or over 10. I've replayed the (not quite as satisfying but still fun) Halo 2 campaign at least four or five times.

It is not that I'm spending significant amounts of time on the multi-player... yes, Halo/2/3 multi-player is certainly nicer than Counter Strike and with the right people playing (i.e. not teenagers) its engrossing fun for a while, but multi-player isn't my favorite game play style.

I've been a big Halo fan from the get-go. I got the original Xbox to play Halo. I bought the PC version of Halo and upgraded my PC in order to be able to play it. I got Halo 2 the day it came out, and thought it was a way more enjoyable game than the similarly-timed Half-Life 2. I bought the Xbox 360 specifically to be able to play Halo 3. So I'm kind of bugged that I find I'm not playing Halo 3 all the time. I played it when it came out and enjoyed it, deliberately ignoring the critics. But playing through the first three levels for the second time last night left me... empty. There is something in the original that isn't quite there in the Halo 3, but what is it?

From a superficial standpoint Halo 3 should beat the pants off of Halo. Graphics technology from 2007 compared to 2001-era graphics, in a machine with vastly more CPU and GPU power. Improved AI. Wider and cooler array of weapons and vehicles. And the same company is at the helm, this isn't just a quick retread by a different company working on a time-limit (you know I mean you Obsidian!). All of these things matter - and in their little way they do add to the fun. But the problems lies elsewhere, and is to big and too general to be papered over by superficial gimmicks like detachable mini-guns.

Its not that Halo 3 is bad game, or not fun, its just that some part of the gestalt is not quite right, not as good as the original Halo.

Let us go through the list of things I've considered and see if they stand up under scrutiny.
  1. Rushed and over-specified storyline, with
  2. Spotty and inconsistent voice acting.
  3. Play balance is off kilter for single player.
  4. Linear game-play and levels that lack the expansiveness and freedom of Halo.
Lets consider 1 and 2 today, and return to items 3 and 4 in a later post.

Voice Acting: Early in the game, Cortana's frequent apparitional interruptions of the Master Chief are both annoying and curiously flat emotionally. Lord Hood's various statements (voiced by Ron Perlman) are pretty flat and lifeless even when they are meant to be rousing calls to arms. Later in the game, e.g. when the Master Chief is rescuing Cortana from High Charity, Cortana's voice is over-dramatic. Is this the writing (some of the lines are pretty sophomoric), or the deliberate direction given to the voice actors?

Although this is annoying and somewhat immersion-breaking it doesn't really bring down the game play. There is some truly horrific voice acting in games (e.g. Bloodrayne 2) that are still fun.

Story line: The story line is a real weakness in Halo 3.

In the original (Halo: Combat Evolved) there was no back story, and the story and game-universe unfolded as we played: A beleaguered human race under attack by a federation of alien religious fanatics who could not be talked or reasoned with, a fleeing human ship finding, exploring and destroying a mysterious alien artifact: Halo. What the story didn't reveal itself was left up to the mind of the player to fill in. By not saying too much the writers of Halo made their imaginary universe seem more real.

By the time Halo 3 comes out the Halo franchise has been stuffed full of pulp novels and comic books. There is now an elaborate back story whose level of internal self-consistency and quality is decidedly non-uniform (too many cooks spoil the broth). The enemies (both Covenant and the Flood), now fleshed out by all the genre merchandising, speak better English and are much chattier. Rather than the implacable alien foes of Halo: CE we now have enemies who appear merely misunderstood, petulant, or had bad childhoods, or something. The Elites don't bat an eye at co-operating with the Humans, nor express a moment's regret at abandoning the only religion they've supposedly had for thousands of years? Its just not believable. Its cheesy.

As with Halo 2 the game tries to tell too much in one game. Halo 3 has the Master Chief returning to earth, dealing with the Prophet's invasion of Africa, activation of the portal to the true Ark, attack of the flood, visiting the Ark, invading and destroying High Charity, activation and destruction of the replacement Halo ring. It is way too rushed.

Now I understand the dramatic impact of driving the story fast: get to Truth before he activates the rings and wipes out all life in the galaxy. No time to dawdle around exploring one thing at a time. But that could have been accomplished better in a single environment, be it Earth or the second Halo (had they been sensible about not rushing things in Halo 2 either). Halo was cool because you got to explore, at your own pace, all the different environments afforded by a ringworld, and they were often wide open and non-linear (I'll discuss level design some more in the next post on Halo 3). One had variety within a unifying theme.

But the writers of Halo 2 and Halo 3 seem to have run out of imagination regarding the rings - instead we have Earth, the Ark, etc etc. Multiple epic image that are never well fleshed out before being abandoned for the next new thing. Coupled with the rushed pace of the story line, all we end up with is a blur of images (most of them painted on sky boxes) as we move the Master Chief along the fixed linear line imposed by the story from Earth to the Ark to High Charity to the new Halo...

So the quality of the story line is inferior in Halo 3 compared to Halo: CE. Is this enough to damn the game? After all, when you start to get picky there are few games who's story lines stand up to close inspection. Half-Life, Half-life 2 and its subsequent episodes are all entertaining, but are hardly masterpieces of writing or paragons of internal consistency. When I next post on Halo 3 I'll discuss what I think of play balance and level design in Halo 3 with respect to Halo.

Friday, October 17, 2008

Linux Journal covers number crunching with GPUs and scientific python

From a number cruncher's perspective the November 2008 issue of Linux Journal is actually quite interesting. In addition to an article on the petaflop Roadrunner supercomputer at LANL, there are two articles on number crunching with GPUs (one by Robert Farber, the other by Michael Wolfe) and one article on numpy/scipy by Joey Bernard.

Farber's article is really an advert for NVIDIA's CUDA, and unfortunately doesn't actually show any examples of doing something (this is something of a trend in LJ, as it seems to drift away from showing you how to actually code things and toward merely describing point-and-click mega-code-projects). Wolfe's article shows snippets of matrix multiplication using both CUDA and Brook, but is really more of a discussion about how to write a compiler that would automatically parallelize for GPGPU work.

Joey Bernard's article on numpy does try to scratch the surface with simple worked examples, including the use of matplotlib for plotting (or "ipython -pylab").

For a moment after reading his article I was terrified that I'd totally messed up using numpy in my python projects, as Bernard states that array multiplication in numpy (e.g. a3=a1*a2) is handled as a matrix multiplication!

However, its pretty easy to verify that unless you specifically created matrix objects (which his example did not do), then a1*a2 is an element-wise array multiplication.

To do matrix-like multiplication on numpy array objects you need to specifically do something like "a4=numpy.dot(a1,a2)" or "a5=numpy.mat(a1)*numpy.mat(a2)."

Anyway, I hope this issue is a sign that Linux Journal may get back to publishing more "hands-on" articles on general programming topics interspersed between all the Web 2.0 and database articles.

Wednesday, October 8, 2008

Less than impressed with KDE4

My first Linux window manager experience was with fvwm - a step up from twm but hardly fancy and barely, just barely, functional. I forget the names of the window managers we used on the Decs and Suns used back in the mid-90's, but they weren't particularly fancy either. Since then I've used fvwm2, early versions of Enlightenment, Gnome (version 1), KDE2 and KDE3.

And over the years there has generally been progress, and progress by definition is good. Progress until now, that is.

I switched to KDE after experiencing major dissatisfaction with Gnome 2, and now that KDE4 is out I'm contemplating switching window managers again. Only it can't be the latest version of Gnome, as I have that on a spare laptop and don't like that either.

My first experience of KDE4 was on Kubuntu 8.04, an upgrade from 7.10 on an old Dell Latitude C400. That didn't last long enough for me to get a taste of KDE4, as the machine started freezing for no obvious reason after relatively short uptimes. A wipe and fresh install of Fedora 8 with KDE3.5 and the laptop worked fine once again. Was it Ubuntu, or KDE4?

Upgrading my home desktop to Fedora 9 (with KDE4.0) was the first real experience I had with KDE 4 and I was not impressed. Yes - I've read the blogs that discuss the fundamental reasons for chucking out vast amounts of the KDE3 code and rewriting things like the panel from scratch. Maintainable, extensible code is good.

But when the panel clock widget can't even handle displaying seconds you begin to think of KDE4 as a major step backwards. For an application as simple as a clock the KDE4 folks failed to provide the same functionality as KDE3. How the hell did this happen?

As for adding a terminal launcher to the panel - what happened to "Add Application Launcher?" I can add a widget - there seem to be an large number of widgets, most of which are thoroughly useless - but I don't want a widget. It took at least 30 minutes of messing around to work out that items in the launch menu (Kickoff its called, replacing Kmenu), when right clicked on, give an option to add to the panel. But you can't click on the panel itself and add an application launcher from there, even though its (a) the way KDE2 and KDE3 worked and hence the way KDE users expect, and (b) the old was more intuitive.

Oh, and don't edit the launcher's setting because the terminal icon will disappear and be replaced with a question mark. Progress, I tell you.

And transparent Konsoles (terminals) - we used to have those. Except now we can't have that. Sure, we can make the whole window transparent, including the writing, but that makes the writing hard to read.

As for the new panel (Plasma), well, hum, I totally agree that the power to add widgets to the desktop as well as the panel really makes up for the major lack on control over the panel appearance and lack of old panel (kicker features). That's what Linux is all about. Eye candy. No one really uses it because it is (or used to be) more functional, that is just a lie we tell the Windoze fanboyz.

Yes, I'm being sarcastic.

Its enough to make you suspect that major parts of KDE4 were written by 13-year olds whose Ritalin or interest ran out before they'd finished coding even the most basic of applications.

Now I'm a patient kind of guy. KDE4 and Fedora 9 came out ages ago and I refrained from complaining because I expected these "bugs" to be ironed out. "Yes, all very unfortunate to roll out a product clearly not ready for prime time, and that is functionally inferior to its predecessor, but I'm sure it'll get better" I thought in my typical latte-sipping, elitist, East Coast liberal mode of thinking...

So I waited. And lo and behold, the clock widget now does seconds. Hallelujah Brother! Can I get an Amen? Except the damn Konsole launcher in the panel is now failing, and takes a minute or two to tell me "KDEInit: can not launch /usr/bin/konsole". Acting on a hunch I remove the --enable-transparency option and it works again... for now.

So KDE4 remains on probation as far as I'm concerned. I have a lot of experience invested in KDE, which I am loath to lose by switching to Enlightenment or XFCE, but I'm warning you KDE: Mess me around some more and it is over.

Monday, October 6, 2008

Anathem. You either get it or you don't.


If you know what this figure is, then I think you might like Neal Stephenson's Anathem. If you don't know what this is, or worse, know but don't think its cool, then you're not going to understand Anathem. Sadly PZ Myers is in the "I don't get it" camp.

The figure is of course Euclid's famous but overly complicated geometrical proof of the Pythagorean Theorem (the image from the Wolfram web page on this subject, which is worth reading).

Forget the later half of Anathem - its just an extended action scene - the real meat is in the first half and if you're not hooked by the dialectical discourse between Theors by half way through then you're not going to get it.

Anathem is a exploration of math, physics, and metaphysics, OK? Square root of two demonstrated by cutting cakes. Many-worlds interpretation of quantum mechanics. Platonic forms. Etc.

If you don't know much math, physics or metaphysics, you might not be able of appreciating it. The same way Cryptonomicon is best appreciated by people with *nix experience (and OSX doesn't count, apple dweebs!), Anathem is best appreciated by people similar to the Theors it describes.

Friday, October 3, 2008

Misology: You learn something new every day

Actually if you are a misologist you probably don't learn something new every day because you fear or hate reason, logic and knowledge. Not a good character trait in someone who has to run a country, but some people insisted on voting for the folksy ones.

I don't think I'd heard the term before today, but now I'm going to use it all the time.