31 December 2010

2010 in Review

In 2010 I started cycling in earnest. Last December, when I got a bike fitting consultation, Piaw suggested that I advise Terry Shaw that I just wanted to be able to ride from the south bay to the coast and back in a day (depending on how you do it, this is about 70 miles and 7,000 feet of climb— but under any scenario, far, far longer than any ride I had done up to that time). To which my reaction was, Ha ha, very funny, but OK, that's what I'll say. By April— four months later— I had done exactly that. In June I finished the Sequoia Century and set off for a cycle tour of the Alps, which was the most incredible trip I've gone on in years. Now, I've logged about 2,700 miles and 150,000' of climb for the year, up from last year by at least a factor of 10, I estimate. Between that and changing my diet a bit I feel substantially healthier. (It's hard to know which is primarily responsible, as I did not conduct a controlled experiment. Shame on me.)

In just a few months of not even particularly regimented training, I worked up from having never really demonstrated any respectable amount of physical endurance in my entire life, to doing a number of things that were previously, for me, in Ha ha, very funny territory. Now, it's not like I have any unusual amount of willpower. It wasn't a New Year's resolution that got me off my butt, but rather me deciding that I wanted to go back and see Rosenlaui again. And I don't think I would have gotten there if I didn't also happen to think cycling was so damned exhilirating, or if I didn't have a bunch of friends who kept going with me on all these rides.

I guess the lesson is that if you are choosing your New Year's resolutions now, or trying to make any sort of change in your life, you have to plan for the fact that you will need more than sheer willpower to succeed.

I slogged through some parts of 2010, but I also got to do a lot of fun and awesome things this year. Happy New Year, and best wishes to all for a wonderful 2011.

2010 Book List

I didn't set aside a lot of time to read this year, unfortunately. Here's what I did read:

I think my favorites were Buddha's Brain, The Man Who Mistook His Wife For A Hat, and Stories Of Your Life And Others.

Recent favorite things

Some recent things I have enjoyed but am not going to write full reviews of:


Buckyballs are really fun to play with. You wouldn't think that grown men and women could entertain themselves for hours at a time playing with these magnets, but then again, I didn't think so either. I think of it as intelligent play-doh. Woot occasionally has them on sale at a discount of about 50%.

Rock Band 3. Perhaps the only video game I've enjoyed playing this whole year. No major changes to gameplay, but they have really polished up the game dynamics, and the setlist contains a much greater variety of styles. I don't care much for the guitar, but playing the drums and exercising your coordination is just so satisfying in a strange physical way.


I usually am satisfied with plain black tea but Canadian Ice Wine Tea is an interesting variation. Smells like wine, tastes like black tea. It's very fragrant but still subtle compared to most fruity teas (which I am not fond of).

I ordered some Ka-Pow! Coffee Bars from Sahagún. It's like a chocolate bar, but made with coffee beans instead of cocoa beans. I don't even drink coffee, but the taste and texture of these things is incredibly bold, and hauntingly good.


I've been cooking, mostly out of the following cookbooks:

  • The America's Test Kitchen Family Cookbook has recipes for pretty much all the staples of classic American cuisine. Also contains a lot of practical advice and tips (some of them apparently very nonstandard) for avoiding all the common pitfalls for each dish.
  • The New Moosewood Cookbook is the new edition of Mollie Katzen's classic vegetarian cookbook. The whole thing is hand-lettered(!) and whimsically illustrated. This is not a comprehensive reference like ATKFC or JoC, but it fills some of the gaps in the coverage of the ATKFC, particularly with respect to vegetarian dishes and more ethnic foods.
  • The Joy of Cooking is the very extensive classic. I refer to it when I want to make something specific that's not in another book, but its extensive use of indirection ("First, make Hollandaise Sauce as directed on page 355. Then, prepare the toast as directed on page 1180...") makes it a pain to follow.

I'm not much of a hardware geek, or a culinary geek, for that matter, but the author of Cooking for Geeks (review) did talk me into buying a laser thermometer, which is super useful once you have a grasp of the whole how to use temperature thing. Hardware-wise it's an interesting device too. It looks at the blackbody radiation being emitted by an object, so it can give you the surface temperature of an object from a distance and pretty much instantly. Indispensable especially in sautéing and roasting chops and steaks, but also has less exciting uses, like telling you whether soup is too hot to drink.

Buddha's Brain

I apologize for the raft of posts coming up. I wanted to flush all my buffers before the new year.

Buddha's Brain: the practical neuroscience of happiness, love, and wisdom, by Rick Hanson and Richard Mendius, is about contemplative practices like Tibetan Buddhism, and what scientists have in recent years discovered about how they work at a neurological level. (From fMRI studies it is pretty clear now that people who are good at meditating are doing something very different with their brains from what the rest of us do.)

Putting on my engineer hat, I would paraphrase the major assertions of this book as follows. Evolution has optimized our brains not for happiness, but for long-term survival. At first glance this is kind of a downer— what hope could there be for sustained happiness, if it's not an end, but a means toward an end? But just because a system is designed or optimized to do one thing does not mean that it cannot be hacked to do another, if you understand its principles of operation. Buddhism encompasses a huge variety of practices, beliefs, and traditions, but among them, it gives you what I would call tools to hack your own brain: to alleviate suffering, to become more mindful, or in general to activate more wholesome and productive states of the brain. Which is much (much) easier said than done, but this book gets you started on that road and discusses the neurological basis for those techniques as we understand them today.

Here's one example. For very good evolutionary reason, our brains are risk averse: we naturally focus on, and give more weight to, the bad rather than the good. Moreover, it's now understood that neuronal associations become stronger the more they are activated. This induces a feedback phenomenon ("positive" feedback, ha ha) that can be quite dangerous, because of the negativity bias. It can manifest as, for example, the feeling of being consumed by anger, or of debilitating anxiety. And that feedback phenomenon is why it's so important to actively interrupt negative trains of thought (and, when possible, to actively bring to mind any positive aspects that are available) rather than indulging in them. Doing so not only alleviates suffering in the present, but also actually rewires your brain to reduce your future predisposition towards those kinds of unproductive thoughts. If you follow Buddhist teachings you will recognize this is as the Right Effort of the Eightfold Path: cultivating wholesome thoughts while weeding out the harmful ones.

