I'm Travis, a 10 year veteran software developer with a broad background in web technologies and
software markets. I've been working with Rails as my weapon of choice for the last 3 years, and
more recently, developing applications on the iPhone SDK.
A refactoring habitué and TDD adherent, I've
a special interest in software development as a craft and science.
LATEST PROJECT: Secure Rails Admin Backend With Authlogic and Multiple Sessions
Thoroughly supported, inconspicuously documented, authlogic lets you manage multiple user sessions -perfect if you want to allow users to login to your application under separate accounts, or as in the following case, if you want to build an administrative backend secure from potential session hijacks.
Using an iPhone to post binary files like photos or video to a remote server is not a difficult task, but there’s a wide margin for inexplicable sinkholes ready to swallow precious time with formatting nuances or missing headers. I say this while kicking the muck off my boots myself, as trial by error and a measure of patchwork has brought me to following happy implementation.
Certain errors in Rails send a shiver down the spine because they deal with generated SQL which can be such a dreadful problem to fix. Today I got the shivers from acts-as-taggable-on and the following error message:
PGError: ERROR: column reference "context" is ambiguous
The source of the problem is the plugin’s dynamic tag contexts and [...]
A recent issue of Rails Magazine published an article by John Nunemaker on web hooks in rails, along with a concise example for triggering hooks on models using an observer class. I’ve followed this lead, but found a few basic changes necessary to make the solution more tractable for use in a typical Rails API setup.
acts_as_taggable_on is a great plugin with some useful feature hooks like user-owned tagging. I’ve extended the tag owner hooks with a few finder methods to traverse tagger relationships, and squashed a crucial bug that rejects valid owner taggings during the taggable model’s save_tags callback.
In the first part this tutorial I demonstrated how to save player scores for an iPhone game. In this post, I’ll explain how to add online support by building a high scores web service in Rails, securing the submissions, and using git to deploy (for free) onto heroku.
One of the principles behind this tutorial was [...]
My latest Sogeo work is getting quite a lot of distance out of tagging. With mbleigh’s acts_as_taggable_on I’ve been able to conveniently normalize several different data dimensions down into a tag model.
Modeling this was easy enough, but today I ran into an issue when constructing some of the more sophisticated filtering queries.
acts_as_taggable_on utilizes [...]
Why high scores? Because the stamp of public achievement rewards players for investing their time and skill in your game; and because the one-upsmanship of ranking promotes a competitive social awareness which can make a title more enduring.
In this two-part tutorial I’ll explain how to model and store local and high scores in your iPhone game, and build a web service leaderboard with Ruby on Rails.
Friend networks and activity feeds are mainstay features of social media applications, and designing an implementation that won’t scar your code with the complexities of bidirectional logic and messaging queues is never easy.
Responding to the iPhone’s UITabBarController touches should be a direct, uncomplicated process, but in fact requires you to establish a number of hooks throughout your code. There are many reasons you might wish to intercept a UITabBar action, either to cancel and return to a prior tab, to show an alert view, to conditionally push a stack of ViewControllers , and so forth. Here are the steps necessary to make that happen.