Friday, February 29, 2008

MMM? MMMMM!

I finally took the plunge to upgrade my code from M3 to M5. The whole process was smoother than I expected - I had assumed it would take a few days, and managed the whole thing in just a few hours. My thoughts so far:
  • I'm really grateful for the excellent upgrade documentation provided by Google. Having a complete and concise explanation of all the removed methods, and what to replace them with, makes the whole process far less painful.
  • Dick Wall's ContentProvider diff is extremely useful as well. It would be nice if it was included in the official documentation - you need to dig a bit to find it.
  • Most of the API changes look fine to me. Have you ever used an SDK that had some functions which just seemed poorly designed or named? Did it gnaw on you for weeks, months, and years, when even the SDK provider's engineers admitted it didn't make sense? I'm willing to change my code now if it means not having to do that next year. Things are now more clearly named or more elegant. (Big example here is the AlertDialog change - it's a low more elegant now, and to some extent future-proofs against further API changes.)
  • I'm glad I wasn't using XMPP. This no longer seems as disastrous as I had first thought - it sounds like most of the old functionality is now present in the GTalk API - but the volume of the outcry has been as loud as I predicted.
  • Those buttons really are big! I've probably heard more about this than any other change, so I was prepared for it. What is weird, though, is that the TextViews are still as tiny as before. If your views are stacked vertically this looks fine, but if they're horizontal it's hideous.
  • I was pleased to see that the changes in View size didn't have a big impact on my design. Oh, it looks different, but not actually bad. I suspect that a lot (not all) of the people having trouble now were using absolute positioning or other funky layouts. If you stick to the basic built-in layouts, things look pretty good.
  • I wish I could say the same for other components. The TimePicker dialog, which looked good (if simple) in M3, is so ugly in M5 that it isn't an option for me to use. That leaves me with the unpleasant choice between re-implementing this View from scratch so it looks right, coming up with my own design for picking a time, or swallowing and hoping that they fix this soon.
  • Along the same lines, I wish they would finish open-sourcing Android and put in place a system for submitting patches. I'd much rather spend the few minutes I think it would take to fix this bug than fill out a report and wait for the next SDK.
  • Because of this and other factors, I'm now wondering whether it's worth re-submitting on M5. I kind of want to do it, since it's working on the latest and greatest, but it looks really bad in a couple of places. This would require additional design work just to reach the level of functionality I had before. Is it worth it, especially if these things will be fixed soon? I'm doubtful.
  • On the other hand, the bug fixes have been impressive. The improvements in MapActivity alone give a big boost to application stability, and may be worth the price.
  • It has definitely been a valuable exercise, though. Now that I know up front what to avoid, future designs will be much more likely to look great out of the box. (Just don't use any dates, or times, or long alerts...)
  • The M5 emulator seems a bit slower than the M3, but not by an order of magnitude like some people on the group have been reporting. I actually bought a new computer to handle the emulator, and am glad I did - the M3 went from taking over 2 minutes to boot up to less than 30 seconds.
  • The home screen looks better than I expected. When I first saw the screen shots from Barcelona, I thought it was hideous. After you use it, though, it makes more sense - it's showing you the applications you actually use, and you can quickly launch anything on the phone with a single tap.
  • With this and most other screens, it becomes really helpful to remember that M5 is for touch screens. This does, however, make it even more jarring when you run across Views that don't properly support touch.
  • The new XML editors are a little fluffy, but make Android feel like a more professional product. It's most useful when you have a limited and well-defined set of choices like in Android Manifest - it becomes an integrated tool for discovery. It's least useful when it becomes a thin and encumbering veneer over raw XML, like in the resource XML. It would be great if future Eclipse plugins could identify the valid entries and only show us those.
On the whole, M5 is a definite improvement, but it's a classic case of three steps forward, one step back. For alpha software, it's pretty darn good.

Tuesday, February 26, 2008

Back in the Saddle

Have I mentioned that my bike was stolen? Odds are that either this is news to you, or you've heard entirely too much about it over the past two months.

It's still a bit of a shock to me. It was ripped off from the bike rack in back of my office, where I've been locking it up almost every workday for well over a year. Nobody else has had any problems with theft, so my co-workers and I were all pretty stunned.

I filed a police report and unhappily waited, but had no illusions: I knew that the odds of retrieving it were slim. The only silver lining was that, since it went in late December, I wouldn't have been doing much riding over the next month anyways. Still... I was just a few rides away from 1500 miles for the year, plus I just hate the feeling of losing something like that. It's the most costly item I've ever had taken from me.

After a while I received the official letter from the Los Gatos police department that (nicely) said that they weren't looking for it any more. I sulked for a bit longer, but after heading into a stretch of glorious weather (70 degrees? In February? For a Midwestern boy like me, that's unfathomable and undeniable), I was moved to take action.

Prior to the theft, I'd been telling everyone that my next bike would be a road bike. My original bike, a Specialized Sirrus hybrid, was a compromise, since I couldn't decide if I'd only be riding on a paved trail or if I'd also be heading off-road at all. I've since come to realize that the road options in the area are ample for me, and it made sense that my next bike would take advantage of all that.

Still, when I said that my next bike would be a road bike, I was thinking "next bike" in terms of the next five or ten years, not later in the aughts. When I came to face the actual decision, I found myself resisting. First, with the prospect of loss fresh in my mind, it seemed unwise to drop over a grand on a bike. Second, for the kind of riding I'm doing now, day to day, a hybrid still makes more sense. I share the trail with other riders, runners, dogs, strollers, etc. The hybrid's construction keeps me very visible and encourages me to sit upright where I can see and response to the myriad mobile obstacles on the horizon. Altogether, it seemed the way to go.

I finally went and got it yesterday. I felt a little bit sheepish when I returned to Wheel Away... after all, I'd bought the exact same bike from them just two years ago. They were great as always, though, and in seemingly no time at all I was happily on my way again.

