Forge Code

Going to WWDC 2009!

This morning I awoke to good news. The AUC (Apple University Consortium) announced their WWDC 2009 Scholarship Recipients, and I made the list!

Big thanks go out to the AUC for the fantastic Apple related programs they run for Australian university students and staff.

If you’re going to WWDC 2009, hopefully I’ll see you there!

Enhancing Twitter Usability by Syncing Read Statuses

I’ve started using Twitter quite regularly. It has become a major part of my online life, and allows me to have social interactions that I would normally miss when working or studying on my own. I currently use the Twitterific client on my Macs, and the Tweetie client on my iPod Touch (I still don’t have an iPhone!!!).

As it currently stands, the Twitter API doesn’t support any kind of “Read/Unread” data for your incoming tweets. This omission keeps the API lean, simple, and unambiguous. It also prevents shoddy clients from inadvertently messing with your account data. On the other hand, it is responsible for the largest frustration in my overall Twitter experience.

Using a WordPress Plugin to Disable the “Category” Field in RSS Feeds

A lot of the work in developing Forge Code has been working out ways of modifying WordPress’s default behaviour without hacking core WordPress files. The main reason that it’s not wise to modify core WordPress files is that performing a WordPress upgrade will overwrite any modifications you have made. If you want to retain your code modifications during an upgrade, you have to keep track of every file that has been modded, which is tedious and error-prone.

Unfortunately, as of WordPress 2.7.1, RSS feeds are not covered by the theme/template system, and the templates reside in the WordPress core. Fortunately, there are a large number of “hooks” throughout WordPress codebase which allow you to override default behaviours. These hooks make up WordPress’s Plugin API. There are two types of hooks: “actions” and “filters”. An action is a hook that simply executes a function, and a filter is a hook that executes a function with a parameter (often, but not always, text) where the function is expected to return something. It’s like a pipeline - a filter takes something in, and it has to put something out. You can do things like return an empty string based on a conditional, run a text filter to strip HTML tags, or convert from numbers to plain English month names. To use either of these types of hooks in a WordPress plugin, you “register” them with WordPress using either the add_action() or add_filter() functions.

Interfacing With Disk Utility Using Ruby Scripting and RubyCocoa

Automated backups are a wonderful thing. Ideally, every computer user should have at least one automated backup system in place for their data. Apple’s Time Machine is a fantastic solution for most users. Despite its flaws, it is extremely easy to setup, and it works unobtrusively in the background. I use it to backup all of my Macs as my main backup solution. Power users, particularly programmers, however, like to have a little bit more control over these sorts of things. Even though I already have Time Machine backing up my Mac Pro, I want to be able to write custom backup scripts to backup the most important data onto a second internal HDD. That’s not too hard to do using rsync or something similar, but I don’t want to have my backup volume visible on the Desktop when it’s not in use. Having the backup volume easily accessible increases the risk that a backup will “accidentally” go missing, or get borked somehow. In essence, I want my backup scripts to do the following:

  • Mount the backup volume
  • Do the backup
  • Unmount the backup volume

Easy enough, right?