In this and a variety of other contexts the authors help you to understand some of the brain's evolutionarily adaptive but potentially unproductive tendencies. (I found the discussion of the brain's capacity for simulation, and why it can lead to suffering, to be particularly interesting.) In some cases a mere awareness of the phenomenon goes a long way in being able to counteract it, so the payoff is near immediate. In other cases it takes a substantial amount of time and effort to stop old habits and access more desirable states of brain/mind. The assertion is that as with other skill, you too can practice in order to learn to be more loving, kind, level-headed, mindful, and happy.

The book is written in a casual and accessible style, and is a moderately easy read. A number of guided meditations and exercises are provided. The authors do discuss a fair amount of neuroscience/biochemistry, only some of which is directly relevant to a practical understanding or to the techniques. Many of those parts can be safely skimmed (though some are very interesting), so you can treat this book as a purely practical guide if you like.

The premise that we have subtantial power to effect physical changes in our own brains, to become happier and healthier people— and using nothing more than our own minds— is extremely interesting. It's not about putting a happy face on everything but it is about helping yourself to take control of your mind.

Highly recommended.

27 December 2010

The Perry Bible Fellowship Almanack

The Perry Bible Fellowship Almanack is an anthology of The Perry Bible Fellowship, which is one of the most imaginative webcomics I've ever seen.

This book is a treasure.

It isn't for everyone— the author has a twisted sense of humor, and there is a lot of sexual and morbid humor. But the comics are just incredibly rich in their stories, and demand repeated readings. The author loves to take a cliché and turn it on its head. The artwork is also very impressive for a webcomic; it comes in a variety of styles, from very minimal figures to rich watercolors, and even spot-on parodies of other comics and other visual media. All in all the book is a lot of fun to flip through. It will probably stay on my coffee table for a long time.

Many (indeed, most) of the comics still appear on the web, so you can read them to get a taste for what the book is like. Some of my personal favorites: "Guntron Alliance Force", "Mrs. Hammer", "Refridgeron and Magnimus".

22 December 2010

Tron: Legacy

Tron: Legacy was an entertaining and enjoyable movie (one of the most visually and aurally stimulating movies since Speed Racer, which I mean as a compliment, honestly), but mostly I think it worth mentioning because I believe the filmmakers should win some sort of award for Not Totally Outrageous Use Of Unix In A Hollywood Movie.

Whoever is responsible, I salute you.

Cooking for Geeks

As I've been cooking more recently and learning about the mechanics of cooking (that is, how to decipher cookbooks and follow instructions), I've found myself wanting something of a primer on the theory of cooking. And I think Jeff Potter's Cooking for Geeks is more or less what I've been looking for.

What I mean by theory of cooking is that I'd like to have better mental models about, among other things, what makes dishes taste good; when to use different kinds of heat, and in what amounts; and how to choose complementary ingredients so I can make reasonable dishes without following recipes. What it is, in a general sense, that makes dishes turn out the way they do.

Cooking for Geeks covers a lot of ground. I think the most valuable material for me was learning how to use different kinds of heat (e.g. boiling vs. pan-frying vs. baking) to obtain various tastes and textures. To a large degree, controlling taste and texture is a matter of controlling which chemical reactions occur in the food. The major way you can influence those is by changing the temperature; you just need to understand the temperature ranges of different cooking media and the temperature ranges at which certain desirable chemical reactions happen in your food, e.g. the Maillard reaction.

There are also sections in the book on choosing tastes and ingredients, baking, chemistry, and kitchen hardware hacking. The author has a lot of specific tips but also helps you to understand the physical, biochemical, agricultural, or physiological principles that are your basis for making various choices in the kitchen. In addition, there are recipes, trivia, interviews, and reference material sprinkled throughout the book.

Cooking for Geeks is a useful book to have around when you plan meals. Recommended, provided you can handle analogies between cooking and programming.

18 December 2010

People who are not in our league V

Yusuke Endoh wrote a blog post that shows a quine of cycle length 8 he wrote in Ruby. Here is the code:

v=0000;eval$s=%q~d=%!^Lcf<LK8,                  _@7gj*LJ=c5nM)Tp1g0%Xv.,S[<>YoP
4ZojjV)O>qIH1/n[|2yE[>:ieC       "%.#%  :::##"       97N-A&Kj_K_><wS5rtWk@*a+Y5
yH?b[F^e7C/56j|pmRe+:)B     "##%      ::##########"     O98(Zh)'Iof*nm.,$C5Nyt=
PPu01Avw^<IiQ=5$'D-y?    "##:         ###############"    g6`YT+qLw9k^ch|K'),tc
6ygIL8xI#LNz3v}T=4W    "#            #.   .####:#######"    lL27FZ0ij)7TQCI)P7u
}RT5-iJbbG5P-DHB<.   "              ##### # :############"   R,YvZ_rnv6ky-G+4U'
$*are@b4U351Q-ug5   "              #######################"   00x8RR%`Om7VDp4M5
PFixrPvl&<p[]1IJ   "              ############:####  %#####"   EGgDt8Lm#;bc4zS^
y]0`_PstfUxOC(q   "              .#############:##%   .##  ."   /,}.YOIFj(k&q_V
zcaAi?]^lCVYp!;  " %%            .################.     #.   "  ;s="v=%04o;ev"%
(;v=(v-($*+[45,  ":####:          :##############%       :   "  ])[n=0].to_i;)%
360)+"al$s=%q#{  "%######.              #########            "  ;;"%c"%126+$s<<
126}";d.gsub!(/  "##########.           #######%             "  |\s|".*"/,"");;
require"zlib"||  "###########           :######.             "  ;d=d.unpack"C*"
d.map{|c|n=(n||  ":#########:           .######: .           "  )*90+(c-2)%91};
e=["%x"%n].pack   " :#######%           :###### #:          "   &&"H*";e=Zlib::
Inflate.inflate(   "  ######%           .####% ::          "   &&e).unpack("b*"
)[0];22.times{|y|   "  ####%             %###             "   ;w=(Math.sqrt(1-(
(y*2.0-21)/22)**(;   " .###:             .#%             "   ;2))*23).floor;(w*
2-1).times{|x|u=(e+    " %##                           "    )[y*z=360,z]*2;u=u[
90*x/w+v+90,90/w];s[(    " #.                        "    ;y*80)+120-w+x]=(""<<
32<<".:%#")[4*u.count((     " .                   "     ;"0"))/u.size]}};;puts\
s+";_ The Qlobe#{" "*18+ (       "#  :#######"       ;"Copyright(C).Yusuke End\
oh, 2010")}";exit~;_ The Qlobe                  Copyright(C).Yusuke Endoh, 2010

