Thursday, June 21, 2007

Late Night Cocoa

As I've been getting back into Mac development and ramping up on Cocoa, one of the nicest resources I've found is the Late Night Cocoa podcasts available at LateNightCocoa.com and on iTunes.

Steve Scott (or Scotty, as he calls himself) does a great job of finding experienced Cocoa developers and helping them explain all sorts of different aspects of Cocoa - from the individual frameworks to the development tools and to goings on in the community. He occasionally gets a bit too rudimentary - like when Uli Kersterer spends several minutes explaining what memory is - but generally it is a nice way to pick up some new tips or ideas from other developers who are using Cocoa every day.

If you've got time during your commute, your exercise regimen, or just while you're taking a break from typing lots of square brackets Late Night Cocoa is a great resource for coming up to speed and picking up new techniques.

Tuesday, June 19, 2007

WWDC 07

Well, I'm back from the Apple Worldwide Developer Conference in San Francisco. If you happened to watch the keynote, you probably saw the big public announcements about the new Leopard features (well, 30% of the features were new, the other 70% were covered at last year's WWDC), Safari for Windows and that developers can write apps for iPhone just by formatting their web pages better and supporting Safari.

If that was all there was to WWDC, then it would have been a real yawnfest. Fortunately, there was more. The improvements in developer tools are significant with new features that make it significantly easier to build very cool looking and highly performant applications for MacOS X and those "last year" features of Mac OS X Leopard have evolved over the year and gotten more integrated. Quick Look has made itself quite visible in a number of the new features and promises to make browsing for information much more efficient.

The attendees of WWDC each got a development copy of Leopard to start working on and while it looks nice, and the new APIs pretty much work as promised, it is clear there is a bunch of work to do but not so much that they would miss their anticipated October ship date.

I installed my copy on my new MacBook Pro 17" with the high res screen. It is gorgeous! I particularly love the higher resolution though having more memory helps a ton with performance (here's hoping that Leopard's video driver support improve's in the coming months...).

I'm playing around with a new photo viewer application I started writing at WWDC. It is true what they say about Cocoa - it makes the common things easy and the rare things possible. Ramping up on any framework takes time but the consistency in Cocoa does make it much simpler to know how to use it once you grok a few key principles. Now if they would only take another great idea from Microsoft and improve their documentation to have great sample code with each API definition and they'd make it twice as easy to get going in Cocoa...

Saturday, June 02, 2007

Short Attention Span Playlist

I found a cool Dashboard applet on the Cool OSX Apps site called Tunes TEXT that goes and downloads lyrics to songs when they play in iTunes and then saves them to the song file so they show up both in iTunes and on the iPod. The trick is getting all of the songs to play so it goes and downloads the lyrics and saves them, so I wrote a little AppleScript that plays each song in order.

The tricky part is that if you go too fast, the dashboard widget will crash so you need to leave the song playing for about 8 seconds to pretty consistently get the download to succeed.
tell application "iTunes"
repeat while artist of current track ≤ "Zebrahead"
play
delay 8
next track
end repeat
pause
end tell

It's been running for about 6 hours now and we just passed John Butler Trio. I added the current track artist ≤ "Zebrahead" since they are the last artist in my list and when it is done, I would rather have it finish cleanly than just barf an error when it runs out of songs. I'm sure there's a better way to do it but this certainly works. It also lets me stop and restart it wherever I want since it doesn't really care where it starts, it just keeps going through the list.

While I have muted it during the run, it's kind of fun to let it play out loud - you get up to 8 seconds of each song in your library. It's also funny to watch my Windows Live Messenger blip change every 8 seconds - if you're on my messenger buddy list, you can watch the progress :)