Skip to main content

Seeing Shouldn't Be Believing or the World According to Josh Bloch

Posted by hiheiss on March 13, 2006 at 3:18 PM PST

Please check out the interview

I had the pleasure to do
with Google Java architect,
Joshua Bloch, in which he
discusses his latest book,
"Java Puzzlers," written with
Neal Gafter. He models puzzlers
on optical illusions; you look
at a piece of Java code and
see one thing, but then on
closer inspection you realize
your mind has deceived you. The
idea is to trick the mind into
making a mistaken assumption
about code; you see your
mistake and will hopefully
never make it again. With optical
illusions, Bloch claims, understanding
how the illusion works does not change
the illusion. But if you understand
how a "code illusion" works,
you can stop making that mistake,
and spot it in future code that you review.

Bloch claims that most
of the puzzlers were derived
from real experiences of developers
and that the biggest problem for
developers is unwarranted optimism.

Speaking of unwarranted optimism,
it's fascinating that they fell into
their own trap in one of the solutions
to a puzzler that turned out to be broken;
they had to include an errata in their book
correcting it. Bloch argues that no one is immune.

Josh also makes some interesting comments about
language design decisions.

I totally enjoyed interviewing him.
Besides being super smart, he's an
all-around great guy.