Archive for 2007

The Prometheus Deception

August 3rd, 2007

Robert Ludlum, author of the Jason Bourne trilogy (of Bourne Identity fame) authors this spy novel in 2000. It seems to have been, although I was not aware, his last novel, at least the last one published in his lifetime.

I don't read much of these stories, but I do like them. Ludlum bears resemblance to Frederick Forsyth, of whom I've read two books in the past, but his style is different. Forsyth is more meticulous, Ludlum prefers to be direct. He will describe a hand-to-hand combat scene in great detail, greater in fact than I care to witness. For precisely where the punches land isn't awfully interesting. But unlike Forsyth, the plot is more to do with intelligence and espionage, which is an angle I generally enjoy.

The Prometheus Deception is an elegantly crafted story, but may I suggest it could use a better ending. Nick Bryson narrates an intricate conspiracy on several levels, whose unraveling is both timely and interesting. He is the classic retired-spy-brought-back character, and basically indestructible. The scenes are described well, with good pacing and lots of suspense. Ludlum is good at setting the scene so that you know that potentially there is a lot you don't know, but all the same there is always one thing you know exists that you strive to discover, which imbues the plot with urgent purpose.

The Bryson character is sharp in combat and sensual perception, he can detect the slightest sound, sense subtle movement and so on, playing on the old super-attune-to-his-senses idea. What does seem strange at times is that despite this, he isn't all that bright about the greater pictures and the powers that be. The structure of power in the story is very complex, and Bryson is not the kind to question or doubt what he supposedly knows, where you would expect him to. At times this is almost a little embarrassing, how far he is led astray before he stumbles upon the truth. This is basically his only weakness, but it's not altogether convincing. Ted Waller, his mentor, plays the classic role of the-one-who-always-is-a-step-ahead, whose maneuvering is not explained to the reader.

The plot is very contentious, and the expediency with which Ludlum introduces new foes, and their relative positioning is well crafted. Ted Waller is Bryson's boss, and in many ways they're on the same side, but in many ways they are also enemies. It is enjoyable how characters are not created as traffic cones around which the main character must swerve; their interests migrate, which evolves their relationship to Bryson.

The ending is a problem. Ludlum's plot ascends a steep hill to what appears to be a powerful climax. But somewhere before the end he falters and the pattern of the plot shifts uncharacteristically into what appears to be trouble at tying it all together. What I mentioned as a clear intention in every scene is now missing, and after London, Bryson and Elena (his long lost wife) reunited do a lot of brainstorming, traveling from place to place, picking up tidbits of information that lead them to the final scene. This seems too random in an otherwise watertight story.

As for the final plot resolution, it doesn't quite come. It isn't actually said how "power would be shifted" at all. All we know is that all or virtually all the high rollers of the conspiracy die in a giant fire, but just what they were about to do isn't at all said. Nor is the purpose very clear at all. Right at the end, I'm not even sure what Bryson is fighting against, nor am I convinced of his values. The conspiracy is a plot to abolish national intelligence agencies and deliver all power to an international agency with infinitely superior surveillance power, centered around the single company that provides all this equipment. But is that really so much worse than a CIA acting in national rather than personal/corporate interests? I don't see how. A big stain on an otherwise slick story.

Of course, the valor of a story like this isn't in how it ends, but in how it moves. And with that I'm very satisfied. Ludlum also amuses me in how he insists on using real technical terms. Most authors conceal supposed hi-tec in empty phrases and foggy terminology, but Ludlum actually uses the real words. All the stuff about weapons I wouldn't know, but most of the computer terminology is correct. One head scratcher is his insistence on mentioning software all the time, where software rarely is presented as exciting technology in stories like this. He slips when he says that Elena had brought along specially written software "just for this occasion", written in supposedly a few hours.

Anyway, it's a good story. :)

media spreading FUD

July 31st, 2007

Creative writing is what English teachers like, isn't it? I guess that's what some people were good at in school, and now they're working in newsrooms. Like this fabulous news report.

I should write one of these pieces myself. I'm just not sure if I have what it takes.

Scientists have discovered a *dangerous* new substance called triheptopotassium. You are in _danger_ of being exposed to it almost everywhere you go. Anne Harris, a single mother of three, was walking her two-year-old daughter, Jennifer, in the park when she was hit in the face.
"It came out of thin air, there is no way I could have seen it coming. Once I felt the first drop, I grabbed my daughter and ran for the car. But it was too late, we were both soaked in it."
Anne's friend Marv was home when Anne and her daughter arrived last Tuesday. "She came to my house because it was closest to the park. Anne was frantic. We tried to wash it off her and Jennifer as best we could, but we couldn't be sure that it hadn't gone into the skin and poisoned the blood. We hope and pray that Anne and Jennifer will be okay."

