Non-intuitive UIs

May 30, 2011

Have a look at this page:

http://www.thefreedictionary.com/brought

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.

URL ABC

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/spellchecker_mac.mm
===================================================================
--- chrome/browser/spellchecker_mac.mm	(revision 35439)
+++ chrome/browser/spellchecker_mac.mm	(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.

fork()

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:

http://clojure.higher-order.net/2009/09/moving-beyond-the-trivial-programs/

/Jacob

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.

Follow

Get every new post delivered to your Inbox.