Non-intuitive UIs

May 30, 2011

Have a look at this page:

OMG, it includes the word “participle”, WHAT DOES IT MEAN?!?

Well, what you have no way of knowing is that you can double-click this or any other word and go to the entry for that word. Not a bad feature at all, but not very obvious either :-)

RAID trouble

August 20, 2010

I had heard about software RAID and hardware RAID, but I had not heard about fakeRAID. And how typical it is that I learn about this on the Ubuntu wiki after an evening spent on:

1) Squeezing myself into the tight space under our staircase to install a cheap SATA/RAID controller in my server

2) Setting up keyboard and monitor to get into the BIOS of that controller

3) Creating a RAID0 set and discovering that this did not “just work” under Ubuntu. Ubuntu still sees two distinct drives…WTF?

4) Lots of Googling and reading through forum threads

5) Getting uncomfortable again to uninstall the cheap controller card that I now hate!

It turns out that some controller chip vendors, Silicon Image included, produce some inexpensive “RAID” controllers that are really just SATA controllers with a BIOS on them to assist in setting up the RAID arrays. I’ll admit that I don’t understand (or care about) the details of this, but these controllers seem to offer better performance than pure software RAID, plus they allow most OSs to boot from the RAID array.

However, not being a real HW RAID means some OS interaction is required. The array is not presented to the OS as a single, large drive. So the advantages of fakeRAID are uninteresting to me, because what I wanted was easier setup.

So I have decided to go with an ordinary Linux SW RAID, which by all accounts is very reliable and relatively easy to set up. If I run into any interesting “learning opportunities”, I’ll blog about it.

By the way, the controller in question here is a DeLock branded 4-port SATA controller. The chipset on it is a SiI3114. Here it is on the website of my local parts shop.


January 13, 2010

I don’t usually care much about Internet memes, but this one is pretty funny.

Via Mentalized.

It was started by Tim van Damme:

A simple game: Go to the address bar in your favorite browser, and
type one letter. Start with “a”, end with “z”.

Here goes:

I really, really like the Chrome/Chromium browser, and I’ve become more or less addicted to it. The ability to search directly from the address bar (or whatever it’s called) is a small but extremely useful feature. Also, in my experience it is both faster and less resource hungry than the alternatives, Safari and Firefox.

On Linux and Windows, I use it all the time without problems. But on OSX, one issue has just been too annoying to allow me to use Chrome exclusively: The spellchecker can’t be disabled. The issue it tracked here and here, they just haven’t gotten around to fixing it yet. And since I write a lot of email in Danish, all the red underlining it very distracting (I know that it can be disabled for one text field at a time, but that’s not very cool either).

So I decided to roll a custom build. As you would expect, disabling the spellchecker (permanently) is trivial:

Index: chrome/browser/
--- chrome/browser/	(revision 35439)
+++ chrome/browser/	(working copy)
@@ -145,24 +145,25 @@
 static int last_seen_tag_;
 bool CheckSpelling(const string16& word_to_check, int tag) {
-  last_seen_tag_ = tag;
+//   last_seen_tag_ = tag;
-  // [[NSSpellChecker sharedSpellChecker] checkSpellingOfString] returns an
-  // NSRange that we can look at to determine if a word is misspelled.
-  NSRange spell_range = {0,0};
+//   // [[NSSpellChecker sharedSpellChecker] checkSpellingOfString] returns an
+//   // NSRange that we can look at to determine if a word is misspelled.
+//   NSRange spell_range = {0,0};
-  // Convert the word to an NSString.
-  NSString* NS_word_to_check = base::SysUTF16ToNSString(word_to_check);
-  // Check the spelling, starting at the beginning of the word.
-  spell_range = [[NSSpellChecker sharedSpellChecker]
-                  checkSpellingOfString:NS_word_to_check startingAt:0
-                  language:nil wrap:NO inSpellDocumentWithTag:tag
-                  wordCount:NULL];
+//   // Convert the word to an NSString.
+//   NSString* NS_word_to_check = base::SysUTF16ToNSString(word_to_check);
+//   // Check the spelling, starting at the beginning of the word.
+//   spell_range = [[NSSpellChecker sharedSpellChecker]
+//                   checkSpellingOfString:NS_word_to_check startingAt:0
+//                   language:nil wrap:NO inSpellDocumentWithTag:tag
+//                   wordCount:NULL];
   // If the length of the misspelled word == 0,
   // then there is no misspelled word.
-  bool word_correct = (spell_range.length == 0);
-  return word_correct;
+//   bool word_correct = (spell_range.length == 0);
+  // return word_correct;
+  return true;
 void FillSuggestionList(const string16& wrong_word,

The diff is a bit messy, but I just commented out the entire body of the CheckSpelling method and replaced it with “return true”. As in “Sure, that word is correct” :-)

If you want it, you can download it from here.

Of course, this means that I now use Chromium instead of Google Chrome, but so far I haven’t noticed any adverse effects from making that switch.


November 25, 2009

This blog may look like it is dying, but that is in fact not the case.

What you’re looking at is the technical, english-language content from my personal weblog, on which these entries will soon be removed, of course. I recently realized that mixing personal and techical stuff on one blog is probably not a good idea. Neither is mixing languages (danish and english).

Thankfully, the solution is pretty easy with WordPress’ export/import feature: Split the blog into two. This is the technical half of that split.

So on this blog I will write about all kinds of technical stuff, mostly programming- or Emacs-related. I’ll probably spend some words on tips and tricks for the efficient use of Emacs. Emacs has been one of the great revalations for me, and it pains me to think about how many years I made do with all kinds of inferior text editors. However, I’ll try not to write annoying things like that on the blog. :-)

