Archive for June, 2005

PodWorks 2.8.4 Released

Wednesday, June 29th, 2005

I have to confess, it’s been way too long since PodWorks saw an update. Well over a year, in fact. Part of this is due to my work on Cocoalicious, which consumes most of my non-work programming time; part of it is due to the fact that I consider PodWorks to be fairly mature and not really in need of a whole lot of bling-bling new features; and part of it is due to the fact that it’s been a long time since an iTunes update broke my database parser.

This streak ended with yesterday’s release of iTunes 4.9. The new iPod database format contains a new record type somehow related to podcasting, and it caused my parser to go off the rails. Fortunately, it was an easy fix, and I posted a new release this morning. If you use PodWorks, you’ll definitely want to download it.

The good news is that I didn’t need to do any additional work to add podcast support to PodWorks. The “Podcasts” list simply shows up as a playlist in the drawer, and the files within it can be accessed just like any other songs on the iPod.

Now, of course, I’m a bit curious what those new record types are for. Time to break out the old hex editor…

Job Posting: Mac OS X Crash Reporting Engineer

Tuesday, June 28th, 2005

Req. ID: 2347376 - Mac OS X Crash Reporting Engineer

The above position is with my friend Jon Barbero’s team, working on the Mac OS X crash reporting back end. If you think you might be a good fit, drop us a line (perhaps with a link to a resumé or CV) in the comments or by email (my first name at this domain)!

Name that Research Project…

Monday, June 27th, 2005

Andrew Pontious over at Helpful Tiger recently posted about a piece of software he’d like to see: an application that would scan emails (and possibly other text) and automatically pull out addresses and other contact information. This seems like a good idea to me–so good, in fact, that I could swear I remember hearing it before. Does anyone else recall there being some sort of Apple research project back in the (pre-Steve Jobs return) day that was doing something similar? Apple text filters, or something like that?

I swear it rings a bell, but maybe it’s just my own version of Roo Puffs

(Update: Daniel Wilson has it: Apple Data Detectors. There’s still an SDK for it and everything, evidently!)

How to Resize an NSImage

Saturday, June 25th, 2005

I decided to take a break from my normal rock and roll lifestyle (ha!) this evening to get some work done on Cocoalicious, with an eye toward doing a new release sometime next week. Specifically, I’ve been working on integrating and tweaking Eric Blair’s lovely favicon support patch.

In the course of polishing the favicon support, it occurred to me that we could improve performance a lot by pre-sizing the cached version of each favicon on download, instead of always resizing them on display (as it turns out, favicons in the wild come in all kinds of sizes). So I set to work changing the code to do just that, only to run up against a lot of confusion about just how to resize an image using NSImage.

At first glance it seems like the task is fairly straightforward. NSImage has a method called setSize, which the documentation says “sets the width and height of the image.” It seems like one should be able to simply read the data into the image, set its size, get the TIFF representation, and write that to disk.

Not so. As it turns out, setSize() only specifies how the image is displayed when it’s drawn–it does nothing to the underlying data. The most straightforward way to actually resize the data is to create another NSImage with the new size, lock focus on it, draw the source image into the new image, and then get the TIFF representation of the new, scaled image.

This may be obvious to some, but it certainly wasn’t to me, and I had trouble finding illuminating examples or explanations through Google, so I thought I’d post my code here to help anyone else who is similarly befuddled. If anyone has anything interesting to add on the subject, do let us know in the comments…

NSData *sourceData ... // Get your data from a file, URL, etc.
float resizeWidth = 13.0;
float resizeHeight = 13.0;

NSImage *sourceImage = [[NSImage alloc] initWithData: sourceData];
NSImage *resizedImage = [[NSImage alloc] initWithSize: NSMakeSize(resizeWidth, resizeHeight)];

NSSize originalSize = [sourceImage size];

[resizedImage lockFocus];
[sourceImage drawInRect: NSMakeRect(0, 0, resizeWidth, resizeHeight) fromRect: NSMakeRect(0, 0, originalSize.width, originalSize.height) operation: NSCompositeSourceOver fraction: 1.0];
[resizedImage unlockFocus];

NSData *resizedData = [resizedImage TIFFRepresentation];

[sourceImage release];
[resizedImage release];

Why You Should Check Out Odeo

Tuesday, June 21st, 2005