and each subsequent iteration shows the globe rotated by 45 degrees. To which I can only reply, holy freaking moly.

A sampling of the comments from the blog post:

This is awe-inspiring.

You are a mad man. You are completely insane.

You have completely blown my mind.

If you're curious to learn more about how this works at a high level (as I was), one anonymous commenter was kind enough to write a few sentences about the structure of the code.

Source: Yusuke Endoh

26 November 2010


Motorola recently launched the Defy, a ruggedized Android phone (see the Engadget review for more info; the picture is the Defy sitting in a glass of water).

While I think only a small fraction of people would buy a ruggedized phone, a ruggedized tablet could be a pretty big hit. I think the killer app is reading a newspaper/book (or playing Cow Clicker) in the tub or pool.

Well, I guess now you know what's going on my holiday wish list every year until someone makes one of these.

05 October 2010

Fundbüro at Oktoberfest

(This article is from a year ago but it is in season again—or would have been, last week).

The New York Times has an interesting article about the lost and found at Oktoberfest (the Fundbüro). It seems to be exactly what you would expect to find at the intersection of German inebriation and German efficiency.

Returning lost phones, passports, keys, and wedding rings on this scale (about 5000 objects are lost each year) must require a regimented organizational/labeling system. And the people who work the booths seem to be very on top of things:

For Sam Sealy, 19, from Bellevue, Wash., it was relatively easy to prove ownership, since his passport was in his gray and blue backpack. An alert staff member actually recognized him from his photograph before he even made it to the counter to inquire.

This is not the sort of thing you usually encounter in America.

The Fundbüro has its limits though:

But as the staff must tell teary-eyed teenage girls every year, they do not keep track of lost boyfriends.

03 October 2010

Threading humor

We were eating lunch at the cafeteria.

P: [Sitting down] Where are R and S?
Q: They're still waiting in line for food. There was this mess inside where two lines merged into one, and they kept getting pre-empted.
P: Would you say they were... starved?

29 September 2010

Movie roundup

Some movies I watched recently, in approximately decreasing order of enjoyment. Warning: includes what you could consider to be a spoiler for Moon.

Back to the Future. There isn't a single throwaway line in this film. I consider it one of the best screenplays ever written. Michael J. Fox's character is just so likable. You really want him to set things right. And the friendship between Marty McFly and Doc Brown is heartwarming.

Incidentally, it speaks volumes about human nature that we are so gripped by the idea of traveling to the past and righting wrongs.


Inception. I really enjoyed this movie. And I think what drew me in was its treatment of mind control. (Nora Jemesin puts it well.)

