A Useful UITableView Cell Creation Pattern

Like many iPhone apps, the app I’m currently working on uses several table views. Most of these display actual lists of data, and some are used as a convenient layout mechanism for input fields, navigation, and other UI elements (similar to iPhone preference screens). UITableView and its associated classes like UITableViewCell, UITableViewDataSource, and UITableViewDelegate are very powerful, but they also require a fair amount of boilerplate code split across several methods....

December 19, 2009 · 5 min · 1037 words · DigitalHobbit

Building a Twitter Filter With Sinatra, Redis, and TweetStream

It’s been way too long since my last programming focused blog post, so let’s try to rectify this situation: Background A couple months ago, Twitter made available their Streaming API. This provides developers with a very efficient way to tap into the public Twitter stream. All you need to do is open and maintain a single HTTP connection, passing in a few filter parameters. Twitter then keeps streaming matching tweets to you....

November 8, 2009 · 13 min · 2671 words · DigitalHobbit

Upgrading an older MacBook Pro to 6GB of RAM

If you own a MacBook Pro and would like to upgrade to more than 4GB of RAM but think that your model does not support this, you may want to read the rest of this article. I bought a MacBook Pro 17" in April 2008, as my primary development machine. I knew that the standard config with 2GB of RAM wouldn’t be enough for my purposes, but I also wasn’t about to spend a ridiculous amount of money on an official memory upgrade from Apple, so I picked up two cheap G....

September 5, 2009 · 3 min · 605 words · DigitalHobbit

iPhone Development is Fun!

It’s been a while since I completed my first iPhone development project, and I figured I’d finally write up my initial experience with this platform. A bit late, but better than never… To put this into perspective, here’s a brief summary of my previous professional programming background: I worked with C++ back in University but quickly adopted Java in 1998 and never looked back (good riddance to pointers and manual memory management!...

May 10, 2009 · 7 min · 1434 words · DigitalHobbit

Workling and Amazon SQS

If you need to perform any time consuming work in your Rails actions, you’ll probably want to offload this into a background job. There are many different frameworks to help with this, and the one we use is Workling. The nice thing about Workling is that it provides an abstraction layer that allows you to decouple your actual background job implementation from the background execution strategy. For example, in our development environment we are using the Spawn runner (which simply forks the Rails process for each background job), but we need a proper, queue based runner in production....

April 4, 2009 · 4 min · 683 words · DigitalHobbit