I must say, I do like this new bike. It's another Sirrus, but they've touched up the design. There are more shiny metal parts now, which will look crummy in a year but look really sharp right now. There are plenty of other smaller changes as well. The handles are more textured now, with a broader grip. The seat is a higher-quality leather, and the styling on all the bike looks better.

I did my first serious riding on it today. It seems to be going pretty well... the biggest problem I've had so far is with the front shifter. It doesn't want to move from second to third gear, but after some trial and error, I've found that it will shift most of the time if I stop pedaling while I shift. That's different behavior than on my previous Sirrus, so I may have them look at the dérailleur when I take it in for my tune-up.

Other than that, though, I was very pleased. Honestly, as pleased with myself as with the bike. After two months of absolutely no riding, I was dreading getting back into shape on it. I won't lie - I did feel pretty beat when I pulled into work - but nowhere close to the pain when I first rode to work. I also realized all the little things I'd gotten good at without even noticing. For example, the toe clips. I went for a whole year either not using them or using only one, due to all the trouble I had with them, but now, after just opening them up a tad, I was surprised by how effortless it has become to slip my feet on and off my pedals.

If nothing else, this experience has taught me that I need to value the time that I have, because I don't know how long it will last. I realized that I never named my previous bike, and resolved not to make the same mistake. So, after one day, I've settled on one: Asfaloth. Shadowfax would have been the obvious choice, but hey, I need to save a cooler name for the better bike that I'll be getting in the future. Hopefully a decade from now.

Awesome Adventures

Phew!

I would be feeling pretty tired right now, if I didn't feel like such a wuss in comparison to the professional athletes I've been watching. I've just come off a fun, quick, unusual vacation that combined the best of all worlds: time with family, sightseeing, relaxing, and ample excitement.

I've previously attended the Tour of California, a new professional cycling race that is now entering its third year. It combines my established love of California with my growing love of cycling. In previous years, my Dad and I have enjoyed chatting about the race as it unfolded; this year, his schedule worked out such that he was able to come out and watch the race (at least the first portion of it) with me.

Dad came out on Friday, arriving almost half an hour early. He left Illinois when it was cold and snowy, and emerged from the plane into a brilliantly clear and warm California day. We swung by Twist Cafe for lunch, a nice little French cafe that I've wanted to eat at but never have. Well, not exactly. I ordered the Tri-Tip Sandwich, which believe it or not I've been desiring for about two years. We had a leisurely lunch and chat, then he got to chill in my apartment while I wrapped up the work day. As a bonus, I discovered that the contractors had fixed my porch door, thus allowing me access to the outside!

Among the many reasons I enjoy visitors, it gives me a chance to try out some food options that would be tricky to cook for myself. I had my eye on two recent recipes from Cook's Illustrated: Chicken Saltimboca and Fluffy Yellow Cake. The cake (with chocolate frosting) is my favorite cake, and has been since my childhood, though I have only had it from a box mix; the Saltimboca just sounded really good. My attempt at the cake was prematurely thwarted. Can you believe that neither Whole Foods, Trader Joe's, nor Safeway carries Dutch-process cocoa? Yes, granted, until a year ago I wouldn't have even known what that was. Still! It annoys me. I had to shelve their chocolate frosting recipe, and without the frosting there's no sense in making the cake.

The Saltimboca was a go, though. I had to make my own cutlets, but even with that it was relatively simple to make. The end result is really rich, though: sage-infused chicken wrapped with prosciutto and topped with a lemony wine sauce. We paired it with simple roasted butternut squash puree and persimmons. Good California eating! For dessert, we worked our way through some oatmeal cookies I've stashed away.

The race wasn't starting until Sunday, so we had all of Saturday to play. Dad was game for hiking, so we journeyed out to Henry Coe park. This is probably my favorite park in the area, but it is far enough that I don't make it there as often as I would like. It's been in the news lately due to appearing on Governor Schwarzenegger's list of proposed parks to close. That would be a travesty... it's one of the most beautiful parts of a beautiful state.

Anyways! I sort of cobbled together a hike from a few routes I'd taken before. We hit the Corral Trail out from Headquarters, then did the Forest Trail. I'd just recently done this trail, but I think it's a perfect orientation to the park and California nature in general... it really is a microcosm of the species and principles you'll encounter. From there we hiked all the way down Poverty Flats Road, which isn't nearly as painful as hiking UP it, as I've done every other time. The highlight of the hike was an ascent up Middle Ridge, a steep elevation gain but one that afforded us some wonderful views, including some soaring eagles and even more impressive views.

Saturday night and every other night, we continued the March Through Chris's Freezer o' Leftovers. This time it was Hearty Tuscan Bean Stew, another CI dish. Baked potatoes and more persimmons filled out the meal.

Sunday is race day! After a visit to Menlo Park Presbyterian, we hopped several blocks east to Palo Alto. I haven't spent much time there, but have visited twice in the last several months, and so had a decent feel for the layout. We parked in a lot and wandered downtown. Even though it would be nearly three hours until the race started, several hundred people were already walking the streets. We had plenty of time to explore the city and the university, which I gleefully took advantage of, finally getting to see the Rodin Sculpture Garden and other points at Stanford. For lunch, we got two of the tastiest gyros ever (vegetarian/falafel and beef+lamb) and ate them while sitting on a sun-soaked curb, cheering riders in the Mayor's Charity Race.

The Prologue was a good chance to catch individual racers up-close during their time trials. We wandered up and down the length of the route, which stretched from downtown to the Stanford oval. Last year I'd cheered for Bryce Mead on his ascent up Telegraph Hill; this year, Dad got to holler "ABD!" when he approached the starting line. I'm regularly impressed by how close to the racers you can get at these things.

