When I read the introduction to the chapter on Brad Fitzpatrick, I was slightly worried. He's the guy who invented LiveJournal, which has been ridiculed (for good reason) ever since I've been using the internet. I knew some people in college who had LiveJournal accounts, and they were the kind of people who were always whining about something trivial in their life ("my girlfriend broke up with me/died/admitted her bulimia problem/is too fat/is too skinny/cut herself/beat me up/hates me/hates her mom/doesn't have a mom/etc."). It wasn't pleasant. It was like the MySpace for people who had no friends.

Anyway, it turns out Brad Fitzpatrick (let's call him fitzy) is kind of a programming prodigy. He got his start reading computer manuals when he was five, and started programming in BASIC when he was six. He recounted one anecdote wherein instead of doing his long division homework in elementary school, he wrote a computer program that worked it all out for him, including the intermediary steps, which he printed out, and then copied it in pencil to his homework sheet. That's a high level of nerdity at a very young age. That's like, a Jason Fox-level nerdity usually reserved for fictional situations involving an iguana and some kind of sibling blackmail.

fitzy is young, born in 1980, which means he doesn't know Lisp. Which means he's awesome. His primary hackery is done in Perl and C, but now that he works for Google, it's Python, Java and C++, which Google apparently regards as the holy trinity of programming languages. He's also the author of memcached, which is a huge surprise to me. If you had asked me who wrote memcached and who wrote LiveJournal, I would have said "a genius and an idiot". Rarely do those two coincide.

Peter Seibel is revealing himself as less of the stereotypical brown-nosing, sycophant-ish interviewer as he calls fitzy out on some contradictions. fitzy is whining about the inflexibility of Java programmers (don't even get me started about them) and their refusal to use the JNI for interoperability, and then later talks about how Google's inflexibility with multi-language support is actually good.

The problem with that is that you end up writing everything twice, once for C++ and Python and all the other languages, and then once for Java. So if they could come up with a good embedding story or get over this fear of JNI, then I wouldn't mind it.

Later, when fitzy is singing the praises of the Google App Engine, Seibel calls him out.

[fitzy]: The fact that App Engine gives you one button, "Put this on the Web," and you write in one language, arguably a pretty easy-to-learn one, Python, is perfect. It's a great into to programming - there are so many layers and layers of bullshit that it gets rid of.

[Seibel]: How does that fit with your dismay at the Java guys who tell you "Oh, Java takes care of that for you." Isn't that the same? "Well, App Engine will take care of that for you."

[fitzy]: I don't know. Maybe it's because I know what's going on.


There's also some good insight into the software development lifecycle at Google, including coding guidelines, standards, release schedules and ownership. Apparently it's pretty wide open: the entire codebase is totally open to everyone, and anyone can submit patches or commit as long as they get it code reviewed and get the approval of the directory owner. That openness is probably why Google has been so successful.

I'm sincerely hoping one of the interviews in this book will reveal someone who's not a bigot toward other languages other than the ones they are experts in. fitzy did not deliver on that.

One interesting thing about fitzy is that he uses the same question in every interview: implement arbitrary precision multiplication. Apparently that was a question on his AP CS test in high school. Let's see what I can do:

function multiply($string1, $string2) {
	$len1 = strlen($string1);
	$len2 = strlen($string2);
	$result = array_fill(0, $len1 + $len2, 0);
	for ($i = $len1 - 1; $i >= 0; $i--) {
		$val1 = intval($string1[$i]);
		for ($j = $len2 - 1; $j >= 0; $j--) {
			$val2 = intval($string2[$j]);
			$value = $val1 * $val2;
			$index = ($len1 + $len2 - 1) - ($len1 - $i - 1) - ($len2 - $j - 1);
			addWithCarry($result, $index, $value);
	return ltrim(implode('', $result), '0');

function addWithCarry(array &$result, $index, $value) {
	if ($result[$index] + $value >= 10) {
		$temp = $result[$index] + $value;
		$result[$index] = $temp % 10;
		addWithCarry($result, $index - 1, floor($temp / 10));
	} else {
		$result[$index] += $value;