Archive for July, 2007

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.

taking care of your nails

July 19th, 2007

Oddly enough, this is a conundrum which seems to affect only women. Few things are so gender biased as nail care. See, for men it's very easy. Wash and cut, you're done. But women have a whole maze of ideas and bad advice to navigate. And for this reason they get it wrong a whole lot.

What you're basically saying is that your nails are so ugly/dirty/disgusting that this fugly nail polish is actually nicer to look at anyway.

Shape

Let's start with the basics. Do you know what species you are? Yes, human, correct. Here's the thing. Men and women are both human. Their hands and fingers are exactly the same. And the rules for nail care are thus also the same. You cut the nail where the skin of your finger ends.

It's like women sometimes want the shape of their nails to be like the nails of members of the animal kingdom. Instead of ending them where the skin ends, they want to extend them for no apparent reason.

It's odd how controversial this rule is. See, leopards have long nails, don't they? Yes, because it's also a weapon. They need to have long nails, it's an environment thing. If you lived in a really tough neighborhood, you'd need some protection too. But you're not a leopard, are you? That's right, and weird nails won't make you one either. For a panther it's pretty important to have long nails. If it wants to pierce the skin of a fruit (or peal an orange), it doesn't have a Swiss army knife. But you have all kinds of tools in the kitchen you can use.

Color

This one's even worse. Some women advertise their nails 3 blocks away. It's almost like all you can see is the nails sometimes, because they're so at odds with everything else in the environment.

See, there is something called contrast, and color balance. They teach this in art school, but we can't all go to every single school, so it's useful to know the most basic things anyway. The basic idea is that if the contrast of two adjacent things is high, something is wrong (it's unpleasant to look at, it signals a conflict). Contrast is a principle present all the time, the contrast between your clothes and your skin, the skin and the hair, the skin and the shoes, the socks and the pants etc etc. In most cases people do an okay job of it. But somehow the idea is completely lost when it comes to nails, people have no good sense anymore. I mean you wouldn't paint your hands red, would you? That just seems stupid. Well, there you go.

Even a leopard has more sense than to paint its nails red, or fluorescent yellow, or purple, or what have you.

The idea is that the nails are actually part of your hands, so you want them to appear as such. Some light color that doesn't contrast too much with the skin is passable. As is blank polish. But what you're actually doing is painting over the surface of a piece of wood so it won't get damaged. But since your nails aren't wood, the whole procedure is completely obsolete to begin with. I guess you don't varnish your fingers for protection, do you?

The checklist

I guess that was a lot of information to take in, so here's a short checklist to remember.

  1. Are your nails longer than to comfortably play the piano? If yes, then they need trimming.
  2. Are you trying to flag down a jumbo jet? If yes, your nails need a good scrubbing to reveal oh yes, the nail.

If your answer to both is no, you're in the clear.