Our technical expert Tony Allen has more. "Thanks, Lucy. Triheptopotassium is a _new_ liquid substance discovered *last year*. It is a clear liquid, which falls from the sky. So far no one knows where it comes from, but one thing is certain: it is *very* dangerous."
Scientists say that the best you can do is stay indoors, and not let your kids play outside under any circumstances.

Now I just need some actors in suits to play the parts. I have to make sure they use enough syllable elongation and other emphasis techniques on words like dangerous.

toward click-free guis

July 29th, 2007

I think that a big part of user interface improvement lies in re-examining old answers to still existing questions. For example: when do we really need to click the mouse?

Motivation

I think we could do with less mouse clicks. And if nothing else, a click-free mode you can turn on if you want to.

survey_sheet.png

I don't know how many long surveys you've taken, but I find them daunting. My question is: why do we need to click to select?

I think the answer is that most people use their mouse pointer liberally and they think as long as I don't click anything, there's no way I can screw up. And thus introducing selection-on-mouseover would be too subtle, and too confusing.

So let's eliminate the confusion.

A mockup

This is a configuration dialog from Konqueror (slightly modded to just show the part I'm interested in). Nothing has happened here yet, this is how it looked when it came up.

konq_dialog.png

Now I want to select the platform option, so I move my pointer over it and the dialog changes to look like this:

konq_dialog_modify.png

The option I selected has become blue, which tells me that this option has been modified.

The two buttons OK and Apply have also become blue, which means that if I click one of them I confirm the modification I have made.

(Should it be necessary to click the buttons or can I just move the mouse over them? Let's go conservative for now and require a click.)

But suppose I don't want to turn on this option after all. I move my pointer away from it, and then I move it over it again:

konq_dialog_unmodify.png

The checkbox has become unchecked again, so the option is deselected. But since I considered turning it on, it's highlighted in yellow to tell me that I thought about it.

Also, the Defaults button is now highlighted, to show that the current settings correspond to the defaults. It's highlighted green to tell me that I have re-entered the default settings.

All good?

One problem that comes to mind is this. If I move my pointer over the dialog I select every option unless I'm very careful:

konq_dialog_pointer.png

One solution could be to set a certain interval during which the pointer has to be on the option I want to select. For example half a second. This would be configurable, of course.

grades are bs

July 28th, 2007

First, read TFA. I have personally made many of the same observations over the years, but Kavan presents it with great coherence and eloquence, so it's well worth the read.

All of us in school have had to endure grades, for better or for worse. Early in my academic career I used to receive very uniform grades, I was a B student, almost without exception. I guess if nothing else, my grades were consistent, so in some sense it seemed logical. It should be said that in both junior high and high school, the teachers had guidelines for grading they had to follow, and their grades were evaluated to some degree - in that statistics were compiled at the end of a year and those whose grading was way off no doubt would get a talking to. In the IB there's even a strict regime to plot grades worldwide, where if the grades of one teacher were considered out of range the whole class would get their grades adjusted accordingly. I was quite happy with that, because it was very organized, and it deprived teachers from having absolute power.

Once I entered the mystical halls of higher education, this state of affairs was upset. My grades suddenly fluctuated a lot more. Some grades I couldn't understand at all. With the unexpected low ones I was mad, with the high ones I was puzzled (but since it was in my interest it didn't exactly enrage me). But one thing was clear: the grades made a lot less sense now. You would think that teachers in colleges and universities would be smart enough to grade sensibly, but you'd be wrong. Half my grades would be right on the mark, the other half would be completely out of whack with my expectations. And not surprisingly, some teachers were much more on point than others. I still think this randomness is because teachers have absolute power since no one is checking up on them. And I detest it.

As Kavan writes, the Bell Curve, which was used as the basis for grading in most of my education, is completely bogus. I recall that in high school, the guidelines said that each of the five grades should be assigned to some x% of the class, so eg. C would get 40%, B = 25% etc. Which is idiotic, because if 50% score an A, then that is what they score.

Another practice which is entirely based on a teacher's inability to give a good test, is moving grades up or down. So if the mean is supposed to be a C and it happens to be a D, every D becomes a C, every B becomes an A etc. If the test was more relevant to what the students actually know, you would expect to get a finer granularity at the level you want to, rather than having almost no one answer the hard questions (which are supposed to distinguish students from each other) and everyone doing the easy ones (which offer no distinction).

The gravest mistake I've encountered is to make the test completely irrelevant to the teaching. There is no excuse for this kind of stupidity, and yet it happens. Sometimes exams have a sizable portion of problems concerning stuff that was nowhere in the syllabus at all. What on earth is the point of this? Is this a teacher's admission to "I would like to teach the stuff, but I don't know how, or I don't have the courage, so I'll just give it on the test alone"? Or maybe "this is what I wish my course to be about"?

What annoys me most is the disregard for quality grading. If you had parking attendants in the city who wrote tickets without much care as to whether your ticket is valid, or whether you were parked legally, you'd be pissed, and rightly so. Incompetence, at all levels, is grounds for complaint. Many years ago I had a teacher who graded 70+ exam papers in two days (the standard for getting grades out was 3 weeks) and the grades made absolutely no sense. So many people were pissed off that the department decided to stage an extra re-exam.

How can you possibly defend that grades in higher education are less accurate than those in middle school?

using your dotfiles on the go

July 27th, 2007

Chances are you use more than one computer in your daily/weekly/monthly routine. Probably not because you want to; it would be more practical for all of us to just have one place to store all our stuff, but alas.

A problem

Anyway, if you do then you know the pain of sitting down somewhere to not use your carefully set up and configured environment, dropped into some sub par default world that doesn't have all your personal goodies.

I've endured this for a number of years, until eventually I decided to fix it. Mind you, the reason there isn't a standard solution for this is that the problem has a rather large number of variables. But for this you need:

  • a universal storage (http, ftp, etc)
  • bash or zsh

The idea came up when I started fiddling around with zsh, trying to get a reasonable prompt working. Once I finally had, obviously I wanted the same environment that I do in bash already. And not knowing whether I'd love zsh enough to use it permanently, I also wanted the option to use bash whenever I might want to.

To complicate things a bit, I also like the option to have my prompt look slightly different depending on the host I'm logged into. One too many reboots when logged into a remote server (thinking I was rebooting the local machine) made me introduce that as policy. :D

So my prompt looks like this, where the hostname always has a different color on every host. I also change the curdir to be red when I'm root to remind me of that fact.

bash_prompt.png

After a lot of trial and error I eventually got my zsh prompt looking very similar.

Finally, there's the aspect that perhaps on some hosts you need some local settings as well, so one should make allowances for that. For instance, perhaps you want to set PATH or LD_LIBRARY_PATH on just one host.

A solution

All of these concerns produced the following files:

.zshrc
.zlogout
.zsh/functions/
.zsh/functions/prompt_numerodix_setup
.bashrc
.bash_profile
.bash_logout
.myshell/bash_local
.myshell/colors
.myshell/colors_zsh
.myshell/common
.myshell/common_local
.myshell/hostcolor_local
.myshell/zsh_local

The .bash* and .z* files are the usual stuff, of course. But everything common to bash and zsh is contained in .myshell/common, which is imported by both .bashrc and .zsh. That way we can share stuff between them. Further, everything called *local is local to the specific host, so these files are not distributed as part of the config update.

But the most useful bit is the pair of functions called pushcfg and pullcfg, in .myshell/common, which do the actual work of storing updates of these files in the central location. I use a website for this, but you could use some other easy-to-reach location just as well.

To see what happens, let's see the pullcfg function.

pullcfg(){
	oldcwd=$(pwd); cd ~
	wget http://www.matusiak.eu/numerodix/configs/cfg.tar.gz
	gunzip cfg.tar.gz
	tar xvf cfg.tar
	rm cfg.tar
	touch .myshell/common_local .myshell/bash_local .myshell/zsh_local .myshell/hostcolor_local
	find .zsh | xargs chmod 700 -R
	cd $oldcwd
}

So the tar file is downloaded and extracted, overwriting the existing files. Then all the local files are created empty (unless they already exist) so you don't have to remember their names.

So all you do is log into a host, download the file and unpack, then to update run pullcfg. And after that you should logout and login to see the effects.

But back to the prompt issue. A common problem with bash is that it has colors but there's no easy way to use them. The file .myshell/colors defines variable names for them, so everything related to colors is made much simpler. From there on, the prompt can be set quite simply like so.

PS1="${cbwhite}[\u@${host}\H${cbwhite}] ${cbgreen}\w \n${cbblue}$ ${creset}"

cbwhite means "color, bold, white", while cwhite means "color, white" and is the darker shade of the same color. Now, since zsh handles colors differently, .myshell/colors_zsh redefines these variables just for zsh, so that they work in both shells.

But what about changing the color of the hostname with every host? Glad you ask. The first time I extract the tar file on a new host, the prompt is not colored. This is to remind me that I haven't set a color for the hostname on this host yet. The hostname's color is defined in .myshell/hostcolor_local. So in the screenshot above it contains the line "cbmagenta". Once this file exists, and is non-emtpy, the prompt will become colored.

And so the whole thing works, with equally enough organization and flexibility to do just the right things. :)

Want to test drive? Download the tar file:

Of course, once the opportunity presents itself to migrate settings, I take advantage of that to also include .vimrc and whatever else is useful to have.