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:

Toys

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.

Food

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.

Cooking

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