The race wrapped up a bit after 3. Levi didn't repeat his earlier win, but had a very respectable finish. The crowd was generally appreciative.

Speaking of which, I was impressed by the turnout. This is the first year that Palo Alto has been involved in the Tour, which has started up in the City the last two years. Because of this it doesn't have the sort of history established that other cities have, and I'd expect turnout to be smaller. It's hard to judge the size of crowds, especially when they're as spread out as they are for a race, but I thought it was pretty comparable to what San Francisco saw. Even better than the size, people throughout the week were enthusiastic and appreciative. I think a lot of people are like me and only vaguely aware of the intricacies of the sport, but we still enjoy it greatly.

Almost from the time I moved out here, I've wanted to visit the Stanford Theater, a restored classic movie theater. We lucked out, since Dad's visit coincided with their Hitchcock festival: two and a half months of movies covering the entire span of his career. My tastes are fickle, but I usually count Hitchcock as one of my three favorite directors of all time, along with Gilliam and Kubrick. Anyways! Sunday night's film was Spellbound, which I hadn't seen before. (Random note: on the rare occasion I blog about films, I think I'll start linking to Wikipedia instead of IMDB. IMDB has seniority, but I've never really liked their site design, and their advertising is increasingly annoying. Now that Wikipedia's just as informative, they're my new go-to for movie info.) It was a great movie, more in line with The Man who Knew Too Much than Psycho. Let me emphasize that: it was a GREAT movie. It seemed specifically designed to appeal to me. Dream sequences? Designed by Salvador Dali? First use of the theremin in a film? Madcap psychologists? It's all in there, baby!

As a bonus, after the movie we got to enjoy a few pieces performed live on the Mighty Wurlitzer organ. Good times!

Dinner Sunday night: a white chicken chili.

Monday, President's Day, was a free day off work, the first stage of the race proper, and the start of our rumspringa. After my near-disastrous experience in Sausalito last year, we got an early start to the day, working our way down the steep roads a good hour or so before the start. After evading some surprisingly rude drivers, we snagged a parking spot by a church and walked down to Bridgeway. One of the reasons we had come early was to attend the Bike Expo, but it was a bit of a let-down... just some repackaged booths that we had seen before, set under a big tent. After making the rounds we struck out for Caledonia, where they would be making several parade routes.

We semi-accidentally stumbled onto the eastern edge of Caledonia and established ourselves one block west of the turn. It was a phenomenal position, the first of several we would get... we got to see the riders as they came down on Bridgeway, then again seconds later after they rounded the tight turn into Caledonia and accelerated towards us. This was repeated several times, allowing for multiple shots with the camera as well as ample cheering opportunities. Feeling the peleton rush by is, well, quite a rush!

Our next destination: Santa Rosa. While the cyclists would work their way north along Highway 1, we took the speedy shortcut along 101, where we made pretty good time into Sonoma County. We arrived in Santa Rosa with plenty of time to spare, then squandered it when I drove around semi-aimlessly looking for parking. I'd latched onto a fragment of a sentence on the Santa Rosa race web site describing parking at "The Fairgrounds", failed to locate it, then killed nearly an hour while getting lost. In retrospect I should have just grabbed a spot at a garage... it would have been cheaper than the gas I burned going in circles. We missed the Women's Criterium (except for a brief glimpse while waiting for the Longest Left Turn Arrow in the Universe), but after parking and catching Rosie the Trolley, we still arrived with ample time. The crowd here was just enormous, probably the largest and most enthusiastic of any city we would see. We realized there was no way we'd see anything near the finish line, but by moving just a few blocks away we scored yet another killer location, immediately after a hard right turn on a final loop through the city. I steered us towards Traverso's for lunch, and was shocked - shocked! - to see that they were closed. On President's Day! It was a blessing in disguise, though, since that steered us towards some very tasty Chicken Tikka Masala served by a smiling vendor outside a "Curry in a Hurry" store. Warm, filling, and utterly tasty, it came with generous saffron rice and naan.

We could tell when the riders were approaching by the enormous roar that came from the crowd. Soon - poof! - the racers where in front of us, pumping furiously. In a moment they were gone, but the vocal appreciation continued.

After the stage finished, we worked our way towards the podium for the awards. We couldn't see much, but did get to hear all of the jerseys awarded and the overall standings. Even though Levi wasn't on top this year, the crowd was still into it, applauding all the riders for their work.

We ambled back to the intersection of Santa Rosa and Sonoma, where we caught the last trolley of the day. Next we headed towards our hotel, the Flamingo. It's an interesting place! The staff were friendly, the facade fascinating, and our room was really comfortable. As a strange bonus, it included a second, unadvertised bedroom/closet with two narrow beds laid head to foot. It was useless to us, but would have been perfect on a family trip.

We were both pretty tired - Dad from lack of sleep, me from driving - so we chilled in our hotel the rest of the night. The exception was dinner, which we selected after one of the longest (albeit most pleasant) food deliberations I've had outside of conversations with Pat. After considering and evaluating a half-dozen possibilities, our own tastes, level of hunger, and aptitude for travel, we settled on Hank's Creekside Restaurant, which was across the street. And, it turns out, closed. D'oh! But, simply by re-crossing the street, we landed at Lyon's, a classic diner from the 1950's. It was a supremely comfortable place with surprisingly good food. I had a reuben sandwich with potato salad, Dad took an interesting Southwest salad.

We liked Lyon's so much that we hit it again for breakfast the next morning. I stayed boring and took a combination of French toast, fruit, and a small Denver omelet, while Dad got a more substantial mushroom omelet. Thus fueled, we stepped out into the rain and headed east.

Since we had caught both the beginning and the end of a stage by now, we wanted to next see the middle portion of a race. The best-looking candidate was the first King of the Mountain, located at the peak of a grueling climb up Trinity Grade. The steepness of the mountain would break up the peleton, giving us some drama, as well as a slower pace by the riders so we could see them more clearly. Neither of us had any idea how early we should get there, but since racing was at the top of our agenda, we got an early start and headed right there.

I'm glad that we did. Even though it would be a few hours before the riders came, several people had already staked out their spots along Trinity. I was tempted to join them, but from our careful examination of the race route (thank you, iPhone!), I knew that our best shot was to push on towards Cavedale. We arrived, pulled a little bit forward to park the car, and then had a short walk back to the KOM. An intermittent drizzle was keeping us cool as we settled in to wait.

It was a very different environment and crowd than the cities we'd been in before, but was probably even more entertaining. We watched in disbelief at the vehicles that were attempting to navigate the narrow, twisty mountain roads, and chatted with fellow spectators who were following the race. By now we were out of the weekend and out of the holiday, so casual fans had gone back to work and the dedicated ones remained. We talked with a photographer who had come down from Oregon to watch; others had come from as far as Denver or even Virginia. The ToC is really establishing itself, and it's very cool to see it becoming a real destination race.

Throughout the wait, riders regularly pedaled their way up the slopes. I was and remain very impressed. I have only limited experience with steep climbing, and am always thwarted in my attacks on Hicks Road, so I can really appreciate the great physical strength it takes to tackle these insanely steep roads.

The size of the crowd swelled, lining all parts of the road several layers deep. We had arrived early enough to land a prime position, on the outside of the sharp left turn at Cavedale. People were up on the slopes, climbing trees, even perching on top of a Winnebago. Eventually, they closed down the road, and then the only traffic we saw consisted of Tour vehicles and cyclists.

A Toyota van came by and handed out noisemakers and chalk. I inscribed my section of pavement with the sigil of the Illuminati. An SUV equipped with loudspeakers then pulled in - in a great and classy move, the Tour was sending announcers in advance of the riders. He filled us in on the story of the day - how Scott Nydam was making a solo attack, being chased by Jackson Stewart, also riding solo. Now, Dad and I were actually abreast of this (thank you, iPhone!), but almost nobody else would have known it. Anyways, it was just very generous of them, and helped keep the spectators pumped up and informed.

Scott eventually pulled up to a rousing set of cheers. There was some good theater going on - two runners, each carrying a California state flag, ran alongside him for the last fifty meters or so up to the KOM. With thunderous applause, he claimed the prize and pushed on. Later we would learn that he went on to win all the bonuses - both KOMs and both Sprints - although he would finally be caught before arriving in Sacramento.

There was plenty more racing to watch before that, though. We gave Jackson just as big a hand when he came through... what he was doing was every bit as difficult as Scott. After him came the mass of riders, then a few stragglers picking up the rear. After the broom wagon moved through, the party broke up and we headed back to the car.

I really enjoy driving in the mountains, and had an especially fun time coming down Cavedale. It's really a one-lane road that happens to have traffic coming in both directions. And is really twisty, steep, and has pavement in poor condition. Awesome driving! We swung back to Santa Rosa, where we refueled at a nifty little pizza place I found on Yelp called Rosso Pizzeria. It was pretty expensive, but REALLY tasty, a true gourmet California pizza place with unusual toppings made from local ingredients. I had a pizza with creamy roasted garlic, fresh mozarella, spring onions and caramelized onions; Dad took a meatier and even tastier pizza. We enjoyed a leisurely and peaceful meal before coming back to hit the road.

For variety's sake, I took an alternate route home suggested by Google that took us on 580 over and down the east side of the Bay. This included my first trip on the Richmond-San Rafael bridge, bringing my total number of crossed Bay-area bridges up to 3. We just flew down the bridge - granted, it was in the early afternoon so of course traffic was light, but I was still impressed. Compared with the Bay Bridge, which has five traffic lanes in each direction, this has only two. Also, I didn't see a tollbooth anywhere. Maybe it's all FastTrack-only? Anyways, it was cool to catch yet another part of the area. Our trip down 980 and 880 was uneventful, although we did get to appreciate the nice green Diablo hills.

Arriving back in San Jose in the middle afternoon, we had ample daylight left, and decided to hit the Museum of Art downtown. I hadn't been previously, so it was fun to finally get inside. I'm glad I went... it isn't a really impressive museum on the same order as SFMOMA or the Art Institute in Chicago, but still has a good collection of contemporary art that focuses on works by Californian artists. My favorite was probably a piece by a Los Angeles artist depicting a street corner in Santa Monica as seen from the air. There were also some really interesting pieces, including a video installation of a breathing rose and a foreboding photograph of row homes abutting a rail line.

There were two special exhibits running, organized around a common theme of sketches. The first, and for my money more interesting, was Goya's Caprichos. This was a collection of engravings he did, often featuring grotesque and disturbing images. Each was presented with commentary that gave different interpretations of the work. Many of the caprichos gave thinly-veiled criticism of the church, while others attacked royalty, attitudes towards women, child discipline, and more. The overall effect was quite dark, but I found it fascinating.

The second collection was of Picasso's love sketches. These were all non-representative drawings, generally of nude women, often in scenes of desire. It was cool to see another side of this incredibly versatile artist's output, but at the same time, they often felt dashed-off... the overall effect was a little bit like listening to a studio outtake from a favorite musician. It's cool to get more insight into how the creative mind works, but the piece doesn't stand on its own as well as the studio album.

And then, home! Tuesday was yet another relaxing evening. We capped off the Journey through Christopher's Freezer with some reheated French Onion Soup. That night I introduced Dad to the wonders of The IT Crowd. A lot.

Wednesday the race would run from Modesto to San Jose, but Dad's relatively early flight meant he wouldn't be able to catch the finish. The day was far from wasted, though. We both caught up on some of the sleep we'd missed earlier, had a leisurely breakfast of Swiss oatmeal, and headed out for a final walk. We went to the Don Edwards preserve, another bayfront park that I hadn't been to before. Evidently, this was the first urban refuge in the United States, and its facilities are quite nice. The five-mile walk we had our eyes set on, around the Slough, turned out to be a no-go... part of the trail was torn up for restoration. We took it for a mile or so, admiring both the pretty views and the shocking slag bordering the water. We picked up the Tidelands Trail for a loop back to headquarters.

In-n-Out isn't mandatory in the same way that Southern Kitchen is, but it's highly recommended for out-of-staters, and so I was happy that we got to hit one for lunch en route to the airport. I introduced Dad to fries Animal Style and to the hidden messages on the packaging. From there, it was a smooth and short drive to good old SJC, where I reluctantly put him on a plane back home. We're already thinking about future Tours.

Postscript: I did make it to downtown San Jose to catch the finish, and was happy to do so. The crowd wasn't as large or loud as in Santa Rosa, but again, considering this was a workday afternoon, I was impressed by the turnout. They did a great job of announcing the race on its way into town, and it was my best shot yet at getting close to the finish line. It had a dramatic finish, with Levi tailing another rider into town, winning second place for the stage and vaulting into the yellow jersey for the first time in 2008. We do love our stars, and Levi is an easy person to love. Let Levi ride!

Wednesday, February 13, 2008

What to Eat? It depends on whether you are a cat...

I won't even pretend that these two books are related at all, so I'll just jump into this post.

First of all, I recently wrapped up Michael Pollan's excellent In Defense of Food. I've blogged occasionally here about my growing nerdy obsession with food and cooking. This book acts as kind of a capstone to my gradual transformation into a Bay Area foodie: it reaffirms a lot of the habits that I've accidentally slipped into, gives me encouragement, and frees me from feeling like I need to worry about what I'm putting into my body. It does all this while presenting an occasionally funny but always strong criticism of "nutritionism," the modern tendency to focus on the invisible ingredients in our food that we don't understand.

Backing up a bit:

To date, the book that has had the biggest impact on the way I eat and how I think of food has been Marion Nestle's What to Eat. Like most people, prior to that book, my food information came from one of two sources. First came the explicit, though often confusing and contradictory, reports in the news. "Eggs are good for you!" "No, they're bad!" "Fat will kill you!" "Carbs are worse!" "You need more fiber!" "You need more Omega-3s!" "You need more beta-carotene!" I would read this, sort of shrug my shoulders, and go back to eating whatever I was before, not changing my habits but acquiring a nagging sense that I was doing stuff wrong.

The second source of food information comes from my family and friends, which tends to be more implicit and consistent. These lessons were more along the lines of, "Vegetables are good for you," "Don't eat too much dessert," "Don't drink alcohol." I followed these precepts (sometimes grudgingly) when living at home, later abandoned them, and find that they continue to define a part of how I feel like I "should" be eating.

Marion Nestle's book demystified... well, everything. Much of it probably counts as common sense, but for me and many other young people, that common sense needs to be learned again. I still think that her introduction should be required reading for all public schools. She explains how many calories is equal to a pound, how to healthily lose weight, why weight is important, and replaces the incomprehensible panoply of conflicting dietary guidelines with a brilliant, memorable, and effective mantra: "Eat less. Move more. Eat lots of fruits and vegetables." If you follow those three principles, everything else automatically falls into place.

Those few pages were great. The rest of the book was fascinating as well; her technique is to walk through a supermarket, with each chapter devoted to a typical aisle (breakfast cereal, juice and soda, baby products, etc.) and her analysis for how to navigate it effectively. It was all great stuff, and it had the ultimate effect of pushing me to follow her guidelines of shopping at the edges of the store - produce, meat, and dairy, far away from the processed prepackaged morass in the center.

That was just part of the story, though. Even before picking up the book, I'd started to patronize the Campbell farmer's market. At first I would pick up my lunch fruit and a few vegetables, along with the occasional pastry or fresh fish. They were replacing the canned foods that had been a sizeable part of my diet previously. Over time, though, a larger and larger slice of my dining has come from the market; increasingly I'm making mains out of their products, or growing the vegetable while shrinking the main. Best of all, this change isn't being driven by guilt or a well-defined drive to be healthy - it's because shopping the market is fun, interesting, and really tasty.

So, the progression in books from What to Eat to In Defense of Food seems to match my own personal progression. Without really noticing it, I'd been moving increasingly towards more locally grown fresh produce and spending increasing amounts of time preparing and cooking meals. It turns out that this was Pollan's plan all along!

Pollan has been writing for a while, but first rose to prominence with his recent book The Omnivore's Dilemma. In this book, he didn't just attack the typical American diet and fast food: he also swung his guns towards Whole Foods and the organic food movement, charging that organics have been subverted and are often more harmful than conventionally grown produce. How can this be? Compare a locally grown vegetable to some organic asparagus that was grown in Chile and flown to the US. The fuel involved offsets the environmental benefits of organic growth, while the mileage involved offsets any gains in taste. You are left with an expensive plant that makes you feel better without really doing anything for health or the environment.

The Omnivore's Dilemma caught people's attention, much like Nestle's earlier Food Politics; like Nestle, he was then confronted with a litany of people asking him, "Well, I see the problem, so tell me: what SHOULD I eat?" He did so, first in a New York Times Magazine article titled Unhappy Meals, and eventually in this book. As with Nestle, Pollan organizes his book around a simple mantra: "Eat food. Not too much. Mainly plants." ("Now, with 70% wordcount!") Their mutual affection seems clear when reading this book, but his background and aims are a bit different from her. Nestle is a talented nutritionist who has grown suspicious of her colleagues' obsessions. Pollan's background is in gardening and agriculture, and while Nestle is mainly interested in the link between food and health, he likes to look at the whole cycle: from soil to plant to animal to human to culture to planet. This means that, on the one hand, his book spends less time on the immediately practical question of what you should be eating. However, it also is more broadly interesting, and prompted me to think about some aspects that I had never considered before.

For example: in many studies of aboriginal populations, the absolute healthiest people belonged to cultures that primarily consumed meat, milk, and blood. We tend to think of modern food as being an unprecedented shift from traditional eating, but that "traditional eating" which started in the agricultural revolution of prehistoric times led to all sorts of health deficiencies that our species has only recently adapted to.

I'm distracting myself from the main point of his book, which is: the Western diet is killing us, and nutritionism is making it even worse. This isn't alarmist; rather, it is anti-alarmist. He goes through 150 years' worth of health claims and scientific studies, showing how we've been wrong every step of the way about which food components were good or bad. He also shows that, throughout this entire time, people who ate traditional diets of food (as opposed to "foodlike substances," my favorite phrase in this book) lived relatively long and healthy lives, while anyone pursuing contemporary nutritionist advice would sooner or later be confronted with an unpleasant reversal.

This argument is persuasive, and liberating for several reasons. First of all, like Nestle, he stresses that the big points (eating real food, minimally processed, from plants) are what you should focus on, while not being overly concerned about the dietary concern of the year - though, like Nestle, he does make an exception for trans fat, which is largely of our own creation - and, as they both point out, a food that for years was thought to be "healthy" by nutritionists. Even that, though, won't be a concern if you're mainly eating plants.

Secondly, he says that you should consider eating a traditional diet. Which one? It doesn't matter! Italian, Greek, Japanese, Mexican... as long as you're eating the way they've been eating for hundreds of years, you'll be fine. Cultures would not have survived and kept going if these diets were unhealthy. We may not currently understand why they're healthy - the French diet is often cited here - but the empirical evidence of millions of people over hundreds of thousands of years is far more compelling than any run-of-the-mill industry-funded study.

As Pollan points out, the context in which a meal is eaten - its culture, the way meals are paced, how a society relates to food (the French, for example, don't snack between meals and don't eat second helpings) - is just as, and maybe more, important than the meal itself. His book closes on a brilliant and powerful note, stressing that we've lost sight of the point - food is meant to be enjoyed and savored. I intend to do so.

I cruised through In Defense of Food, taking just under 48 hours from start to finish. It interrupted my progress through my latest Murakami journey, Sputnik Sweetheart. For some reason I'd been under the impression that this was his first novel, though I learned that was not so - he wrote it in 1999, long after his career began in the late 70's. This isn't a complaint, just an observation.

The book starts out rather slowly. Murakami is a beautiful writer even when nothing much is happening, and at times it felt like he was trying to prove that. He introduces us to his female protagonist, his male narrator, the female love interest, and the way in which they interact. It's all very languid, filled with wonderful analogies and long, drawn-out dialogs. While I enjoyed it, it didn't exactly possess a gripping narrative drive, and I felt free to put it aside for days at a time.

Things start cranking, but not until nearly the halfway point of the novel. There is finally some physical movement, the action jumps halfway around the world, and the narrative is broken up with some more innovative (though not original) devices. There was one particular point of the book where I got an intense burst of deja vu and a strong, creepy sense that I had read this before. I eventually realized that I had, only months earlier: the short story "Man-eating Cats" from Blind Willow Sleeping Woman contains an identical scene, and as the novel progressed, I realized that it was in many ways a reworking and extension of that story. This was far from obvious - again, I didn't make the connection until halfway through, but once I did it was impossible to ignore.

This gave me a better chance than I ever get to compare the short story as a form with the novel as a form. While crucial details about the plot are different, so much was shared that I could almost eliminate the story as such from comparison and look at how each worked.

To wit: the short story felt MUCH tighter and more compelling. He grabs your attention in the first few paragraphs with the same anecdote that eventually got my attention a hundred pages into Sputnik Sweetheart. The background that took those hundred pages to develop in Sputnik Sweetheart is condensed to about a page in "Man-eating Cats." What do we gain in those 99 pages? Mainly the pleasure of seeing a fine writer showing off: great turns of phrase, vivid scene-setting, ruminations on human nature and philosophy.

However, after we crossed that halfway point where the stories slid into sync and I could anticipate what would happen next, I was surprised to realize that I was actually finding the novel more interesting. While the short story was brief, it was not intimate. I didn't really feel connected with either of the main characters, and while watching what happened to them was interesting, I was reacting more to the events than the people. In Sputnik Sweetheart, just by virtue of spending more time with these characters, I had become invested in their lives and passion. As the stories moved along, I felt an extra layer of dread or excitement as I anticipated the twists that I knew were coming.

Hmmm... actually, a good analogy might be a movie adaptation of a Stephen King short story. Film-makers will add some stuff to flesh it out, and while a one-sentence summary of the plot will be identical to that of the printed version, the overall feel and message of the film may be very different.

After a while, the stories diverged again. The short story just ends, at a particularly lonely and jarring moment, while the novel pushes onwards. I hesitate to talk about "typical Murakami," but in "Man-eating Cats" I felt like Murakami's world was lurking in the background, silently pulling the strings and slowly unspooling this vaguely frightening situation. In Sputnik Sweetheart, that world actually becomes visible, and you can directly see some of the forces at work, even if you can't understand them.

The more I think about it, both works ultimately explore a theme of loneliness. This is probably more poetically expressed in Sputnik Sweetheart - I keep returning to the lovely, chilling mental image of our souls as satellites, orbiting the world, beeping out our feelings but receiving no warmth in return. In "Man-eating Cats," it is expressed more starkly... almost as if a rug is suddenly pulled away, revealing the vast gaping hole that lies underneath.

Altogether, I thought this was a fine book. I'm glad I read it after Blind Willow, Sleeping Woman - it's the mark of a great author that, when you read their stuff a second time (in whatever form) it becomes better. I'm still motivated to seek out one of his true early works. Judging from Wikipedia, Murakami's first novel available in the US was Pinball, 1973. (Available for just $400 on amazon.com!) The first one that seems fairly well known, though, is Hard-Boiled Wonderland and the End of the World, which as a bonus has an awesome title, so that may be the next one up. As usual, I want to take a break first - I feel like a kid in a candy store, and want to save some Murakami to treasure in the years to come.

Let's see, what else? Oh, let's jump to the semi-embarrassing confessions. You know that writer's strike that just finished? I'm blaming that for the fact that I've been watching Terminator: The Sarah Connor Chronicles. I've never been as into this franchise as my peers. I remember T2 being a huge deal in my youth, but there was no way I would actually see an R-rated movie. It was one of those weird things where I picked up on all the cultural impact of a movie - "Hasta la Vista Baby," the sunglasses, the idea of morphing - without seeing a single minute of it.

I wouldn't actually watch Terminator until the summer of 2001, when I did a promotional Blockbuster program that let me watch a ton of movies for practically nothing. Watching Terminator 1 and 2 almost back to back, I came to the startling realization that I might be the one person in the whole world who actually thinks that the first movie is better than the second. Why, you ask? First of all, they're very different movies, and the grim Philip K. Dick-esque view of the future we get in the first movie appeals to me more than the violent, high-octane acrobatics of the second one. I also thought that the plot in the original was really clever; the second one has a quite good plot for a sci-fi movie (I especially love the mental institution aspect), but didn't grab me in the same way. Finally, John Connor is just amazingly annoying in the second one. I tend to dislike child actors in general, but he especially bothered me.

I saw T3, and remember almost nothing about it. It was fine, but didn't stick in my head the way the first two did.

So why would I watch the series? Four words, two sentences. Summer Glau. Writer's Strike. Any questions?

My favorite things about the show:
  • Summer Glau
  • Music - love that theme
  • The way all authority and most morality is stripped away in light of the impending holocaust. For example, they beat up innocent people to steal their vehicles, and you cheer for them.
  • Surprisingly clever writing. "Is that nuclear?" "No. Not really." Cameron seems to get the best lines.
  • Have I mentioned Summer Glau?
My least favorite things:
  • Sarah Connor looks too young and isn't that great an actress.
  • After twenty years, they've broken that cool real-time chronology thing they had going.
  • After just a handful of episodes, I'm sick of hearing "You're not ready to fight!" "We need to fight!" They should stop complaining or just beat people up. Watching people bickering is not entertaining.
  • I feel like I'm watching a 1980's Magical Computer plot. "Oh no, where are they going?" "Hang on for five seconds while i hack into this computer! Okay, now I have a fancy map displaying everyone's exact location and identity!"
  • In general, not addressing the technology phobia that is at the heart of the franchise.
The biggest thing I'm ambivalent about: John Connor. A lot of people say that he's too whiny. I think this is true, but he also is about 800% less annoying than in T2, so I'm willing to cut him slack.

Lost has started back up again. I'm loving this season so far. I feel like after suffering through season 2, the creators have rewarded me for my patience and started giving me a good show again... the second half of the third season was some of the best to date, and so far the fourth looks like it may be even better. The deeper they move towards the mystical heart of the island and explaining its relationship with the world, the more excited I become.

House is going strong as well. Nothing yet has topped the great arc from the first half of the season, but the few episodes so far have been good. I'm regularly impressed at their ability to pull out new situations and diseases, even after four seasons on the air. The most memorable yet was one where the victim is a psychiatrist in Antarctica, and they have to communicate over a video hook-up. (Which, by the way: isn't there supposed to be a really long lag on those things?) It reminded me of the great episode last season where House diagnoses a plane full of sick passengers... he gets out of his environment and needs to use imperfect tools to examine a problem.

They're now saying that, thanks to the strike, we won't catch the second half of the new Battlestar Galactica season until 2009. Frack!

The strike has also moved me back into the habit of watching The Colbert Report and The Daily Show. These got shoved off my schedule after I added too many dramas, but now they've back and surprisingly entertaining. The Colbert Report has been particularly sharp. I also think his interviews have gotten much better than they were when I was regularly watching during the first season; or maybe I'm just more used to their awkwardness now; or maybe guests have gotten better at playing along. Anyways. They've helped me keep my sanity during the primary season, and while I'll probably dial down my viewing time, I'll need to remember to occasionally check in.

I'm letting two magazine lapse: Newsweek and the New York Review of Books. The former because it is shallow and reductive, the latter because it is way too long and compelling... if I read every review that looked interesting, I'd never have time to read any books. Both were freebies when I pledged to KQED/NPR last year, so I don't have any regrets about receiving them, but neither will I really miss them. (I probably will occasionally seek out the New York Review online.)

