Feb 28

The American Psychological Association (APA) set up a task force to “examine and summarize the best psychological theory, research, and clinical experience addressing the sexualization of girls via media and other cultural messages”.

The report has now been published.

However, I note that there were no men on the task force, and apparently no men were invited to comment (according to the document). It seems statistically unlikely to me that all the experts in the field of media effects on children are female. If a task force made up entirely of men produced a report on (say) the effect of violent media on teenage boys, and took no comments from women, I suspect that the report’s credibility would be questioned. Will this report get the same reaction?

Feb 28

Running OpenSuSE? Suddenly getting a message about MISSING KEYS: GPG#6b9d6523 from APT or Smart? It’s because the OpenSuSE maintainers have failed to include all the necessary keys in their repository.

Solution:

  1. Download GPG key 6b9d6523 manually, say via wget -o key.txt "http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6B9D6523"
  2. Use rpm --import key.txt

Posted here for the benefit of people Googling the problem. Share and enjoy.

Feb 28

At the weekend I decided to give in and get a USB keyboard. I went to Fry’s, hoping to find something suitable, but fearing that all they’d have would be Microsoft keyboards.

I know Microsoft’s hardware quality is better than their software quality, and their keyboards are definitely much better than the trash you typically get with a new PC. They are also to be commended for providing a reasonable ergonomic layout at an affordable price. However, I just don’t like the key mechanism; there’s too much resistance, and it feels cheap.

The keyboard isle at Fry’s had a pretty good selection, including exotic gaming keyboards, glowing l337 h4×0r keyboards, and the extremely overpriced Logitech diNovo Edge.

After some hands-on testing, I settled on a Kensington SlimType keyboard. It’s basically the same mechanism as an IBM ThinkPad laptop, but as an external keyboard. It also manages to provide a full keyboard, with number pad, in a lot less space than my IBM Model M. I was frankly gobstruck to note that it was only $30. I may end up getting the Mac version for the other half of my desk.

My Linux keyboard problems went away immediately with the new device. No more unexpected screenshots or X locking up. I even managed to get all the fancy extra keys working; I can type Euro characters with the Windows key, and accented letters with the menu key, thanks to KDE. Getting the multimedia keys working was a bit harder, and required a ~/.Xmodmap file:

keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute
keycode 162 = XF86AudioPlay
keycode 153 = XF86AudioNext
keycode 144 = XF86AudioPrev
keycode 223 = F14
keycode 161 = F13

These keycodes seem to be fairly standard for multimedia keyboards (they match what someone reports for a Dell keyboard), so they may be useful to other people. I made the moon key (161/F13) turn the laptop display on and off. The rightmost multimedia key is presumably supposed to be for firing up your MP3 player, as the icon looks like something rectangular with buttons. I decided to make it fire up Nonpareil, an HP calculator emulator, in HP-16C mode.

So far the new keyboard is working out well, apart from my hands having to get used to a new layout. So if you need a compact keyboard, the Kensington is recommended.

Feb 24

The excitement started a week or two ago when I discovered that my ThinkPad laptop’s internal cooling fan had stopped working. As soon as I did something graphically intense for more than a minute or two, the system would overheat and perform an emergency shutdown.

Fortunately, I have a backup laptop.

Unfortunately, the backup ThinkPad laptop had also developed a fault. The fluorescent backlight for the display was failing. The screen was a curious reddish-purple color, and very dim—unless I turned the brightness up, in which case the backlight stopped working entirely, and everything went black. It also tended to crap out when the machine got warm.

So, I called the IBM hardware support line. The next day, the DHL truck showed up and I was handed a shipping box. I followed the instructions and shipped the dying-LCD laptop, which I figured was the less usable of the two. I enclosed the appropriate paperwork and a short description of the problem. Then, I went back to writing Java.

One day later, the DHL truck turned up again. It was my laptop, repaired. New LCD, and they also upgraded the BIOS while they were working on it.

Next, I installed Kubuntu on the repaired machine. I switched to Ubuntu back in June 2006, and had gotten used to GNOME. Unfortunately, the GNOME developers had subsequently decided it was a good idea to include the Mono runtime as a required part of gnome-desktop, and Ubuntu had made it a required part of ubuntu-desktop.

For those who don’t know, Mono is controversial. It’s a Novell project, and Novell just signed a deal with Microsoft to get permission to use patented Microsoft technology in Novell’s Linux distribution (SuSE). Mono is a reimplementation of Microsoft’s .NET, and it’s widely believed that Microsoft hold many patents that cover .NET.

One theory is that Microsoft is encouraging people to become dependent on Mono now so that they can suddenly threaten patent infringement suits and cripple desktop Linux later on. That might sound a little paranoid, but remember that Microsoft already funded SCO during their lawsuit alleging intellectual property infringement in Linux, so plenty of people are suspicious.

Anyway, I want no part of anything to do with .NET, so I had been planning to switch back to KDE and use Kubuntu once the next major release came along. But, with a newly repaired machine and the prospect of upheaval anyway, I decided I might as well make the switch now.

The next piece of excitement was when I discovered that Kubuntu doesn’t support ReiserFS. Regardless of whether Hans Reiser turns out to be guilty of murdering his wife, ReiserFS is on the way out, as Reiser’s team had stopped improving it in favor of Reiser4; and unfortunately, Reiser4 hasn’t made it into the Linux kernel.

So, I had to reformat the entire drive. After some research I decided to go with JFS. (Hey, it’s IBM dog food.) I soon had Kubuntu up and running.

Next I had to move my data over. I tried the direct approach, connecting the two laptops via ethernet and transferring my files over that. After a few minutes the first laptop overheated and shut down. Uh-oh.

I had a fairly recent full backup, so I restored that on the Kubuntu system. I then left rsync running overnight, at nice 19, with a bandwidth limit imposed. This got everything up to date slowly enough to avoid overheating.

Installing Java, Eclipse, VMware and IBM’s VPN software was next. Unpleasant, but it was done soon enough. I logged in and swapped the laptops, putting the newly repaired one on the desk and plugging in the external keyboard and trackball via USB.

Which is when things got really ugly.

The symptoms were unsubtle: the arrow keys, Insert, Delete, Home, End, Page Up and Page Down would all open Ksnapshot every time I pushed one of them. Investigating further with xev revealed that those keys were generating a spurious “release key with keycode 111″ event after each pair of correct events. No “push key with keycode 111″ event was being generated, but that didn’t seem to matter.

I investigated various possible fixes involving xmodmap. I tried unloading the USB HID kernel modules and seeing if X could handle the USB keyboard as an explicit second keyboard. Nothing worked.

Then, as I was staring at the output of lsmod, I had a vague recollection about UHCI and OHCI and EHCI and USB devices and incompatibilities… On a whim, I tried unplugging the keyboard from the USB hub, and plugging it directly into the laptop. Suddenly everything worked.

So it seems there’s some lingering bug in Linux’s USB keyboard support, which is triggered by USB keyboard converters. My guess is that when the keyboard is plugged into the hub, the incoming USB signals are converted to USB 2.0 by the hub, whereas when the keyboard is plugged directly into the laptop everything is done using USB 1.x. Perhaps the buggy module is only used for USB 2.0.

Actually, there’s one last lingering problem… if I type Shift-Insert the system goes insane, launching dozens of Ksnapshot windows. So I think I need to get a genuine USB keyboard. In the mean time, I’m making a mental note not to type shift-insert, which I don’t usually do anyway as most programs recognize the more usual Ctrl-P for paste.

Feb 19

FireRescue1 News:

When fire crews arrived to the blaze, which started at about 9:30 p.m. at 925 Jefferson Ave., they saw homeowner Darrell Moss lighting a fire outside his home, according to a police report.

The 57-year-old was naked and had red Magic Marker writing all over his chest and legs, with one drawing depicting a heart with an arrow through it, the report stated.

Fire personnel tried to get Moss away from the house because ammunition was going off inside, but he wouldn’t cooperate and started fighting with police.

Authorities had to restrain Moss by strapping him to an ambulance backboard, the report said.

He was later taken to Eastern Idaho Regional Medical Center - where he was combative with medical staff - and treated for smoke inhalation.

He remains hospitalized and listed in fair condition.

Police continue to investigate the incident and haven’t charged Moss, who according to the report had been in the hospital recently to receive treatment for mental problems.

I’m no expert, and this is just a guess, but I’m thinking the treatment was unsuccessful.

Feb 13

I bought a Nokia N800. It’s an Internet tablet, about the size of a large PDA or a small thin paperback book; almost exactly the same size as a Nintendo DS Lite, in fact. It runs Linux. It connects via WiFi or Bluetooth.

I bought it because I spend a lot of time reading web pages, PDFs and other electronic documents. In particular, my “killer app” was to be able to read the electronic edition of The Guardian with my morning coffee—ideally, in bed.

Yes, there are laptops. However, if you’ve ever tried to casually read the newspaper in bed using a laptop, you’ll probably agree with me that a kilo or so of hardware gets tiring on the arms, and trackpads aren’t conveniently located for use when the computer is propped up.

The N800 is the first portable device I’ve used that has a decent web browser. It’s Opera, in fact. The Guardian’s web site works on it. So do Google Mail, Flickr, Slashdot, Google Maps, and Wikipedia. While the text starts off small in order to squeeze a whole web page on the screen, it’s crisp and readable, and buttons on the top of the device make it easy to zoom in and out. For web browsing it easily beats a Palm handheld, Sony Ericsson P9xx Smartphone, Windows Mobile device, or Blackberry. (I’ve tried ‘em all.)

Note that the N800 is’s not a phone. The assumption is that you already have a mobile phone with Bluetooth; if you want to use expensive mobile data plans, you just pair your phone with the N800. This is an assumption I agree with; in general I want my mobile phone to be small enough to fit in the pocket of a pair of jeans, which precludes giving it a screen big enough to browse the web on.

Here are some other high points:

  • XMPP/Jabber chat client.
  • Google talk for voice and video chat.
  • Streaming MP3 support.
  • It’s Linux. If Nokia lose interest, you won’t be totally stuck; the community can continue to fix bugs and improve the OS.
  • Want to run Nethack, SCUMMVM, or SSH into it and explore via the shell? You can.
  • Assuming you switch it off entirely, it still only takes 10 seconds to boot. Mostly, though, you’ll just let it sleep, in which case waking up is instant.
  • Flash works, mostly. It’s not the latest version, however. (Threadless seems to work, bleep.com doesn’t.)

And in the interest of balance, the low points:

  • The built in camera is terrible. It makes the camera in my cell phone look good. Forget about using it for anything except video chat.
  • PDA basics like address book and calendar are totally absent. I guess the assumption is that you use online services for such things. However, this does mean the device’s usefulness is totally crippled without an active network connection.
  • The Maemo platform is currently in the early stages of its life. This means that OS updates often break existing applications, and the selection of applications isn’t great to start with.
  • The handwriting recognition is horrible, at least compared to Palm OS or the Apple Newton.
  • No Java. WTF? Even my mobile phone has Java. Maybe this will change once Sun finishes making Java available under the GPL.

So the executive summary is: if you want something you can keep in your satchel and use to browse the web at the café, this is currently your best bet. If you like the idea of the iPhone but don’t fancy paying about $2k and being locked out of running your choice of applications, the N800 plus a tiny GSM phone in your pocket is a good alternative, and has more than double the pixels.

(And yes, LiveJournal works on it. If you must.)

Feb 12

A common design pattern is to encapsulate application preferences in a singleton class. The class handles persistence, and any other class which wants to access the preferences can just declare the singleton and access away.

This makes me uneasy. It’s a bit too much like we’ve just thought of a polite new euphemism for global variables. So, my question:

Has anyone encountered a real-world scenario where it was necessary or desirable to have multiple application-preference-encapsulating objects instantiated at the same time?

(This is also my early entry for “nerdiest joke-in-the-title of 2007″.)

Feb 09

I find to my surprise that I’ve not posted here before about EBD. So, here goes…

Over the years I’ve noticed that people who are exposed to Emacs for an extended period of time become unable to use other software. I don’t just mean that they refuse to use other text editors; I mean that they cannot tolerate any non-Emacs interface for any task.

They read news in Emacs. They read their e-mail in Emacs. They can’t use a simple pager to page through their manual pages; they use Emacs, and insist on rewriting man pages as info documents. They use Emacs to assemble and play MP3 playlists. They can’t even use a web browser; they read the web using Emacs w3-mode.

Try to get them to use another piece of software, any piece of software, and you’ll be treated to a lecture on how it isn’t like Emacs, and Emacs is much better.

I call this curious affliction Emacs Brain Damage. It’s a stiffening of the brain cells, an inflexibility of thought caused by excessive Emacs use.

Users of other text editors don’t seem to have the same problem. You don’t see vi users complaining that they can’t possibly read e-mail using mutt or pine. You don’t get BBEdit users refusing to touch iTunes. Eclipse developers don’t use it to read Slashdot.

EBD sufferers will often try to explain away their condition by claiming that the Emacs interface is simply the optimum way to interact with a computer, for all possible tasks. It’s not that they can’t use other software because they are inflexible; it’s because Emacs is simply a better interface than all other software.

I emphatically reject this rationalization for a very simple reason: when I first started using Unix, I used Emacs. I only switched to vi years later.

It’s also worth noting that the RSI sufferers I’ve encountered have almost all been heavy Emacs users. Famous Emacs hackers like jwz and RMS have suffered from RSI. Some Emacs users have written extensive notes on the technology they’ve had to use to enable them to continue to use Emacs. I think that demolishes the “Emacs is simply superior” argument quite nicely.

Feb 09

Found on freshmeat.net:

Snd is a sound editor modelled loosely after Emacs.

Fantastic. I can see it now:

             ################                       ################                   ###########################             ###########################           ###############################         ###############################            #########################               #########################                     ##############                         ##############                                #######                                ####                             ####################                       #############                              ########                               ########                           ####################                   ####################                #############################           #############################           ##############################         ##############################               ######################                 ######################                         ##########                             ##########                                   ########                            #####                               ##########                                    ####                                 ############                           ############                       ########################               ########################             ###############################         ###############################           ############################           ############################                  ##################                     ##################                            #######                                 #######                               ###########                           ################                             #####                                   #####                              ################                       ################              --|--  sound.wav          (Wave)--L39012--04%---------------------------------   
Feb 08

I’ll keep this brief, as you’re a busy man.

You recently wrote that you would drop DRM from the iTunes music store “in a heartbeat” if you could.

Well, as you’ll see if you check the iTunes purchase logs, I bought quite a few tunes from the iTunes music store. You’ll notice that I stopped as soon as you fixed the flaw that allowed Hymn to remove the DRM. Since then I’ve bought music from places like bleep.com that sell DRM-free music. I still use the iTunes music store, but only as an easy way to preview tracks that I then buy elsewhere.

Clearly, there are plenty of music labels (such as most indie labels) that are willing to license their music DRM-free. Clearly there are people like me who won’t buy music if it has DRM they can’t remove. So, here’s a proposal:

Allow record companies and artists who elect to do so, to sell their music DRM-free on the iTunes music store. Indicate the DRM status with a small icon in the download views in iTunes, like you indicate explicit lyrics. I’ve put together a quick mock-up. As you can see, the padlock icon is very discreet and unobjectionable. I don’t think it would cause user confusion; the people who don’t care about DRM will probably never notice it.

Once you’ve offered DRM-free music on the iTunes store, you just sit back and watch. If I’m right, the non-DRM music sales will surge. Then you’ll have some real ammo with which to approach the major labels. Because frankly, they don’t listen to consumers like me. I know, because this year I wrote to EMI listing a bunch of CDs I didn’t buy because they had DRM warnings on the packaging. I didn’t even get a reply.

Yours sincerely,

mathew