I won’t limit the scope to Emacs, though. Basically, I’ll write about anything where I feel that I may be able to help others. Also, I’ll often use the blog as a notepad for configuration snippets, gotchas etc. that I tend to forget. Chances are that others forget them as well. The post about changing text encoding in Emacs is a perfect example of this.

This post is really just a marker, because there’s already some content on the blog. I just wanted to explain the change of address, the huge temporal gaps (clearly I have some catching up to do) as well as stating my intentions for the future of the blog. I’m really looking forward to putting a lot more stuff up here. On my personal wiki, I have a long list of topics to write about, so it’s time to get cracking.

Comments are always very welcome!

New Clojure entry on dcug blog

September 10, 2009

For those interested in Clojure programming (and yes Thomas, I know that’s not you :)), I have posted an entry on the blog of the Danish Clojure Users Group:


Discovering Project Euler

December 14, 2008

A colleague of mine recently introduced me to Project Euler, and I am slowly becoming hooked.

Project Euler is a collection of mathematical challenges that usually require some programming to be solved. Some are relatively simple (eg. “Find the 10001st prime”) while others are complex (“Using up to one million tiles how many different “hollow” square laminae can be formed?”).

Since I did not study mathematics, most of these problems seem intimidating to me at first. However, a lot of them can be solved with programming skills, simply by doing a more or less brute force search for the answer.

Solving the problems in order, they become progressively harder. But the beauty of it is that a problem often builds on the skills acquired while working on a previous problem.

So if you’re a programmer and you like puzzles involving maths, I highly recommend that you check it out. You can use any programming language you like, only the answer matters, always expressed as some big number.

I had been blogging on for a while, but the last few months, I have been increasingly annoyed with the service. Little things, mostly, like the way the editor works and how the Preview mode is very far from the appearance of the published entry.

However, the main reason for the switch was the fact that I simply could not get Emacs support working. g-client took me some of the way, but it wasn’t nearly good enough in its current state.

Just one example: To create a new blog entry, I needed to specify a “post URL”. And to obtain that, I needed to invoke some method (forgot the name) which created a temporary webpage on my harddisk and launched Safari to show it to me! On that webpage, I could then see an overview of the blogs I had on Blogger (a list with 1 element), copy the link to the “post URL” of the blog and paste it back into Emacs.

Also, to save my new entry as a draft, I had to modify the template used for new entries to include some XML snippet that I had to look up in the Google API. And after saving or publishing an entry, the buffer was completely garbled for some reason.

OK, that was a few more examples ;-)

I’m not sure if it was just me who completely misunderstood how to use this library, but it seemed extremely rough around the edges.

As I have described in another entry, blogging from Emacs works beautifully with WordPress. And Emacs is where I want to spend my time, also when blogging. I like it here, it’s comfy.

Actually, I was planning on doing a thorough comparison between Blogger and WordPress, but I have realized that this would be pointless, because hundreds of others have done just that. So just google for it if you’re considering which to choose.

If you’re a cat owner, you know that cats love to drink from the faucet!
Being a cat owner myself, I was pretty excited to learn about this Cat Faucet project by Sixerdoodle Electronics. I have often thought about building something similar myself, but I had never gotten around to it.

However, even though the design of the Sixerdoodle Cat Faucet is very elegant, I find it more complicated than necessary (mainly because they wanted to keep it low voltage, it turns out).

So I started wondering how to build the simplest possible cat faucet. This is what I came up with:

(Open above image, with notes, in a new window)

(Diva enjoying the running water)

The complete list of components:

  • a solenoid from an old dishwasher
  • a movement sensor (the kind usually used to light up a driveway)
  • a few bits of plumbing
  • a piece of gaffer tape to limit the area monitored by the sensor

(Solenoid from an old dishwasher)

(The movement sensor, pointed straight down)

That’s it. The flow of water is controlled simply by adjusting the position of the red valve that lets water into the system. The sensitivity and timeout of the sensor can be controlled with small knobs on the underside.

My wife put a little bowl underneath the faucet to allow the cats to drink from a surface of water as well as from the running water. Excess water simply spills down the drain below.

Contrary to the Sixerdoodle design, my cat faucet is not low voltage (it runs on 230V, our mains voltage in Denmark). However, because both components were designed to be safe and withstand pretty rough conditions, this does not worry me at all.

(The finished setup, tucked away under a small shelving unit)

(Obviously, it takes a little practice!)


February 9, 2008

Hello, and welcome.

This blog will be mostly about Emacs. For now, anyway. I have a feeling that, along the way, I will probably start blogging about other subjects as well. But for now, I’m writing about Emacs.

Note that my blog will not be for the Emacs newbie. Although I certaintly recommend investing the time needed to learn the basics of this wonderful editor, there are already a lot of great resources out there to get you started. For an excellent starting point, check out the Emacs wiki.

I hope that others will be able to make use of my experiences on my way to becoming an expert Emacs user. Feel free to comment away!


Get every new post delivered to your Inbox.