Developer Day v1 Complete

March 23rd, 2009

Whew! It’s been a busy weekend, with two major events: my daughter’s first birthday, and the first installment of what I hope will become a regular event, Developer Day. I’ll let pictures (soon to be uploaded) do the talking for the former, but this post is more about the latter.

I first conceived of Developer Day six or eight months ago, and after stewing on it for a while and talking it over with Justin Gehtland and a number of my co-workers at Viget, we finally decided to go ahead with it about two or three months ago. Having never organized an event of this sort before, I was a little surprised by all the work required, but it turned out better than I’d imagined - and by their comments and tweets, it seems like the attendees and speakers had a good time, too.

With that success under our collective belt, then, we’ve decided to do it again — this time, in DC, in late May. We’ll have some of the same speakers, as well as some new ones local to the area, but we’re committed to the idea of high-quality content for a very low cost, and to the idea of local conferences (even smaller than regional ones). We look forward to seeing people in DC in a few months, and who knows — maybe Developer Day will be coming to your city next!

Argentine-bound

March 5th, 2009

So it’s a little late notice, but in a little less than a month I’ll be in Buenos Aires for a couple of days, speaking at Locos por Rails. The program looks excellent (with Yehuda Katz, Obie Fernandez, Fabio Akita, and more!), and I’m really excited for my first visit to South America to be Jorge Luis Borges‘ hometown.

I’ll be giving a version of my talk from Developer Day, entitled “Page Caching Resurrected.” Here’s the abstract:

Over the past year, Rails has gradually (and sometimes quietly) introduced some dramatic new changes. The most obvious of these is the Merb merger, but one of the most important steps on the path to Rails 3.0 was the introduction of Rack support. The effects of that change are wide-ranging, and are often surprising — and include the possibility for new architectures that were impractical or impossible before. Specifically, it is now feasible to build a complex Rails application that can still respond extremely quickly and directly to a specific set of requests, such as those an AJAX service might experience.

In this session, we’ll explore in depth how this strategy reinvigorates a useful, but formerly limited, capability of Rails: page caching. Of the three caching methods built into Rails, page caching is by far the most efficient, but it is also the least flexible. By making use of the Rack support in Rails (with tools like Rails Metal and simple Rack applications), page caching will come into its own as a viable strategy.

Developer Day is coming!

March 3rd, 2009

For a while now, I’ve been working on a semi-secret project — a local, one-day, low-cost conference for developers. It came out from under wraps last week, but I’m only now getting around to blogging about it here. Without further ado, then, I give you: Developer Day!

My company (Viget Labs) has teamed up with Relevance to present a full day of great technical talks on all sorts of topics (performance, source control, testing, and more) and on a variety of technologies (Ruby, Rails, JavaScript, Scala). We’re confident that we’ve got the best program you’ll find anywhere for $50, especially when you throw in breakfast, lunch, and snacks from local restaurants. Space is limited, though, so if you’re free on Saturday the 21st of March and feel like coming (up|down|over) to downtown Durham, check out the site and register!

Introducing Nearbuy Books

February 14th, 2009

I mentioned recently that I’d been working on an iPhone application, and, well — I’m done! I submitted Nearbuy Books to Apple for approval back on February 6th, and began the wait for their response. I’ve heard several times that the average wait is two weeks, so I’d prepared myself for that, but was happily surprised when I woke up yesterday morning to an email saying the app had been accepted. After a couple of hours of confusion regarding exactly when it would appear in the store, some friends and I finally saw it, which was about the most excitement I’ve had in 2009 so far.

Of course, I immediately started obsessing over how it did, and ended up spending my evening upgrading the web service backend to provide better results for searches. Still, it’s been a lot of fun, and I can’t wait to get more apps out there.

If you have any feedback or questions on the app, feel free to post them in the comments here!

Smooth Scrolling a UITableView

February 4th, 2009

For a while now, I’ve been working on an iPhone application (both because it’s something I want as a user and as a way to learn the platform). With the help of a couple good books, I’ve had a lot of fun and made some great progress—but it hasn’t always been easy.

One of the issues I had was scrolling. The app I’m working on displays a table (UITableView) in which each cell contains an image that I’m pulling down from the web. Given the way that the iPhone loads the cells, however, this meant that every time you scrolled a cell (even if you’d seen the cell before) into view, it had to wait for the image to be pulled from the server. Granted, the images are pretty small, but there was still a very noticeable delay as you moved back and forth through the list.

The obvious solution was to cache the images, and that’s just what I ended up doing (after a couple of failed attempts). Here’s the gist of the code:

Basically, this code expects a JSON array, each element of which is a hash with a text description and a URL to an image. When the view loads, the code parses cycles over the array and creates a new UIImage for each image URL, which it adds to a dictionary (the key is the URL, the value is the UIImage). When a cell is displayed, the code looks for the appropriate entry in the images dictionary and adds it as the cell’s image. Thus, all the image requests are front-loaded, and scrolling smooths out considerably.

Note: I’m sure I’ve done some terrible things in this code. Before flaming, please consider that 1) I’m still learning, and 2) this is meant as an example of a technique, not as an example of wonderfully-written Objective-C. Thanks!