Drupal Camp Austin 2010, Day 1: A Review

This past weekend, I attended Drupal Camp Austin, a two-day conference at the AT&T Center that hosted a lot of really great presentations on various Drupal and general web topics. It was my first conference, and a good experience. I've always been a little anti-conferences, but this weekend may have changed that stance. Here is some of what I most enjoyed from the first day, and some links to resources that I found out about from the conference.

iPhone: Subclass ASIHTTPRequest for Your App's Login System

ASIHTTPRequest is a wonderful Objective-C library for simplifying web request programming in your iOS (and OS X) apps. It's my go-to library for web server communication in iPhone apps. But, it's taken me awhile to get my own system for using it within apps that communicate with a server that needs authentication. In this article, I'll show you how to create your own subclass of ASIHTTPRequest to further simplify constructing requests to your API, including logging in and out.

Drupal: Create Placeholder and Separator Menu Items via Your Theme

The desired menu, with placeholder menu items Sometimes you just want to break up your Drupal menus into sub-menus, but with headers that aren't links themselves. For example, say you want a menu like the one pictured here, and you'd like to implement it as one menu tree within Drupal. "Looking & Telling" and "Making" need to be menu items, but they aren't actually links to pages; they're just there to group menu items in a nice way. There is the Special Menu Items module to do it, but it does currently have some bugs, and there is actually a simple, theme-based way to achieve the same thing. Here's how.

Handling Time Zone Conversions in Rails

A couple of days ago, an HourPatch customer emailed me with a bug he'd found. When he created a time entry on a Saturday night, that entry would "jump" a week ahead on the schedule. I was able to fix it pretty quickly, and it turned out the problem related to time zone conversions, so I thought I'd share a little of what I learned when fixing that bug.

UIView: How to Make Shiny Backgrounds and Other Reusable Styles

When I first started making iPhone apps, I wrote a lot of repetitive code to style interface elements. Certainly, getting comfortable with Interface Builder eases that pain to some degree, but IB won't allow you to take advantage of a lot of available built-in styling features for your interface elements, such as curved corners, drop shadows, and stroked borders. Additionally, you can create beautiful gradient backgrounds in code pretty easily, but the code is somewhat verbose, so it really pays off to find good ways of re-using that kind of code. Also, using a programmatic approach to your app styling can eliminate the production time associated with image-based styles (e.g. custom background images). A lot of common effects used in UIs can be realized without any images whatsoever.

iPhone: How to Dynamically Color a UIImage

In my recent work on Sphericle, there were a few instances where I wanted to use the same image over and over, but colored differently each time. For example, I want to show spheres of different colors on a map; there are 360,000 spheres, each having its own color. I didn't want to draw the sphere algorithmically; I wanted the picture of a sphere to be based on an image, but then colored appropriately. The solution: use a grayscale image of a sphere, then draw a color over it using a color burn blend mode. That's what I want to show you today.

Goodbye Gallup: Twitter-Based Election Polls

The other night I had an idea: Create a web service that uses Twitter to poll the upcoming elections. I'd love to see if something like this could give accurate predictions for election results. And, it would be a transparent (although not anonymous) polling system. Here's how it works:

How to Update Your Drupal Install Using Subversion

If you use Subversion to manage code updates to your Drupal-based site, then chances are that whenever an update to the Drupal core comes out, it's really annoying to use. You don't want to go copying your sites/ directory from the old version to the new, since all your .svn directories are in the old version. It's just a big headache. Luckily, there's basically one command you have to run to painlessly update Drupal (with just a little bit of set up). Here's how: