Thursday, 11 February 2010

Dress rehearsals are over, let the games begin!


It's hard to believe it's been a year and a half since my experiences at the Beijing Olympics and it's curious to find myself in an Olympic city—not coincidentally, but largely due to circumstance—for the second consecutive time.

I wandered downtown today after collecting my event tickets, watching final preparations underway: people pressure-washing, filling flower beds, cleaning windows, and just generally putting the final touches on months (in some cases, years) of work. Traffic was sparse and the yellow-jacketed traffic officers, though numerous, were easily outnumbered by blue-jacketed volunteers.

Media coverage here has droned on and on about the lack of snow, the probability of rain, the chance of lasting debt, and fact that Vancouver hotels are not sold out. While I desperately wish the media would drop the cries for drama and focus more on news, I guess these are the normal concerns of any host: what if the party sucks? what if nobody comes? But downtown, people are just carrying on getting ready.

It's interesting to note how similar one Olympics is to the next. All the details have been tweaked but the structure and rhythms are the same. The accreditations are the same; the security screening tents are the same; the timelines and schedules are the same. This time it's my German language skills and European citizenship that are securing me tickets, but the collection procedures are the same. And of course there must be stacks of procedure manuals handed from one organizing committee to the next; it would be madness to re-invent it all. More than that, though, it's mostly the same people putting on every Olympic Games: I'm going out for drinks here with many of the people I knew in Beijing, and most are carrying on next to London or other big worldwide events.

I only began to sense the excitement and anticipation here at the end of last week (probably more than a month later than in China), but it's building now. And one major difference here is the number of free concerts and other events. The Richmond O-Zone, Heineken House, Atlantic Canada House, Ontario House, and Vancouver LiveCity sites are all high on my list for entertainment, but you can check out the City Caucus Free Events Guide for many other options.

The torch will be traveling around Vancouver on Thursday and Friday. Check out the route map if you want to catch a glimpse. If you'd like to advertise your willingness to help out the tourists, you can pick up Ask Me buttons in 24 languages at the Vancouver Public Library downtown.

And finally, a cleanly-organized resource I found helpful last time for up to date event schedules, competitor information, and medal counts is Google's Olympic portal.

Saturday, 30 January 2010

Easing compatibility with Grease

Photo by DarkSide, sxc.hu

In December, I gave a presentation on portability to the NYC Smalltalk group. Seaside now runs on at least seven different Smalltalk distributions. Given the lack of standardization, this is no minor feat; for Seaside’s developers, the need to keep code portable is always on our mind. As a result, we have gradually accumulated a set of tools, patterns, and conventions to help keep our code as portable as possible and to factor out code that needs to be implemented differently on each platform.

In our work on other projects, we found the same portability challenges came up over and over and we wanted to use the tools we had developed for Seaside to address them. So we began to split out the Seaside-specific functionality, allowing us to leverage the generic parts it in our other work. And thus Grease was born.

So what exactly is Grease?

  • Grease enhances the ANSI Smalltalk standard. With only a few exceptions, we assume platforms are fully ANSI-compliant. Platforms want to support Seaside and standardization makes this easier for the project’s developers and its porters.
  • Grease defines expected APIs with unit tests. Platforms can quickly determine if they are compatible and users can examine the tests to determine exactly which behaviours they can count on.
  • Grease takes a pragmatic approach to compatibility. Sometimes a method behaves so differently on two platforms, for example, that we are forced to avoid it or to standardize on a new selector. To get standard exception signaling on all platforms, Grease is forced to provide special exception classes that can be subclassed. Sometimes we need to put “right” aside and settle, instead, on a solution that can be implemented everywhere.
  • Grease tries to be concise and consistent. Despite its pragmatic approach, we still want to be “right” as much as possible. Because it’s hard to remove functionality once it has been added, we need to carefully consider each addition before proceeding. We’re moving slowly and looking for methods that are commonly used and that have clear names and semantics.
  • Grease does not try to solve all problems. We are not testing Sockets or HTTP clients. We don’t expect platforms to have standard SSL or graphics libraries. Its scope may grow over time, but for now we’re focusing on extending the functionality of the core classes defined in the ANSI standard (collections, exceptions, streams, blocks, etc.) and on other pieces of functionality that are critical to the Seaside project (e.g. random number generation and secure hashing).
  • Grease is widely adopted. Implementations exist already for all platforms that support Seaside 3.0. As well as Seaside, new versions of Magritte, Pier, and Monticello are already being implemented on top of Grease.