The plot driver of the movie (that in order to succeed, the protagonists have to inject an idea at a level beneath the target's conscious awareness) hints at something that every writer and teacher has wrestled with. The problem with our minds is that they are not wired to process evidence in a rational way. Planting an idea in someone's head is not just a matter of laying all the facts out in as lucid a manner as possible; it can require a bit of indirection, underhandedness, trickery, and elbow grease. Which is part of what makes writing (and teaching, and the art of persuasion) so intriguing, at least to me.

Also a very good screenplay, one of those technically well-constructed films where everything comes together at the end in a very satisfying way. Recommended.

Moon. I was looking forward to this movie. A cool premise and a set of interesting ideas are spoiled by poor execution. The major twist is exposed less than halfway in, and every potentially suspenseful development thereafter is deflated in an anticlimactic way (you can guess most of the developments after and possibly including the first big reveal). There is no rising action. The film just didn't work for me.

The Sorcerer's Apprentice. Clichéd and bland and mildly entertaining.

The Expendables. Lord knows, I love explosions as much as the next guy, but I actually found myself bored during the middle of this movie.

The American. Too much brooding. Incredibly slow and boring.

22 September 2010

Pita chips

I previously shared my hummus recipe, so I would be criminally negligent if I didn't also convey how easy making your own pita chips is.

Homemade pita chips are a snap to make and are far cheaper than the stupidly expensive stuff you find at the supermarket.

These chips are merely salted (to maximize your appreciation of the hummus). Despite their simplicity I am pretty sure they are more addictive than nicotine.

Instructions: buy some pita bread (both regular and whole wheat pitas make good pita chips). Separate the two sides of each pita by cutting along the circumference with a knife or scissors. Cut each into triangular segments and place them on a baking sheet, rough side (inside) up. Brush or dribble olive oil onto each. Sprinkle with sea salt. Bake at 350 degrees for 7 minutes. Turn the chips over and bake for 7 more minutes.

Try and eat just one. I challenge you.

Adapted from The America's Test Kitchen Family Cookbook.

19 September 2010

The Elements of Investing

Disclosure: I received a free copy of this book.

The Elements of Investing, by Burton Malkiel and Charles Ellis, is a fine (and very concise) book with basic principles of investing.

Burton Malkiel is also the author of the (much longer) book A Random Walk Down Wall Street; if you have read that book, you may not be surprised to learn that the core of the advice is this: Buy and hold index funds.

Malkiel and Ellis lay out the arguments that suggest you should keep a substantial chunk of your assets in broad index funds (or index-tracking ETFs, which have similar characteristics). Foremost among them, individuals are not very good at picking stocks or at timing the market, and fund managers are no exception. (Having your assets properly diversified can help you sleep at night, and that's probably worth something to you too.)

There's other good advice as well, such as how to take advantage of 401(k) plans and IRAs.

I consider the advice presented here to be a good set of defaults for most people. Those who are exceptions (or are in exceptional situations) will need to consult sources other than this book, but those people ought to know who they are. Meanwhile, if you have already read A Random Walk Down Wall Street, there is little truly new material presented here (same goes, probably, if you are already just generally well read in personal finance). However, you may still find it convenient to have a bunch of essential actionable elements in a single short book.

09 September 2010

The Man Who Mistook His Wife For a Hat

The Man Who Mistook His Wife For a Hat, by neurologist Oliver Sacks, is a collection of case histories of his patients.

The book is divided into four sections, corresponding to categories of brain (dys)function: neurological deficits, neurological excesses, visions and altered perceptions, and mental retardation and savants. There are 24 stories in all, varying in length and style. Both the clinical accounts and Sacks's personal reflections on each case are very interesting, though some of the shorter chapters left me wanting more.

One of the most unsettling cases, "A Matter of Identity", is about one William Thompson, a patient with Korsakov's syndrome. He can only remember things for a few seconds, so his mind is continuously forced to improvise ad-hoc stories to explain his surroundings. When Sacks introduces himself, Thompson (mis)identifies Sacks as a customer, and himself as a butcher (which he was, before he was institutionalized); then, noticing Sacks's white coat, he figures him for a fellow butcher; eyeing Sacks's stethoscope, he assumes Sacks to be a mechanic (for some reason); then a doctor; then a customer, again; and on and on. Thompson switches from one explanation to another fluently, never showing any hesitation or uncertainty. He is totally oblivious. Sacks muses, wondering whether Thompson, who has consciousness but lacks continuity, can be said to have an identity, or even a soul. And though Sacks can do little to mitigate Thompson's condition, he does notice that when Thompson is left alone in the garden, he finds a peace that he's not able to obtain anywhere else.

So it is with many of the accounts in the book, that Sacks shows his resourcefulness as a healer. Some of his patients have disorders that make them seem almost hopelessly walled off from the rest of the world. And yet Sacks is often able to break through somewhere, to help patients get in their element—to find some context or activity in which their disorders fade or seem to disappear entirely. It's through clinical accounts, surprisingly, that one sees the human and compassionate side of both the doctor and his patients.

The Man Who Mistook His Wife For a Hat has many beautiful and wondrous tales, and it really gets one thinking about what it means to be human. Recommended.

07 September 2010

Plush Tux Penguins

Edit, January 2011: also see the next generation of Plush Tux.

As a Labor Day weekend project, Santhosh and I made plush Tux penguins (in honor of our favorite kernel). Neither of us had done a major sewing project before, so it took the two of us about 16 hours to make two penguins.

We obtained free (as in speech) schematics from free-penguin.org. That site is somewhat light on instructions, but the patterns came out very nicely. Each Tux stands (er, sits) about 11 inches tall.

More assembly pictures…

02 September 2010

Review: Mercier Galaxy and other bike gear

Having completed a tour with my bike (my first road bike) I can now make a few comments on it and my other equipment, and pass on some of the many tips people have generously shared with me along the way.

The Mercier Galaxy is a good first road bike, and a good touring bike for its price. I bought mine on bikesdirect.com for $496 and it has since been discounted to $396. The price is right! In addition to taking mine on tours, I've also been commuting to work on it.

The Galaxy's frame is all steel, so it's not light, but it's also nothing that will fall apart on you.

If you are looking to buy a bike online, you do, of course, have to know your frame size. This can be a little tricky if this is your first road bike; I won't go into the details here.

The bike comes "mostly" assembled. All you need to complete the installation is a set of Allen wrenches and a tube of grease— just put grease on every metal-metal interface before you put the parts together. I put my bike together without adult supervision in a couple of hours. (The manual is both unhelpful and unnecessary.) Having a second person around during assembly is helpful. The only tricky part, I would say, is getting the derailleurs adjusted right. I don't have a good sense for visually figuring out how the derailleurs should be positioned, so it took me a few edit/ride cycles to get it adjusted to something usable. I imagine that if you took the bike in to a professional (or really, anyone who knows something about bikes) they would be able to fix this sort of thing for you in no time at all.

I installed the following parts for the tour. These were pretty quick changes: most elements took under 30 minutes to install (first time trying). The Galaxy is nearly ready to go on a tour.

Tires: Continental Ultra Gatorskins. Around town I'd mostly been riding around on 25mm racing tires. For the trip, I installed the Ultra Gatorskins, which have a Kevlar strip in them so they are more resistant to flats (I made it through the tour with no flats). I used 28mm tires since we were traveling loaded. The Gatorskins are heavier but having the extra peace of mind is invaluable. In case you want to install still wider tires, the brakes and frame do even fit 32mm tires, so you do have that flexibility.

Rear cassette: Shimano 11-34 8-speed cassette (HG40). The Galaxy comes with an 11-30. Having that last gear be so much lower really helps on steep grades. (With these gears, Redwood Gulch, a 21% grade at its steepest part, turned from something I dreaded to something manageable.) Often, with a 34-tooth gear, one needs to make sure that the rear derailleur can actually reach that far. The derailleur that comes with the Galaxy is just fine, in fact, though I had to do a bit of fine-tuning so I could access the last gear. You will need some more specialized tools (not just Allen wrenches) to replace the cassette.

Brakes: Kool Stop Salmon brake pads. These brakes are nearly silent and perform well in the rain. There's not much more to say about them! Buy a set already.

Bike computer: Sigma BC1606L. It's light and does the job. A single coin cell powers it for months. Additionally I borrowed a GPS unit for the trip, but closer to home I don't usually need a GPS.

Pedals: Shimano pedals, and Shimano M086 shoes (mountain bike shoes). I also have a matching pair of road bike shoes (R086). The mountain bike shoes have treads on the bottom so that the cleat is partially recessed; the road bike shoes do not, so they have a totally smooth bottom except for the cleat. If you intend to race, then every gram matters, and you want the road shoes. You also want the road shoes if you enjoy the feeling of being afraid of slipping and falling on your back every time you take a step on asphalt or tile. Maybe it makes you feel more alive. Otherwise… just start with mountain bike shoes.

Fenders: SKS Race Blades. I wasn't able to find fenders before I left, so I bought these in the middle of the tour. When riding in the rain, getting a thin stripe of mud down the middle of my back doesn't really bother me, but getting my socks wet from the splashback can be really miserable. The SKS Race Blades are nice because they attach with rubber straps, so they are easy to mount and unmount. (Also important, they go behind the front fork rather than trying to fit through it, so they actually fit on the Galaxy and other road bikes.)

Light: Planet Bike Blinky Superflash Tail Light. (I also had a cheap no-name front light that was anemic enough that I won't endorse it. Fortunately we didn't need to use our lights extensively.) Two AAA batteries power the Blinky Superflash for weeks or months of commuting.

Bags: Carradice Nelson Saddlebag and Carradice Bagman Quick Release (rear) and an Ortlieb Ultimate5 Compact (handlebars). The Ortlieb detaches easily and has a shoulder strap, so I left my valuables (camera, phone, passport) in there and brought it with me whenever I had to leave the bike. Extremely convenient. The Carradice Nelson fits a shockingly large amount of stuff, and the quick release mount is useful for commuting as well as for touring. Both bags are waterproof.

Fully loaded bike

Update, Mar 2012: a year and a half later, this bike has seen about 4,500mi of riding on three additional tours, and I have no plans to retire it. I am still using everything on the list above except for the Sigma (I've upgraded to a Garmin Edge 800). More info about my recent tours here or here.

21 August 2010

Tour of the German-speaking Alps 2010

In June and July of this year I (along with Piaw, Lisa, Cynthia, and Kekoa) went on a three-week self-supported bicycle tour of the German-speaking Alps— really, mostly Switzerland. I had been looking forward to returning to Switzerland since last (and first) I went there, and this trip did not disappoint. I think all of us really enjoyed it.

I've now published my trip report as well as some conclusions about bicycle touring (based on my impressions as a first time cycle tourist).

04 August 2010

Minimum federal ricketyness standards?

There's a well-known effect in economics/psychology called risk compensation, whereby people tend to adjust their behavior in response to perceived changes in risk.

Consequently, the life-saving effect of the introduction of some safety devices (especially very visible or easily perceived ones, e.g. anti-lock brakes, bike helmets) is somewhat less than the "true" effect of the device, because people compensate for increased safety by engaging in more risky behavior (e.g. driving faster, descending faster around blind corners).

The flip side is that if we just make certain behaviors appear more risky, then people will do less of them (irrespective of the actual amount of risk they are subjecting themselves to). Should the federal government mandate that automobiles feel more rickety at high speeds? These mandates could be encoded as limits on how good the shock absorbers or window seals are allowed to be. (I am pretty sure I drive more slowly in older cars, especially if it sounds like there are gale-force winds outside and it feels like pieces of the car are going to fall off.)

On the face of it, this seems like a silly idea. Which is why it's so unsettling, to me, to confront the possibility that, because risk compensation partially neuters the effect of real safety devices, that this just might actually be an effective (and cost-effective) way of saving lives.

Disclaimer: It's not clear what the socially optimal amount of speeding is, and whether it is more or less than the status quo (and therefore, whether such measures are even desirable from an economic standpoint). It's not clear how much utility people directly derive from a smooth ride and the feeling of security. It's not clear to what extent people would become acclimated to such tricks and resume their fast-driving ways. It's not clear whether you can effectively limit the subjective feeling of safety by regulating a small number of objectively measurable parameters of a car's design. In any case, clearly Phil forgot to take his medication this morning.

17 July 2010

Iron Man 2

Iron Man 2 is a decent and fairly entertaining summer movie. I enjoyed it more than the first one, actually.

However, the first question on my mind after watching the movie was, how much did Oracle pay for its product placement? A good chunk of the movie plays like an Oracle ad.

Stories of Your Life and Others

Stories of Your Life and Others is a collection of short stories by Ted Chiang. Each one has a single simple "twist" as its premise and the author explores the consequences implied by that idea. Overall a very enjoyable read.

There is a huge variety among the stories. Some have religious rather than scientific/futuristic overtones (I found those a bit boring).

I particularly enjoyed two of the stories, "Story of Your Life" and "Liking What You See: A Documentary".

In "Story of Your Life," a scientist learns an alien language that changes the way she views the world. This story is a rare combination of a cute technical premise, a moving human story, and wonderful writing that really shows form in the service of message.

"Liking What You See: A Documentary" examines how society responds to the widespread availability of a simple (and reversible) medical procedure that renders people unable to perceive human beauty. The fact that the characters are so instantly recognizable (despite the differences between the world of the story and our present world) shows how people's dreams, fears, and insecurities just don't change. The story is also quite chilling, perhaps because I got the distinct sense that it does not quite sound as outlandish now as when it was written (just 8 or so years ago).

Nudge: Improving Decisions About Health, Wealth, and Happiness

I think of Nudge (by Richard Thaler and Cass Sunstein) as the "applied" version of Predictably Irrational. While Predictably Irrational was primarily about what makes people tick and about various classes of cognitive failures, Nudge goes more in depth into how we can design policies and institutions that counteract some of those those biases (something PI touches on, but only briefly). In that way the two books are quite complementary.

The core of the book focuses on case studies of policies and experiments in a few areas, for example, retirement planning, credit, and healthcare plans. Some of the important takeaways for me:

  • In order for people to make good decisions, they need relevant data about the alternatives, e.g. "What is the present discounted cost of this mortgage?"
  • People quickly learn how to make good decisions when they get accurate and timely feedback on recent decisions. (Unfortunately, none of life's big choices fit that criterion.)
  • Institutional planners can make a huge impact by choosing good defaults.

The authors advocate a theory of libertarian paternalism, which I agree with to an extent. They make the case that good institutional design can ameliorate many situations where our innate biases are especially likely to be self-destructive. But the ideas proposed in the last few chapters of Nudge (example topics: privatizing marriage, allowing patients to sign away the right to sue for malpractice) do not seem to have this property at all. Instead they seem to have sprouted from a general desire for libertarian policies. Which is not to say they are bad ideas (I think many of them are good, in fact), but I don't think they add much to the core thesis of Nudge.

In general the book is well-written and easy to digest. Recommended.

11 July 2010

Supercomputer plays Jeopardy! as well as top humans

As reported in the New York Times, IBM's research division has been hard at work creating Watson, a machine that answers questions. Their tech demo is getting Watson to play Jeopardy! against previous Jeopardy! contestants:

Over the rest of the day, Watson went on a tear, winning four of six games. It displayed remarkable facility with cultural trivia ("This action flick starring Roy Scheider in a high-tech police helicopter was also briefly a TV series" — "What is 'Blue Thunder'?"), science ("The greyhound originated more than 5,000 years ago in this African country, where it was used to hunt gazelles" — "What is Egypt?") and sophisticated wordplay ("Classic candy bar that's a female Supreme Court justice" — "What is Baby Ruth Ginsburg?").

By the end of the day, the seven human contestants were impressed, and even slightly unnerved, by Watson. Several made references to Skynet, the computer system in the "Terminator" movies that achieves consciousness and decides humanity should be destroyed.

The Watson team has taken an approach that is complementary to what Wolfram Alpha has done, relying on NLP to parse source documents rather than using explicitly curated data. It will be interesting to see how this plays out.

Watson is being productionized and IBM is considering targeting this technology at niche applications as well, e.g. medical decision making. There are already moments when I feel as if the phone in my pocket (and access to Google, Wikipedia, etc.) is augmenting my intelligence and helping me to make better decisions. I can scarcely imagine how life will change when everyone has access to a Watson all the time.

Bad Hemingway Imitation

I must have seen this in a fortune dozens or hundreds of times, but it still makes me laugh every time, so I wanted to share it with you.

Peter Applebome wrote the following winning entry in the 1989(?) International Imitation Hemingway Competition. The last time I read any Hemingway was nearly a decade ago, and it's still a bit disquieting for me to read this.

In the late summer of that year we lived in a condo in North Dallas that looked across the tollway to the discos and honky-tonks of the Rue St. Bubba. We were young and our happiness dazzled us with its strength. But there was a terrible betrayal that lay within me like a Merle Haggard song at a French restaurant.

"The Great Landry says the Cowboys will be back," said the girl.

"Then it must be so," I said, though I knew it was a lie.

"When football season comes, then it will be cold. Like Switzerland. But not now. The cold will come later.

"Pass the Doritos," I said, and her eyes shone like the stars over Amarillo.

I could not tell the girl about the woman of the tollway, of her milk white BMW and her Jordache smile. There had been a fight. I had punched her boyfriend, who fought the mechanical bulls. Everyone told him, "You ride the bull, senor. You do not fight it." But he was lean and tough like a bad rib-eye and he fought the bull. And then he fought me. And when we finished there were no winners, just men doing what men must do. And the pain was washed away, but the image of the woman stayed with me like a blessing and like a curse. [...]

Read the whole thing for the excellent punchline.

08 July 2010

Back from vacation

Switchbacks leading to Grimsel and Furka passes — right and left, resp. (map)

I just returned from a 3-week cycle tour of the German-speaking Alps, which was a total blast. Selected photos are available on my trip blog. More pictures and a full trip report are coming soon, but it will take me some time to sift through the full suite of 2400+ photos from the trip.

For the time being, I'm grateful for cotton clothes, not having to do my laundry every day, getting to sleep in my own bed, and not getting hungry every two hours.

31 May 2010

O Brave New World

Two articles caught my eye recently. I paraphrase them briefly here, but read the linked articles if you haven't heard about this in the news already.

  • Oxytocin, when administered via nose spray, increased empathy in subjects in a study published in The Journal of Neuroscience. Discoblog has an interpretation of the findings.
  • Magnets can interfere with moral judgments, according to a study published in the Proceedings of the National Academy of Sciences. A technique called transcranial magnetic stimulation changed the way participants reacted to stories designed to provoke moral reactions about guilt or innocence. NPR has a summary.

You can probably, without thinking too hard, come up with half a dozen ways in which these techniques could be misused for nefarious purposes. The reported findings only represent "proof of concept," but I believe it's only a matter of time before these or similar techniques are commonly applied to unwilling subjects.

I, for one, was not really surprised to learn that scientists are getting closer to identifying a neurological/biochemical basis for relatively high-level mental functions. What's so amazing to me is the relative subtlety of these techniques. Time was when you had to jab someone in the arm or put something in their drink or apply blunt head trauma in order to compromise their mental faculties, and even then only you could only manipulate them in a very coarse-grained way (see, e.g. sodium pentothal). I am very worried that in twenty years you'll have to check under the tables for aerosolizers and neural stimulation devices every time you walk into a corporate board room or a courtroom or a car dealership.

16 May 2010

How not to misinterpret statistics

ScienceNews has an article by Tom Siegfried, titled "Odds Are, It's Wrong". Siegfried presents a pretty good analysis of a few common errors in statistics (just be sure to skip over the overdramatic introduction). The most major of these, in my mind, is misunderstanding the meaning of statistical significance.

If you've forgotten everything you learned in your last statistics class and are a bit hazy about what the difference is between these two statements,

Experimental data yielded a p-value of 0.03.

With 97% certainty, the observed difference between the groups was real (and not due to chance).

...then this article may help.

09 May 2010


From Sacramento Credit Union's FAQ:

Why are the Security Questions used?
The first time you login and enroll in Protection Plus, you will be asked to enter five Security Questions and corresponding answers. The Security Questions are used if you do not want to register the computer you are currently using. With the Security Questions, we can make sure it is you logging in when you use different computers, such as, a internet bar computer. The answers to your Security Questions are case sensitive and cannot contain special characters like an apostrophe, or the words "insert," "delete," "drop," "update," "null," or "select."
Why can't I use certain words like "drop" as part of my Security Question answers?
There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".

I suppose that superficially this explanation is reassuring, but what it suggests about the underlying implementation is both saddening and terrifying.

(Blacklisting is often the wrong approach.)

04 May 2010

Rush Hour is PSPACE-complete

A friend got me playing the Traffic Jam game for Android, which is a clone of the children's game Rush Hour:

The object is to move the cars around so that the yellow car can exit the board; each car may move vertically or horizontally but not both.

I was amused (though not totally surprised) to learn that when one considers the generalization of this game to larger boards, it is NP-hard and PSPACE-complete to decide whether a configuration is solvable or not. Flake and Baum, in a 2002 paper (subtitle: "Why you should generously tip parking lot attendants"), prove this by showing how to emulate certain classes of digital circuitry in Rush Hour. This paper is worth a look even if you are only inclined to glance at the pictures of the constructions. The authors built freaking digital logic out of cars.

As with many good games, it seems there is more to Rush Hour than meets the eye.

21 April 2010


Logicomix by Apostolos Doxiadis and Christos Papadimitriou is a beautiful graphic novel about math history.

Yes, you read that correctly. Comic book about math.

The story centers around Bertrand Russell's experiences around the turn of the last century, as he and other thinkers tried to formalize all of mathematics— to identify a self-consistent foundation of axioms on top of which all of the rest of mathematics could be derived.

Frege, Hilbert, Wittgenstein, Gödel, and other famous names make appearances in the book. I found the auxiliary characters to be somewhat unmemorable, and the retelling of their stories has been greatly subject to poetic license anyway. What I enjoyed about this book is the fact that it painted such a vivid picture of the early 20th century mathematical zeitgeist. (The graphic novel is an excellent medium for this.) Hilbert and others had great optimism that mathematics could be formalized in such a way that it was consistent, complete, and decidable. In such a world, every well-defined statement about mathematics could be decided one way or the other in a mechanical way. That idea, and its natural extensions— that there could be an arbiter of truth for all factual statements, or even moral statements— were tantalizing to many. (Too tantalizing, apparently, as many of the mathematicians working on this problem really went unhinged.)

Yet, that hope was smashed when Kurt Gödel published his incompleteness theorems, in which he showed, among other things, that there would always be statements that could never be resolved (either proven, or their logical negations proven) within arithmetic or any extension of it. These fundamental limitations on the power of mathematics came as a shock to many. Von Neumann reportedly said, "it's all over," when he learned of Gödel's result. It was the death of a long-standing dream.

The authors manage to tell this whole story with a minimum of jargon, and they even turn the depressing conclusion around with a cute moral. All told this is no small feat.

Logicomix is not a math textbook but a drama. It has limited depth (justifiably so). But it's a neat idea and well executed. It is a worthwhile read (especially considering how short it is).

20 April 2010

People who are not in our league IV

Scott Smider of Cambridge, MA:

Cambridge's Scott Smider successfully completed the 26.2-mile Boston Marathon four times consecutively in two days, all to raise more than $10,000 for the Dana-Farber Cancer Institute in memory of his sister-in-law Elizabeth, who died from breast cancer Christmas Eve 2008 at age 41.

For those of you keeping score at home, Smider ran 104.8 miles. Astounding.

Source: Boston Herald

15 April 2010

Limericks about limericks

I found these meta-limericks amusing:

There once was a man from the stix,
Who liked to write limerics.
But he failed at the sport,
Because he wrote them too short.

There once was a lady from Crewe
Whose limerics went to line two.

There once was a man from Verdun.

Source: rec.humor.funny archives (includes a few more)

12 April 2010

Google shows hotline number for suicide-related queries

The week before last, Google started serving in its search results, above some queries related to suicide (such as [suicide] and [suicidal thoughts]), the number of a suicide prevention hotline:

This special result appears above the usual search results.

Hopefully this will reach some people to give them some help when they need it the most.

This is one of the more striking examples of one of the signs of our times: that for an increasing number of matters, people can (and do) confide in a computer things they would not share with a significant other, parent, sibling, lawyer, doctor, or clergy-person.

Source: New York Times

Groundhog Day; Shutter Island; True Lies

Groundhog Day

Bill Murray plays Phil Connors, an obnoxious weatherman who is forced to relive the same day over and over again. It's a cute concept. The kernel of the movie is the story of how Connors redeems himself through introspection and self-improvement. However, I didn't like the execution: the story seemed to stray too far at times into random territory. Connors is confused, then suicidal, then sleazy, then abusive, then persistent, etc. It was just too much for me. The film is still worth watching once, if for no other reason than because the story has become a part of the American cultural lexicon.

Don't forget to read the economists' take: The Economics of Groundhog Day. In a nutshell: "In economic terms the final reliving of the day constitutes what economists refer to as a perfectly competitive equilibrium based on perfect information."

Shutter Island

The trailer makes this look like a horror movie, but it's actually a thriller/mystery. (Good thing, too; I hate horror movies.) Leonardo DiCaprio plays a federal agent sent to the titular island, which houses a mental hospital, in order to investigate the disappearance of a patient. Shutter Island is entertaining throughout, and a good mix of mystery, drama, suspense, and some hauntingly beautiful cinematography. I liked the interplay between Leonardo DiCaprio's character and the two eerie doctors (Ben Kingsley and Max Von Sydow). This movie comes recommended.

People seem to have mixed feelings about the twist ending. It's no The Sixth Sense, but I thought it worked well. (I didn't feel cheated, as I did at the end of, say, Atonement.)

One complaint though, about the soundtrack: enough with the damned string section already!

True Lies

I started enjoying this movie a lot more once I realized it was not an action movie but an action comedy. Arnold Schwarzenegger plays a secret agent who hides his true job from his wife (his cover is a boring computer salesman). His marital problems are the source of much comedy.

In its overall setup it's very similar to a Bond movie (and with an FX budget to match, apparently), except that True Lies doesn't take itself as seriously.

A couple of things stand out for me. A few of the characters, including a used-car salesman who pretends to be a spy in order to attract women, are exceedingly pathetic. And the setup behind one scene, in which Helen (the wife of Schwarzenegger's character, played by Jamie Lee Curtis) goes on an undercover mission, is rather disturbing. There were a few parts that made me rather uncomfortable, and I loved those in an oddly cathartic way.

05 April 2010

Math column by Steven Strogatz

Author and Cornell professor Steven Strogatz has a new weekly column in the New York Times, in which he tries to illuminate various concepts in mathematics and explain their significance and applications.

My favorites so far include the columns on complex numbers and limits.

I think most people (whether or not they are afraid of math) will find at least a few interesting tidbits. It's good to see this kind of mathematical exposition in a popular venue.

29 March 2010

PSA for word nerds

One of the perks available to cardholders of the San Francisco Public Library is online access to that ultimate lexicon, the Oxford English Dictionary.

You do not need to be a resident of San Francisco to obtain a library card, though I think you do need to be a resident of California and you need to visit a branch in person.

17 March 2010

Pigeon Point

Last weekend I went on a trip to Pigeon Point with Piaw and others. We biked from the valley to the coast, staying in the Pigeon Point Lighthouse Hostel for a night. The scenery was gorgeous and we couldn't have asked for better weather. In all I traveled about 110mi.

(More details about the trip, and links to photos, can be found on Piaw's trip report.)

I've been finding biking to be quite a meditative experience. Whether I'm climbing or descending I find it's difficult to think about anything but the present. Getting into the proper rhythm really helps to clear the mind.

By the way, if you live in the Bay Area and have never stayed at the lighthouse, the hot tub overlooking the ocean is simply transcendent.

07 March 2010

Ominous Nexus One ad placement

This article from The Onion may have had the most fortuitous (or unfortunate, I haven't decided which) ad selection I've ever seen.

Cue the dramatic music. Nexus One: It kills background noise. For good.

28 February 2010

World Builder

A beautiful and very neat short film by Bruce Branit. (It has stuff that's reminiscent of the Minority Report computer interfaces—except cooler.)

(Via Terence Tao's Google Buzz, which is, incidentally, a fantastic mixture of relatively accessible math blurbs and stuff like this video.)

19 February 2010

Artist's rendering of Emacs session

Piaw Na and I were recently granted US Patent 7,613,693 for techniques we implemented in gtags.

The thing about this matter that astonishes me the most is the fact that, for the illustrations in the application, some lawyer or paralegal took the Emacs screenshots we provided and painstakingly replicated them in black and white line art, right down to the squiggly Emacs logo:

Whoever you are, I salute you.


NPR's All Things Considered had a short feature on Matt LeBlanc, who is an "efficiency expert" at a global shipping company.

LeBlanc visits a site for a few days or weeks, watches the workflow there, and gives recommendations:

"We [...] move a lot of printers," he said. "I'm sure you guys have printers in your office ... have you ever thought about why that printer is there, and if it makes sense for it to be there?" Over the course of a career, you might walk miles back and forth.

And LeBlanc says he can hardly help but apply efficiency principles to his private life:

"There is a thing called 'five-s': it's sort, straighten, standardize, sanitize and sustain," he said. "I five-s my toiletries in the morning."

How very kaizen (though I'm sure everyone knows someone just like that). I find something compelling in the idea of rethinking the things that most people are content to leave unchanged for their entire lives.

15 February 2010

Static analysis: a case study of Coverity

The Communications of the ACM has a long but interesting article about the experiences of the Coverity team and the development of the Coverity Static Analysis product.

(The article has lots of war stories. I enjoyed reading it.)

There are many interesting technical hurdles the Coverity team has had to deal with (e.g. standards vs. reality in language implementations; integrating into complicated and established build systems) in order to make Coverity Static Analysis find as many bugs as possible in user code. But the Coverity team also recognized that in order to make a sale or keep a customer, the output of Coverity Static Analysis must be simple, consistent, and easy to understand— objectives that are often at odds with the goal of finding as many bugs as possible.

For example, one point of tension is that every analysis that identifies a bug has to be able to explain to the user the exact circumstances under which that bug could manifest itself, and

a not-understood bug report is commonly labeled a false positive, rather than spurring the programmer to delve deeper. The result? We have completely abandoned some analyses that might generate difficult-to-understand reports.

Finished a half century

I went biking today and completed my first half century— 52 miles and about 4h30m in motion. (I didn't leave the house planning to ride that much, but it just sort of happened.)

The weather was perfect.

I'm tired but I'm full of endorphins. I haven't felt this great in a while.

14 February 2010

2009 in Review (photo collage edition)

2009 was a good year. Here's to a great 2010!

Work is going well; there's hardly a day that goes by where I don't learn something new. And not being in school anymore, I have more time to work on pet projects, socialize, go on outings, travel, read, and enjoy the outdoors. Life has been pretty good.

Some photo highlights from the past year:

03 February 2010

50 years since Greensboro

Photo credit: Mark Pellegrini, CC-BY-SA-2.5

It seems scarcely possible that it was just fifty years ago, on 1 February 1960, that four black students in Greensboro, N.C. sparked a sea change in civil rights by quietly sitting down at a segregated lunch counter:

The students — Ezell Blair Jr. (later Jibreel Khazan), David Richmond, Franklin McCain and Joseph McNeil — were not served that day because they were black. Woolworth’s was abiding by the local custom of only serving whites. [...]

Word spread throughout the campus of what they had done at the lunch counter and what had happened. By the following day, more than 20 students appeared at the lunch counter ready to sit in and protest. Soon, crowds of students were protesting at the stores regularly. [...]

By August 1960, six months after the initial Greensboro sit-in, lunch counters throughout the South announced that they were now integrated. [progressive.org]


16 January 2010

Movies and books, second half of 2009

Here's an index of books I read in the second half of 2009:

My favorites were Moneyball and Visual Display of Quantitative Information.

And movies:

My favorites were Star Trek: The Wrath of Khan, L.A. Confidential, and The Diving Bell and the Butterfly.

Bike Fitting

For about ten years before I got a new road bike last spring, I'd been riding around on a crummy $100 mountain bike from Costco.

For Nondenominational Winter Holiday my girlfriend bought me a bike consultation at Shaw's Lightweight Cycles. I had my riding posture/technique evaluated and some small adjustments made to my bike. I would almost compare the experience to being taught to ride a bicycle anew. It seems to be time and money well spent.

09 January 2010

Persepolis; Avatar

These movie mentions should be back-dated to late December.

Persepolis is a film adaptation of Marjane Satrapi's graphic novel of the same name, about the author's coming of age during the Iranian Revolution. Though it was a fairly faithful adaptation in style and content, I didn't find the experience to be quite as compelling as that of the book. Perhaps it's just harder to digest the same thing in movie format. Still, Persepolis is quite entertaining and touching.

Avatar is a sight to behold. The world that Cameron has created is gorgeous. (Though I have to admit I couldn't help but feel reminded of the Lord of the Rings movies, especially towards the end.) The story, though, is unremarkable and the characters are one-dimensional. However, the scientist characters are not cast from the usual stereotypes, which is refreshing.

Avatar is an exemplary action movie. James Cameron knows how to put a movie together.

I watched it in 3D—my first 3D movie—and thought that part was good but not great: many of the scenes seemed rather flat, I kept noticing strange and minor artifacts, and the way the focus moves around is a bit disorienting.

(For pure visual stimulation I still recommend Speed Racer.)