I want to take a moment to congratulate Evan Williams, Noah Glass, Rabble, and the rest on the launch of their new podcasting service, Odeo. I was fortunate enough to have gotten an early demo of their work, and I remain excited about it despite the recent entry of a certain larger player into their market (opinions here are my own, by the way). Here’s why:

  • They’re working at the forefront of a really interesting space (at least to me): hybrid web/desktop applications. What they’ve created is mostly a web app, but it also has a desktop component that gets your podcast queue into iTunes. I think combinations like that are going to be increasingly common, and it will be interesting to see how web services like Odeo experiment with desktop integration.
  • They’re very strong on the content creation side, and their whole goal is to make podcast publishing as uncomplicated as weblog publishing. Essentially, they’re trying to do for podcasting what Blogger did for weblogging: provide a simple, lowest common denominator, cross-platform publishing mechanism. To this end, they’ve built a recording studio that actually runs right in the browser and streams right to their server. I kid you not.
  • They’ve also got some other intriguing ideas that I think could eventually make their service very attractive to content creators, but I’m not sure I’m allowed to mention them here (I’m perhaps a little too well trained in the “loose lips sink ships” department).
  • The people who run it are really cool. Ev and Noah are both entrepreneurs in the best sense of the word: they’re adventurous, agile, very open to new ideas, and willing to take a very public approach to product development. For this reason, I expect to see Odeo change quickly as the medium evolves (Rabble’s post today seems to confirm this).

It may seem like Apple’s announcement of podcasting support in iTunes 4.9 makes them a competitor, but my hope (without knowing much about the implementation) is that it will actually make things easier for Odeo and allow them to concentrate on their core strengths. I’ll certainly be interested to see how things develop once iTunes 4.9 is out and Odeo has expanded beyond the initial round of invites!

WWDC 2005 Weblogger Dinner: Wrap Up

Sunday, June 19th, 2005



Three RSS Amigos

Originally uploaded by x180.

What can I say about WWDC this year? It was, in a word, intense!

Even though the weblogger dinner seemed to be attracting a lot of RSVPs, I don’t think I ever believed that 80 people were really going to show up until the last minute. I’m not sure exactly how many ended up attending, but as you can see from James Duncan Davidson’s great photos (thanks a million Duncan!), our space upstairs at The Thirsty Bear was pretty full at times.

Overall, I’m extremely happy with the way the event went, and I’m pleased that I was able to correct some of the mistakes I felt I made with last year’s dinner. Unlike our original space at Bucca di Beppo, the open room at The Thirsty Bear allowed everyone to circulate and talk to a variety of people, which I think made a huge difference. The food was also orders of magnitude better.

I think I’m most proud of the diversity of the crowd. Last year’s dinner was mostly Apple people and indie developers (read: people a lot like me), but this year I intentionally tried to bring some interesting outside influences in. I think it was really great to see the Mac dev crowd mix with the web crowd, large company developers mix with indie developers, and Apple employees mix with everyone else.

My personal highlights included putting together the above RSS aggregator developer group photo, watching Dan Wood and Terrence Talbot demo Sandvox to a very receptive audience, having a very long and enjoyable chat with a guy who turned out to be Marc Liyanage (when I found out who he was, I gushed about how I used to use his PHP and MySQL installers all the time), seeing Martin Pittenauer’s awesome Steve Jobs as Che Guevara shirt, talking so much that my voice just about gave out, watching Merlin Mann work the room, introducing lots of people, and generally seeing everyone have fun. My only real regret is that there were people who showed up that I didn’t get to talk to (and plenty of people I wanted to spend longer talking to than I did).

The other downside was the money, which, despite the fact that many people generously contributed far more than their fair share, still came up about $500 short. I hate dealing with the money part of the event, so normally I wouldn’t mention it, but since a number of people have asked, the DropCash campaign is still accepting contributions. Next year I think I may explore other ways of structuring the event to make the money part of it less of an issue.

All of that unpleasantness aside, though, I had a wonderful time, and I sincerely thank everyone for coming. I hope to see you all again next year!

More Flickr Synchronicity

Sunday, June 12th, 2005

I just remembered that I have an even better example of Flickr synchronicity that I amazingly neglected to mention in my previous post on the subject.

As some of you may remember, back when I used Blosxom I spent a chunk of time developing a Blosxom photo gallery plugin called Pixom. When I started working on Pixom, I spent some time looking at prior art, and discovered that a New Yorker named DeWitt Clinton had already developed a plugin called photogallery. I ended up borrowing a lot from his approach, but adding things like on-board EXIF parsing. Because I thought he was a smart guy, I started reading his weblog.

Before long, DeWitt moved to San Francisco to work for A9, and I followed his apartment hunt with great interest, since I was about to go through a similar search moving from Cupertino up to the city.

When DeWitt started using Flickr, he and I added each other as contacts and started following each other’s photos. Eventually, I posted a photo of the, shall we say, distinctive view out my back window, as well as several from my building’s roof. A little while later, I got an email from DeWitt asking me if I was aware that he lived right above me. As it turns out, he has nearly the same view from his window, one floor above, and based on my Flickr photos he was able to determine that we were, in fact, neighbors!

I finally met DeWitt for the first time today, at our building’s rooftop party for the Haight Street Fair. It was pretty crazy sitting there on the roof talking to this guy whose weblog I had found through a Google search back when he lived on the other side of the country. I guess sometimes this social software stuff really does work–score another one for Flickr world glue!

