WWDC 2010 Predictions
Posted on
I arrived in San Francisco a couple of hours ago. This week is going to be awesome. I am really looking forward to WWDC 2010!
I've been telling a few people what I think Jobs is going to announce tomorrow at the keynote. I figured it would be good to post it so I can brag about how right I was. (Just joking. I'm not really that arrogant.)
There will be a new iPhone. All of the crazy rumors, phones left in bars, and cops raiding apartments aside, historically Apple has always announced a new one every year since it was released at WWDC.
New Server Script
Posted on
I've found myself setting up lots of servers over at RackSpace Cloud lately. It seemed look a good idea to automate everything instead of leaving it up to myself to remember everything you have to do each time.
I wrote this little shell script to make life easier. It installs everything I need to run a Ruby on Rails app in a matter of minutes. It's designed to work with Cent OS 5.4+. Here's the script's main tasks:
- Install Git 1.7.1.1
- Install Ruby 1.8.7p299
- Install RubyGems 1.3.7
- Install Passenger 2.2.15
- Install Nginx 0.8.45 (with Passenger and SSL modules)
- Install Postgres 8.4.4
- Initialize Postgres
- Install ImageMagick 6.6.3-0
- Install Bundler (latest)
- Open port 80 in iptables
- Open port 443 in iptables
- Start Nginx
- Start Postgres
Homepage Albums
Posted on
I recently added an albums I've been enjoying this week section to my homepage. It's still a major work in progress. For some reason, tons of people have commented about it on Twitter asking how I made it, so I thought I'd write a quick post about the tech behind it.
The first thing your probably noticed is the sexy vinyl look. I got this from Komodo Media (all of their stuff is awesome, you should check it out). Some simple CSS plus their images and it looks dang sexy.
I'm using the Last.fm API to get my listening history. The call to get your top albums for the week doesn't return the album art for that album, so I have to get all of the albums and then get the art for each one. This whole process is pretty slow (source here) so I shove it in memcached on Heroku using the memcached gem so rendering is fast on my homepage.
Archiving NSManagedObject with NSCoding
Posted on
Several of the apps I have been working on lately have been using Core Data. Core Data is pretty sweet. So far, I really like it.
I needed to persist an array of NSManagedObjects to NSUserDefaults to persist the state of the application between launches. Obviously, I could have done this with another attribute on the Core Data entity, but this approach seemed a lot simpler. I was surprised that NSManagedObject didn't conform to NSCoding. I guess that makes sense because if you store any custom types in your entity, it wouldn't know how to archive them. In my case, (and I would assume most others) I didn't want to archive the entire object since it was already store in Core Data. I just needed to store the object ID.
This was actually really easy. See:
Hosting Frustrations
Posted on
Lately I've been struggling with good hosting. Here's three stories about some stuff I've tried. (Skip to the bottom of the post if you just want my conclusion and don't care about the stories.)
I love Heroku. I did a screencast on how awesome they are a few months ago. Since then, I've moved all of my personal apps and all of Tasteful Works's apps to Heroku. They've been really great until recently.
I have two big complains (and one small one) with Heroku.