Archive for December, 2004

Puerco Pibil

Sunday, December 26th, 2004

If you’ve been following my Flickr photos for the past few months, you might have noticed that I’ve become something of a foodie of late. A lot of things contributed to this: living in the restaurant mecca known as San Francisco, the great meal I had at Thomas Keller’s Bouchon in Las Vegas, the fact that I now hang around with people who really love to cook and have taught me a lot about food and wine. But if I really had to trace my culinary awakening back to its origin, I’d have to point to a special feature on the Once Upon a Time in Mexico DVD, in which director Robert Rodriguez hosts a “ten minute cooking school” instructing viewers in the preparation of Puerco Pibil (a Mexican slow-cooked pork dish seen throughout the film).

Now, I was fairly unimpressed with Once Upon a Time in Mexico, and, truth be told, I think Rodriguez is a fantastically cool guy, but not really a great filmmaker. Still, his comments about how one really can’t be a well-rounded person without knowing how to cook at least a few things well really hit home with me, and I resolved to remedy my deficiences in the kitchen. Since I’ve always had a special place in my heart for Mexican and Latin American cuisine, making a batch of Puerco Pibil seemed like just the project for me.

Unfortunately, while I did eventually take to the kitchen in a big way (as evidenced by the ambitious meal I cooked for my family’s Thanksgiving dinner), the long prep time for slow-cooked pork always prevented me from getting it together. That is, until just before Christmas, when my parents and I decided to supplement our traditional Christmas tamale feast with a little something extra. A quick trip to the butcher and Denver’s wonderful Citizen-Smith Spice House (which I found by querying Google with “annato seeds denver”), and a fantastic Mexican Christmas dinner was underway.

The result? Well, at the risk of sounding immodest, I believe it was the first thing I’ve ever cooked that I consider an almost unqualified success. The pork was extremely tender and stringy (which is exactly what I love about Mexican pork dishes), and had just the right amount of spiciness (glad I didn’t decide to put a third habañero pepper in!). I almost couldn’t believe I had made it, it was so tasty. The ultimate affirmation, though, was that I had planned to eat the leftovers for dinner tonight, but was disappointed to find that my Dad had beaten me to it.

Being a complete geek, I also decided to document the whole process and post a tutorial on Flickr. Try it out sometime if you’re feeling culinary—it’s actually pretty easy, and will seriously increase your faith in your abilities as a cook.

The Aviator

Saturday, December 25th, 2004

It’s been a long time since I felt strongly enough about a movie to write about it here, but I think The Aviator, which opens nationally today, deserves praise as the best movie I’ve seen in a very long time (warning: mild spoilers ahead). I’d always thought of Howard Hughes only as a paranoid, germaphobic madman who built a ridiculously large wooden plane, but I walked out of Scorcese’s beautifully crafted movie with a new sense of awe at his life and a profound admiration for his accomplishments.

Ever since I became aware of Robert McKee through Adaptation (another one of my absolute favorite movies, by the way), I’ve had a fascination with story structure, particularly as it is brought to bear in adapting non-fiction. I can’t speak for him, of course, but I think McKee would nod approvingly at the way screenwriter John Logan hammered parts of Hughes’ biography into a well-constructed arc, beginning with his arrival in Hollywood as an unknown outsider, continuing through his amazing successes in both aviation and film, following his descent into darkness after a near-deadly plane crash, and finally climaxing with his victory in a congressional hearing meant to destroy him (but wisely ending well before his permanent descent into mental illness).

As incredible as the story is, though, it’s ultimately the acting that sells it, and Leonardo DiCaprio (as much as I always want to hate him) lends Hughes an impressive amount of charisma and panache. You simply can’t not like him. Cate Blanchett also delivers a jaw-dropping performance as Katherine Hepburn—I was practically gasping for breath right along with Hughes during a scene in which the two play a friendly game of golf (and marveling at her perfect Yankee accent—no mean feat for an Australian actress).

It’s a shame Hughes’ memory is marred by the eccentricities of his later life, because I think he should really be remembered as a true pioneer in the two most glamorous industries of his time. I suppose in a way you could say he was the Steve Jobs of his day: his success in two different industries, his perfectionistic demands for straighter rivets on a prototype plane, his detailed involvement with the decor of TWA planes, and his David vs. Goliath rivalry with Pan Am’s Juan Trippe (think Bill Gates with fashion sense) are a few of the parallels the movie offers.