I, for one, welcome our new little endian overlords

Saturday, June 11th, 2005



Cocoalicious on Intel

Originally uploaded by ldandersen.

As people who follow my Flickr photos have already seen, I spent some time at the WWDC Intel lab this week, creating universal binaries of PodWorks and Cocoalicious. Since people have expressed some curiosity about how it went, I thought I’d do a quick writeup on the subject.

Doing Cocoalicious was dead simple. It doesn’t rely on any embedded frameworks or other libraries that don’t ship with the system, and all of its networking code is handled by Web Foundation (which means endinanness is not something it really has to concern itself with), so getting it working was literally a matter of checking the little “Intel” box in Xcode.

PodWorks was a bit tricker. First of all, like NetNewsWire, it relies on several frameworks embedded within the app bundle, both of which need to be built as universal binaries before PodWorks itself can (this actually only caused build problems, most of which only happened because I was trying to get the projects set up on an unfamiliar machine with a new version of Xcode). Second, it statically links eSellerate’s serial number validation library, which is currently only distributed as a built PowerPC binary. This meant I had to strip out the serial number code before I could get it to build. Third, though I swore up and down to people that PodWorks uses NSSwapShortToHost to reverse the byte order of the iPod database’s little endian strings, I was in fact using NSSwapShort instead, meaning (rather embarrassingly ) that I was depending on the host processor being big endian.

As bad as all of that sounds, they’re still (mostly) fairly minor problems that I was able to resolve while sitting there in the lab with people looking over my shoulder, so I think my experience bodes well for 90% of the Mac developers out there. I’m with James Duncan Davidson and Brent Simmons in calling for Steve to bring the Intel based Macs on!

Congratulations Eric!

Saturday, June 11th, 2005

The first person I ever got to know at Apple was a really smart guy named Eric Albert. I read his weblog back when I was an Apple-obsessed Java developer in Colorado, eventually he started reading mine, and when I started interviewing for my current job, Eric helped me a lot by explaining how the Apple interview process works and what I should expect.

When I finally got to California, Eric and I would do lunch occasionally and talk shop. The only problem was, it tended to be a bit of a one-sided conversation. I would tell Eric about how the latest OS update was going and so on, and he would tell me…not much. Eric was unusually secretive about his work–even by Apple standards.

More recently, though, Eric started talking optimistically about his super secret project actually shipping. My co-workers and I thought we had a pretty good idea what he was working on (based on his background and the kinds of bugs he tended to file), but we all had a fun time coming up with wild, rumor site-grade theories about what it would actually be used for.

Then, last weekend, while I was hanging out in Los Angeles, I woke up to find CNet’s scoop on Apple’s Intel switch in my del.icio.us links, and I immediately knew that Eric’s long hours at work recently were about to pay off.

Yes, it’s true: Eric is one of those mysterious people Steve Jobs mentioned in the keynote–the people who have been secreted away making sure OS X works on Intel. Now that the truth can be revealed, I think Eric and the rest of his team deserve a hearty round of applause–both for doing a lot to improve the long term prospects of the Mac platform, and ensuring that what could have been a nasty transition will likely be almost transparent (he even spent a lot of time enthusiastically helping developers port their apps in the Intel lab at WWDC, as the screenshots I posted to Flickr attest).

Nice work Eric–enjoy your vacation!

A Flickr Moment at WWDC

Saturday, June 11th, 2005

One of the things that always amazes me about Flickr is the number “small world” coincidences I’ve encountered while using it.

For example, a little while ago, I posted a photo of St. Ignatius Church here in San Francisco, and remarked in the caption that “If [the fairly obscure British band] The Clientele ever hold an album cover competition, this will be my entry.” Not long after that, a woman who evidently is a friend of the band added it as a favorite. Another time, I posted a photo from a Doves show I saw at SXSW this year, and got comments from someone else who had attended the show and someone else who had been a stagehand. And yet another time, I posted some photos I took during a completely spur of the moment trip to Las Vegas, only to discover through Flickr that Mike Merrill from Panic was there at the same time.

Now, I was browsing through my friend Mike Smochko’s photos on Flickr and noticed that he had posted a photo he took from high up on a balcony while The Wallflowers played at this year’s WWDC Campus Bash. Later, while I was browsing through Dan Dickinson’s photos, I noticed he had posted a shot of Mike, and my other co-workers Joshua Benjamin and Andrew Wooster up on the balcony.

The cool thing is, this kind of thing is only likely to become more common as Flickr grows. It’s not hard to imagine people in the near future tuning into Flickr streams for far more detailed, grassroots coverage of events than the traditional media could hope to provide (I already do, to some extent). As someone said in the comments on one of my photos, Flickr is turning into world glue.