More media! How about games! I've kind of been looking forward to playing a new generation of PC games, but since I'm in the middle of some console stuff, it will need to wait a while. I did, however, download the free Valve pack for nVidia owners. It contains a few small things, including an extended demo of "Portal," which won some awards last year. I've been really surprised by how good this game is. It's the same kind of revelation I felt when I first played Half-Life in 1999. Up until that point, all first-person games (well, almost all) had been brain-dead twitchfests: you ran around, shot the demons, and got bigger guns. This had no appeal to me at all. With Half-Life, that technology was finally put in service of an actual game, with an actual plot. Moving away from a pure combat focus (you didn't even get your first, primitive weapon until several minutes into the game), the emphasis of that game was on exploring your environment, solving puzzles, and figuring out just what had happened that day in Black Mesa.

Portal continues that proud tradition of reclaiming the "game" portion of the FPS genre. In doing so, it may breathe fresh life into the benighted adventure game genre. The puzzles in that game felt far more real and interesting and, above all, rewarding than anything from the later years of Sierra. Even better, it has a surprisingly keen sense of humor.

On the console front, I'm making good progress through Final Fantasy XII. I took break for several weeks from the main plot, instead focusing on side-quests and hunting for marks. Tonight I finally picked back up the story with a jaunt to Giruvegan, and was pleasantly surprised by how much quicker and more fun this is than the struggle I was having before. I feel like I'm closing in on the endgame now.

After this is done, I want to check out the latest build of Fall from Heaven. Andrew's been tantalizing me with all the cool new stuff Kael and his friends have added... I can't wait to try it for myself. I'm thinking of repeating my original run as the Kuriotates, but maybe I'll finally take the plunge and try playing an Evil civ for a change. I must admit, the vampires sound fascinating.

Beyond that? As with books and movies, there are always more games that I want to play than I will be able to. I want Bioshock, and the Orange Box, and Oblivion, and Mass Effect. The best news of all: Spore finally has a release date - September 5th in Europe, September 7th here. For years they've held the line against rabid anticipation and held off on making any promises, so for once I feel optimistic about a highly desired release.

That's it for now! Oh, and I'll be taking in the first part of the Tour of California this holiday weekend - if you're interested in cycling and live in California, check it out! It's a great time.

Monday, February 11, 2008

The Hidden World of Title Text

I recently made a cool and unexpected discovery. For a while now I've been a big fan of XKCD, a webcomic of romance, sarcasm, math, and language. However, I just did not get last week's comic. It felt a little like reading a confusing Far Side, where I feel baffled, and also a bit frustrated with myself because I usually do "get" these comics.

When poking around online for an explanation, I discovered a forum post dedicated to this particular comic. This cleared up the joke for me, though I think this is one of the rare XKCDs where more complete art would have helped in the last panel. However, what caught my eye was a line below the image labeled "Alt text:". Could it be?!

Yes! I jumped back to the main XKCD side and hovered my mouse over the comic. Eureka! Up popped a lovely little tooltip with a little joke related to the comic! Intrigued, I started flipping through the archives. Sure enough, every single image in there had its own little additional hidden punchline. Sometimes this was even funnier than the main comic, which was great to begin with.

This is a really cool technique. I actually saw it about a year ago at Dinosaur Comics, but it's rare enough that I am not at all in the habit of hovering my mouse in the hopes of getting more text. Back in the days when I maintained my personal website, I did a similar thing, although I did it via the "alt" attribute (which is intended for screenreaders and the like) instead of the "title" attribute (which is intended to give contextual information, like these do). DC and XKCD are kindred spirit webcomics, so it feels great to share a common movement with them.

While I enjoyed my rejuvenated tour through the archives, I was disappointed to find that on some images, the whole tooltip wouldn't display. Instead, the end would be clipped off and only an ellipsis would show. I found that you could see the whole text only by choosing "View Source" and digging through the HTML, or right-clicking on the image, selecting "Properties", then expanding the size of the window so you could read the entire text. What a pain!

Firefox is really good about allowing users to adjust browser settings, so I thought that there might be an about:config option for this. No dice... browser.chrome.toolbar_tips controls whether the tips display, but there was no setting I could find that would expand the space available for the tooltip.

This seemed curious to me - surely I wasn't the only person who thought this was bad behavior? I started Googling, and before long my search brought me to the official bug report. As I read through it, my heart sank. I am a fervent believer in the virtues of the open source movement: greater transparency, better testing, higher-quality software, more responsive to user's input. What I was seeing on display was a travesty of how the process was supposed to work. For starters, the original bug (which focused on an older, but related, display problem) was filed back in 2000 - yes, Mozilla/Firefox has had this problem for almost eight years. Does not inspire much confidence, and is something I'll need to remember the next time I'm tempted to bash Microsoft for spending years to develop an inferior product. Even worse than that, though, was the vile, hurtful things that Firefox developers were writing in the comments. Some users were being rude as well, unfortunately, but their actions do not reflect badly on Firefox, while those of the programmers do.

I love open source. I enjoy using its products, but I also enjoy going through the source (tangent: for a fun time, grep the Linux kernel source for swear words - you'll be surprised by what's in there) to figure out how it works. I've also written and submitted patches before - it's a curiously exhilarating feeling to see a piece of code you've written take wings, join the contributions of dozens of other people, and be used by many as a free product. That said, after reading through these comments, I feel strongly disinclined to do anything for Firefox. If this is the way their developers conduct themselves, I have no desire to join their ranks.

I think the saddest thing was a post by Ryan North, the beloved (by me at least) author of Dinosaur Comics. Yes: he cared enough about his readers and this browser to seek out the problem, and in a friendly and pleasant way explain why he thought this problem is worth fixing. The result? A developer insulted his intelligence and swore at him.

So this is a sad tale for me. I feel a little like a free speech advocate at a KKK rally, or a war supporter touring central Baghdad. I still believe in the cause, but am dismayed by the actions carried out in my name.

This tale does have a glimmer of happiness at the end, though. After eight years of alternating silence and vitriol, the Firefox developers have accepted a patch that was contributed years ago and that fixes this seemingly simple problem. Of course there's a catch - the fix has only been made in Firefox 3, which won't be released for quite a long time. That means all of us users will need to suffer in silence, or live on the edge by running unstable, bleeding-edge versions of Firefox.

But wait! Where the official project fails, the community comes through. Thanks to a wonderful individual by the name of Xavier Robin, there is now a Firefox plugin to display long titles. Adding it is but the work of an instant (plus a browser restart) and when it is complete - poof! XKCD, Dinosaur Comics, and other citizens around the web will proudly speak to you, free from the confines of the official buggy Firefox program. So I guess there still is reason to have faith in open source. There are good developers out there in addition to talented developers, and their quality shines through.