Skip navigation

Category Archives: Educational


Announcing ZhongWiki

Last week saw the launch of the first version of ZhongWiki. A wiki for people learning Mandarin Chinese. It’s still in it’s infancy, but I have a feeling it might become a great site and possibly a vibrant community.
A wiki is a site that can be edited and expanded by basically anyone. The best known […]

Scratching my Flickr itch with Nitro

I have somewhat neglected my English speaking audience, I must apologise. I’ve recently moved to Taiwan to study Mandarin, and my travellers journal will mostly be published on the Dutch side of this blog.

Before I left to Taiwan my grandmother gave me a beautiful little camera, and I’ve been taking pictures like a madman and […]

Equality in Ruby

Just so you know:

== a.k.a. value equality
eql? a.k.a. value and type equality
equal? a.k.a. object identity
=== a.k.a. case equality

Object identity should never be overridden. It compares object ids, always.

When overriding, start with value equality. If you’re not doing type conversions then you can simply add “alias :eql? :==”. I was surprised to […]

Boyer-Moore string search algorithm in ruby

Update: I cleaned the code up a bit and added more comments.
I was looking for a fast algorithms to search for matching strings. Boyer-Moore seems to be a good choice. It has the peculiar property that it gets faster once you’re looking for longer strings. Wikipedia: Boyer–Moore string search algorithm. This site also has a […]