“Anyone who takes this seriously deserves to.”

— Donna Barr

Things that are surely worse than coffee


I am not a coffee drinker. Growing up, I liked the smell, but the taste was always awful. I take my caffeine cold and sweet, and while there are ways to adulterate coffee to the point where I like it, they generally involve adding enough sugar and fat to turn it into a meal (I briefly acquired a taste for the Caramel Frappuccino, in the days when 60 grams of sugar didn’t earn a scolding from my doctor).

Still, I think I’d rather drink day-old truckstop paint-stripper coffee than dandelion, brown rice, or black soybean coffees, all available in Japan.

[dandelion root has apparently been used as a coffee substitute for a long time, but I guess I never knew anyone desperate enough to try it]

Old School


Now this is cosplay that separates the gamers from the noobs.

more...

iGrep


Just got a complaint from a user about a Perl script that wasn’t handling regular expressions correctly. Specifically, when he typed:

ourspecial-cat | grep 'foo\|bar'

he got a match on “foo” or “bar”, but when he typed:

ourspecial-grep 'foo\|bar'

he got nothing at all.

My surprise came from the fact that the normal grep worked, when everyone knows that you need to use egrep for that kind of search, and in any case, since the entire regular expression was in single-quotes, you don’t need the backslash. Removing the backslash made our tool do what he wanted, but broke grep.

Sure enough, if you leave out the backslash, you need to use egrep or grep -E, but if you put it in, you can use grep. What makes it really fun is that they’re the same program, GNU Grep 2.5.1, and running egrep should be precisely the same as running grep -E.

Makes me wonder what other little surprises are hidden away in the tools I use every day…

America versus Japan


If you go to Amazon Japan and search for “k-cup”, you will not find single-serving coffee makers and supplies.

If you go to Amazon US and search for “k-cup”, you will not find DVDs featuring extremely busty women.

If you go to Amazon Japan and search for “Kカップ”, you will find both, but you’ll have to scroll down a bit to see the coffee.

Clear Keep, XKCD


First thing that drove me crazy when I moved to Silicon Valley:

more...

Effective index use in MongoDB


Three basic rules to keep in mind when trying to index that massive crapload of data you just shoved into MongoDB:

  1. All indexes must fit in physical memory for decent performance.
  2. A query can only use one index.
  3. A single compound index on (x,y,z) can be used for queries on (x), (x,y), (x,z), or (x,y,z). However, prior to 1.6, all but the last field used from the index had to be an exact match, or you might get a full table scan instead.

more...

The thing which the chief does not have


Sign at Nijo Castle, by Flickr user cathou_cathare

This entertaining picture was recently posted to engrishfunny.com. As is often the case, the uploader pretended that he took the picture, conveniently failing to link to the Flickr user who posted it two years ago. (TinEye to the rescue!)

Please do not see it while drinking drink.
The PET bottle caps it and put it in a bag, and please carry it.
Please see the thing which the chief does not have after finishing drinking.
城内では、飲料水を飲みながら観覧することはできません。
ペットボトル等については、キャップをしてカバンなどに入れて持ち歩くか、キャップのできないものについては、飲み終えてからご観覧下さい。ご協力のほど、よろしくお願いいたします。

The first half of the translation is almost comprehensible, although it inexplicably leaves out the opening clause in the first line, “Inside the castle”. The third sentence is supposed to say “finish drinks that can’t be capped before viewing (the castle interior)”, but as any Ultraman fan knows, “kyappu” is not only phonetic for a bottle cap, but also for “captain”…

[Update: The Flickr user thanked me for adding a quick translation as a comment. English isn’t her native language, which made the Engrish particularly baffling.]

The Mahoromatic Fitness Plan


  1. Hire a live-in maid/cook/combat android.
  2. Hide porn in your bedroom.

more...

“Need a clue, take a clue,
 got a clue, leave a clue”