The Coffeeshopped Blog
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.
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.
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.
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.
Have you seen this new site Interhoods? It uses Dribbble and GitHub profiles and mashes them up with a map to give you an idea of who the web designers and developers are in your neighborhood, and city. Right now they only offer the service for people in San Francisco, Chicago, and New York. I think they should add Austin next.
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.
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.
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: