“He doesn’t know I exist, you know.”

"Obviously."

“Then why talk about me? He’ll only think you’re…”

"​...crazy. Cerebus knows that."

“But why would you…”

"Lord Julius always said that insanity was the last line of defence for the master bureaucrat."

“I don’t get it.”

"It's hard to get a refund when the salesman is sniffing at your crotch and baying at the moon."

“Oh… I get it now.”

"Insanity is a virtually impregnable gambit... but you have to lay the groundwork early in the game."

— Elf and Cerebus, predicting modern foreign policy

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...

Mahoro for less


You don’t see a lot of this in Japan: thinpack re-releases of anime series at a less-than-rapacious price. Usually you have to buy the N-year-old DVDs at their original insane price with little or no discount, unless you have a reshipping service to handle used-goods dealers who don’t ship internationally.

I guess that Mahoromatic is still a hot property, because both seasons are getting “limited edition” thin-packs, released a month apart for ¥5400 each (1, 2).

(ah, turns out there was an earlier box set for about twice this price, and a recent Blu-ray set for about three times this price)

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