The picture’s only downfall might be it’s length, and there are certainly a few lulls, but they’re evils necessary to the telling of a story as big as The Aviator. If you’re looking for something to do after opening your Christmas presents, I highly recommend checking it out.

Data Structures as Culture

Saturday, December 25th, 2004

One of my friends (and former co-workers) just got back from the great Pacific Northwest, where he was interviewed for (and ultimately offered) a position with Microsoft’s Longhorn team. Being someone who conducts a fair number of interviews these days, as well as someone who has suffered through the terror of technical interviews on the other side of the table, I was naturally very curious about the whole affair.

The one thing that really stuck out in his account was that nearly every coding question he was asked was some sort of tree problem. Now, I do realize that tree questions are extremely common in job interviews (and that their prevalence could have had something to do with the specific job he was interviewing for), but this overwhelming emphasis on one particular data structure in two days of interviews reminded me of something I’ve noticed about Apple: for a great many people there, the hashtable seems to be something of a pet data structure. One can certainly see this in Cocoa, with its frequent use of NSDictionary objects to pass data around, and I and many other people I know have been subjected to grillings about the characteristics and implementations of hashtables in Apple interviews.

Being a person who loves to extrapolate grand cultural critical theories from probably inconsequential observations like this, I’m very tempted to ponder what this says about the two organizations’ values. My pet theory? That Microsoft emphasizes tree problems because their culture puts a high value on the kind of mental gymnastics often necessary to solve such problems, while Apple emphasizes hashtables because its aesthetically-oriented culture prizes their combination of zen-like simplicity and seemingly impossible speed. This is a broad generalization, of course (I’m sure people ask hashtable questions at Microsoft, just as people ask tree questions at Apple), but I still think it’s an interesting theory.

Cocoalicious 1.0b30

Thursday, December 23rd, 2004

Last night’s bindings debacle got me thinking that it really has been too long since a new version of Cocoalicious was released, and since some of the things we’re working on (the bindings conversion and full text search in particular) are going to take longer than I had initially hoped, I decided it was time to push b30 out the door.

This version is, I think, a very solid upgrade, with a new toolbar, AppleScript support, capture of text selection in Safari as new post extended text, a hideable web preview pane, and some other assorted improvements. Hopefully this will tide everyone over until we can get that monster full-text search feature shippable.

Beatle Overload

Thursday, December 23rd, 2004

I got an email from my web host today alerting me that I used 25 GB of bandwidth yesterday, which is unfortunate because my monthly allowance is only 144 GB. At my current rate, I’ll be at 335% of my allowance by the end of this billing cycle. So, I’ve reluctantly had to remove the Beatles Christmas MP3s until I can figure out a way to continue providing that service without breaking the bank. If anybody would like to host a mirror, let me know!

In Bindings Hell

Thursday, December 23rd, 2004

I’m trying to like Cocoa Bindings. I really am. But I’ve spent a lot of time today trying to convert Cocoalicious’ table management code to use bindings, and I’m really beginning to wonder if it’s worth the effort. As far as I can tell, here is what I have to do:

  1. Create a custom NSArrayController subclass. This is necessary because I want to do custom filtering (tags and searches). This is accomplished by adding instance variables to hold the current tag filter and search (along with appropriate accessors), and then overriding the arrangeObjects: method to perform the actual searching and return a filtered array.
  2. In Interface Builder, create an instance of this custom array controller.
  3. Add an instance variable to my application delegate to hold a reference to the array controller instance created in step 2, and then hook it up in IB.
  4. In Interface Builder, bind the post table’s columns’ “value” bindings to the array controller I created in step 2, using the appropriate model key path for each column, taking care, of course, that my model class is KVC compliant for those keys.
  5. In Interface Builder, bind the array controller’s “contentArray” binding to the nib’s File’s Owner (NSApplication), specifying as the model key path the key for the array instance variable in my application delegate.
  6. In my application delegate, implement application:delegateHandlesKey: and return yes for the model key path specified in step 4.
  7. Make sure that my application delegate is now fully to-many KVO compliant for the key specified in step 4. This means implementing, in addition to the standard accessor methods: countOfX, indexOfObjectInX:, valueInXAtIndex:, objectInXAtIndex:, insertInX:, and removeFromXAtIndex:. Admittedly, I’m still a bit uncertain about whether this step was necessary, but the app crashed with a “not KVC compliant” message until I implemented them.
  8. I now have to make sure that updated lists of posts that come up from my lower-level del.icio.us API are noticed by the array controller, which means I have to empty the existing post array every time the list is refreshed (which is not a simple task since NSArrayController provides no way to simply flush the current array) and refill it through my NSArrayController instance’s various “addObject:” methods. This is in contrast to my old method of simply releasing and replacing the model array for every refresh.

