“Das Land ist schon wahnsinnig”


Elmar Wepper in einem Spiegel Online Interview über Dreharbeiten in Japan zum Film “Kirschblüten”:

Da fällt mir zum Beispiel ein Besuch in einer Nudelküche ein. Dort trifft man nur Japaner an und man sitzt dichtgedrängt, Schulter an Schulter. Dein Nachbar rechts von dir liest Mangas und hört gleichzeitig Musik mit seinem MP3-Player, und der links vor dir telefoniert ununterbrochen, während er seine Suppe schlürft. Das Land ist schon wahnsinnig.


Richard Dawkins and Christian Singles


I made a typo while trying to reach the home page of Richard Dawkins and landed on this amusing typosquatting page:

Screen shot of a web site typosquatting on richarddawkins.net

Good Bye Friends…



Seen at a supermarket in Osaki, Tokyo.

Key Moments in Japanese History


Key Moments in Japanese History: The invention of the anpan bean-jam bun

From the JAL in-flight entertainment guide.

Tian Tan Buddha


Tian Tan Buddha

Tian Tan Buddha near Po Lin Monastery, Lantau Island, Hong Kong.



I just came accross this quote on Google’s help page about “search engine optimization” (SEO):

Amazingly, we get these spam emails too:

“Dear google.com,

I visited your website and noticed that you are not listed in most of the major search engines and directories…”

STL Sudoku


Out of the (C++) loop: Great rant about using C++ STL iterators and algorithms instead of simple loops. My favorite quote:

If the C++ overlords believe that the construction of nearly every loop should be a sort of inline Sudoku puzzle, surely the problem must be that we are simply too stupid to use the language?



Tokyo Metropolitan Government Buildings

Tokyo Metropolitan Government buildings in Shinjuku.

Tokyo Damage Report is Back!


Self-proclaimed “American jerk” Schultz writes that he is back in Japan and that he will resume his excellent Tokyo Damage Report. Okaerinasai!

Inspirational Trash Bins


Inspirational Trash Bins

Seen at an interior design shop in Marunouchi.

Select our Swordfish


Cool people with / The sence of /Mismatch who can / Enjoy mixed taste / And stylish joke / We wish these people / To select our/ SWORDFISH

Cool people with
The sence of
Mismatch who can
Enjoy mixed taste
And stylish joke
We wish these people
To select our

Billboard seen in Shibuya.

Mt Fuji


Mt Fuji

Why Do My Feet Hurt?


Why do my feet hurt?

Seen in Akihabara.

Erann Gat’s Benchmark in Ruby: 11 Lines

codes = (words = File.new("words").read).downcase.gsub(/[^a-z\n]/, '');
%w{e jnq rwx dsy ft am civ bku lop ghz}.each_with_index { |g, i| codes.gsub!(/[#{g}]/, i.to_s) }
$dict = Hash.new { |hash, key| hash[key] = [] }
words.zip(codes) { |word, code| $dict[code.chomp] << " #{word.chomp}" }
def split(s) (1..s.length).each { |length| yield s[0...length], s[length..-1] } end
def match(number, out, digit = true)
  return puts(out) if number == ""
  split(number) { |pre, post| digit &= $dict[pre].each { |word| match(post, out+word) }.empty? }
  match(number[1..-1], "#{out} #{number[0..0]}", false) if digit
File.new("numbers").each { |number| match(number.gsub(/[^0-9]/, ''), "#{number.chomp}:") }

See here and here for the background.

11 lines of code, 1.5 hours to get a correct solution, 2 more hours to get an efficient solution, 1 more hour to minimize the number of lines.

It takes 16 seconds to crunch the sample data on a 1.67 GHz PowerPC G4.


This version drops all pretense of readability and aims for fewest lines of code (5 lines):

c=(w=IO.read("words")).upcase.delete("^A-Z\n");30.times{|i|c.gsub! "E--JNQR\
|w,c|D[c.chop]<<w.chop};def m(n,o,d=true)puts o if n=="";n.size.times{|l|d&=
D[n[0..l]].each{|w|m(n[l+1..-1],o+" "+w)}==[]};m(n[1..-1],o+" "+n[0,1],nil
)if d&&n!=""end;IO.read("numbers").each{|n|m(n.delete("^0-9"),n.chop+":")}

Can you come up with a shorter version?

Very Brief Review of “Memoirs of a Geisha” Movie