If you’re developing on Squeak or Pharo, you can also benefit from Slime, which uses the Refactoring Browser to find and, in some cases, rewrite common compatibility problems. Think of Grease as defining what you can write and Slime as defining what you can’t. It would be nice if Slime could be extended to other platforms, but their RB implementations are currently not compatible enough (a perfect target for Grease!).

Grease will continue to be part of the Seaside project and to be driven, for now, primarily by Seaside’s requirements. But we hope other projects will find it increasingly useful over time. Since each platform has already ported it, you may already be able to leverage it to provide increased consistency and portability for your applications. For the moment, consider Grease a prerelease and subject to major change; it will track Seaside releases for now, though I’m thinking of assigning independent version numbers to Grease releases to make things clearer.

The Grease packages can be found in the Seaside 3.0 repository or through your vendor's standard code distribution mechanism.

Monday, 25 January 2010

Happy Australia Day!

Sure it seems like January 25th to the rest of us, but in that upside-down land across the Pacific, it's already the 26th, the anniversary of the First Fleet's arrival in Sydney Cove in 1788. And that means barbecues, more beer than usual, and "back yard cricket" (don't ask—I never even got the rules of normal cricket).
While in Australia, I developed a soft spot for their national holiday and their stereotypically easy-going form of celebration (also for the Southern Cross, but that's another story). On top of that, several close friends have recently moved down under, so in honour of their first Australia Day, I thought I'd post a couple of "iconic" images from my collection (click the image above).
To all of you in Australia or with a bit of it in you, Happy Australia Day!

Sunday, 24 January 2010

Facebook time

I was poking through some of Seth Godin's eBook What Matters Now this afternoon (apparently, in my case, it didn't matter until 6 weeks later). I like this message from Howard Mann:
There are tens of thousands of businesses making many millions a year in profits that still haven’t ever heard of twitter, blogs or facebook. Are they all wrong? Have they missed out or is the joke really on us? They do business through personal relationships, by delivering great customer service and it’s working for them.
How much time are you spending with your customers?

Sunday, 17 January 2010

Chinese Feast


Last weekend, inspired I guess by a fancy gas stove and now long-glorified reminiscences of China, I decided to attempt a four-dish Chinese dinner. I have previously tried hand-pulled noodles and boiled dumplings, but this meal was all about the wok. Altogether, it took about three hours of washing, chopping, dicing, kneading, marinating, deep frying, boiling, and stir frying. Given that this is the sort of meal people eat in China on a regular basis, I can only hope that the process gets faster once you have the recipes internalized.

My companion through most of this was Yan-kit's Classic Chinese Cookbook by Yan-kit So, which I once read is the best overall Chinese cookbook out there. It has a very helpful section at the beginning that illustrates all the ingredients, the different ways to chop them, how to stir fry them, and so on.

I decided to try out my new f/1.8 50mm prime lens to capture the results but, as the depth of field was even shallower than I expected, the focus in many of the images just didn't work out. The images here are the few that were passable.

The menu was as follows:

Scallion Cakes (蔥油餅, cōngyóubǐng "scallion oil biscuits") are apparently a common street food across China, though I don't specifically recall seeing them. A simple dough is rolled flat then topped with salt, scallions (green onion), and lard or margarine. The whole thing is rolled up, twisted, and then flattened to form a thick, filled pancake which gets fried in a skillet. The end result was pretty satisfactory, though I would have liked a bit more salt, and they tasted even better out of the fridge the next day. Page 178.

Dry-fried Four-season Beans (干煸四季豆, gānbiān sìjìdòu) is a typical Sichuan dish that really lets the crispy green beans shine. The beans were first deep-fried before being stir-fried with the rest of the ingredients. I left the preserved vegetable out because I didn't have it and the dried shrimp because I was feeding a vegetarian. Still, it was delicious. Most people have a fear of deep-frying, but it's actually pretty straightforward and not too greasy if the oil is hot enough. Page 220.

Kung Pao Tofu (宫爆豆腐, gōngbào dòufu) is a variation on the well-known Sichuan spicy chicken and peanut dish, simply replacing the meat with deep-fried cubes of tofu. We ate this quite often in Beijing and, although I've made it a couple of times, I find the result tastes too strongly of soy sauce. I'm not sure yet if I just don't like the particular recipe, if it's a result of not having quite the right ingredients, or if the tofu simply soaks up a lot more of the marinade than the chicken would. You can buy packaged deep-fried tofu in some stores to save deep-frying it yourself. Page 102.

Di San Xian (地三鲜, dìsānxiān "Earth three fresh")—a mixture of twice-fried potato, eggplant, and green pepper—was one of our favourite dishes in China. The cookbook doesn't have a recipe so I used this one and the result was delicious and very authentic.

For those in Vancouver looking for an easier alternative, I ate last night at the Golden Sichuan Restaurant on No. 3 Road in Richmond. This place was recommended to me years ago by Chinese colleagues but I never made it out there until now. We had the dry-fried beans, a mushroom and pork dish, and some pork and green onion dumplings. All were delicious. The restaurant's Chinese name, 老四川, and its translation are interesting. The last two characters 四 (, four) and 川 (chuān, river) form the name of the Sichuan (or Szechuan) province. The first character 老 (lǎo), means literally "old" or "revered" but can also be used as a prefix to indicate affection, much like you could use "my old man" to refer to your father in English. It's also the first character in, e.g. 老家 (lǎojiā, place of origin), 老师 (lǎoshī, teacher), and 老外 (lǎowài, foreigner). You overhear that last one a lot as you walk around China.

Wednesday, 13 January 2010

Google re-evaluating its position in China

Google made an interesting announcement today about their approach to doing business in China. Apparently they intend to take a stand again and stop censoring the results on google.cn, even if this means they are prevented from conducting business in the country. I think the unstated message is that Google believes the "attacks and the surveillance they have uncovered" were conducted from within the Chinese government and this has prompted their change in stance (or at least, I can't follow the logic of the article any other way).

Somehow I don't see the Chinese government doing anything more than shrugging its figurative shoulders, but it will be interesting to see what, if anything, is the fallout.

Sunday, 27 December 2009

Boston Roundup

First off, just to get this out of the way, Hyatt Regency Boston: nice enough hotel but 50c/min for internet? They do realize that works out to $30/hr right?! I mean... heck, I'm speechless. And I can't decide which is worse, that or the $36/day for parking. Luckily I didn't have a car.
From Boston '09 (Steven Noble)
I was in Boston a few weeks ago to take Product Management training (happy to report I passed the certification!). An old friend of mine came down from Ontario and we took in the town for the weekend. We spent much of Saturday wandering around Cambridge and then walked the Freedom Trail back through the North End, Boston's fabulous Little Italy.
The financial district had a nice sense of scale, not unlike downtown Vancouver (if you ignore the West End) or maybe... Perth? And Boston Commons is a perfect feature in the heart of downtown; it's nowhere near the size of, say, Central Park or Stanley Park but is one of the nicest city parks I've seen.
Overall, I liked the feel of Boston, and the snow and drizzle failed to dampen our spirits. I have to confess that I found Cambridge pretty uninspiring, though. I expected Harvard and MIT to exude a sense of history and achievement—like the colleges in Cambridge, England or even Trinity College in downtown Dublin—but they felt like little more than a collection of oldish buildings. Maybe the preponderance of brick as a building material simply fails to impress.
On Sunday night, I went for dinner with Carl Gundel and Chris Norton, two Boston-area one-time Squeakers. As in Vienna, I presented a convenient excuse for Smalltalkers who hadn't crossed paths in years to get together. We had some interesting discussions and hopefully reignited the Smalltalk spark in Chris.
Kudos to Yelp for the recommendation of Bar Lola and to Zagat for the pointer to delicious Italian food and friendly service at Carmen. Oh, and I loved the Equal Exchange Cafe — wish it was in Vancouver.
As usual, click any of the photos above to see the others I posted. Or check out Steven's photos from the trip.