I’m not even sure if that’s a comprehensive or even correct list, because after a day of fiddling around with this, I still don’t have my table view displaying data. I can tell that my custom “arrangeObjects:” method is returning the correct list, but for some reason when “arrangedObjects” is then getting called to populate the table, it’s returning an empty array. I’m sure I’m missing something that I’m supposed to implement somewhere.

My point in relating all of this isn’t to diss Cocoa Bindings, which I find very elegant and still want very much to work with. I’m writing both to ask if anyone knows where I’m going wrong, and to see if anyone can explain to me why all of this is so much better than hooking up a table’s data source outlet and implementing three simple delegate methods. What do I gain by using bindings in this situation, aside from an app that uses bindings?

Bindings & Table Data Sources

Saturday, December 18th, 2004

So, I once again attempted to make use of Cocoa Bindings this morning, and once again ended up frustrated and annoyed. My goal this time was to get column sorting working in Cocoalicious, and to have the current sort state persist through the defaults even after the app is quit. I hated writing the code for that in PodWorks, and thought that I could save myself a lot of trouble by binding my table view’s sort descriptors to the shared user defaults controller. I got this working using an NSUnarchiveFromData value transformer (since the NSSortDescriptor objects need to be archived as data to be stored in the defaults system), and was quite pleased until I discovered that the post table no longer displayed any data.

A little investigation revealed why: the table’s “objectValueForTableColumn:” data source method appears not to be getting called. I looked in Interface Builder to see if the data source was still properly connected to the table, and it looked to have been unset, so I re-connected it. After rebuilding and launching again, though, the data source was still not getting called.

I have to say I’m a bit confused by this. Is this expected behavior? Does using any binding on a table view, even one unrelated to the table’s actual data, actually cause the data source to be ignored, or am I doing something wrong (or is this a bug)? I really hope so, because I’d rather not be forced to convert all of my table management code to use bindings yet.

My Beatles Meme

Wednesday, December 15th, 2004

It’s actually the oldest extant page on my site, and I’ve pointed it out before, but since it’s recently made Boing Boing, the J-Walk Blog, del.icio.us popular links, the Waxy.org Links, and a staggering number of other weblogs, I guess it’s safe to finally declare my Beatles Christmas Records page a full-fledged Interweb meme. If you’ve never listened to these MP3s, which I made from my old boss’s fan club records, I highly recommend checking them out. They’re utterly irreverent and absolutely hilarious—a perfect antidote to Christmas music burnout.

Happy Krimble

Wednesday, December 15th, 2004

Well, once again Christmas is upon us, and here at Sci-Fi Hi-Fi, that can only mean one thing: it’s time to give my collection of Beatles Christmas MP3s their yearly playing! This year should be extra special, however, because (thanks to the generosity of reader Tony Deluca) I’ve finally been able to add the 1968 and 1969 editions to my collection. If you’ve already downloaded the 1963-1967 recordings from me, make sure to visit my updated Beatles page and complete your set. If you haven’t heard them yet, check them out—they’re hilarious!

Cocoalicious Sample Scripts

Tuesday, December 14th, 2004

I realize that this is only taunting those of you non-CVS people waiting for the next release, but I thought I’d point out that Armin Briegel has posted some sample scripts demonstrating his Cocoalicious AppleScript support. From the looks of it, querying your del.icio.us bookmarks through AppleScript should now be quite simple, thanks to Armin’s pervasive support for the “where” clause. Bulk imports should also be child’s play thanks to the “make new post with properties” command. Once again, three cheers for Armin: top notch work, old boy!