Attended NIC-U Mini-Conference

The NIC-U mini-conference, hosted by Near Infinity and organized by my friend, Gray Herter, was a great success today. They had talks on HTML 5, Rails 3.0, the Sproutcore JavaScript library and Android development, plus lightning talks. A truly fun event, augmented by some awesome food (Uncle Julio’s Mexican Restaurant catered the dinner).

Announcing DevIgnition

I’m one of the organizers of the new DevIgnition Conference, which will be held December 3, 2010 at the Oracle building in Reston, VA. Tickets will be released to prospective attendees on Monday, October 18th.

MetroStar on SunnyConf

Here’s a very nice write-up from MetroStar Systems regarding my latest speaking engagement at SunnyConf in Phoenix, AZ.

Note: The link has been removed because the relevant blog entry is no longer available.

Recipe: Default Ordering in Rails

Sometimes it’s convenient to ensure that all rows in a database table are always retrieved in a specified order for consistency. It turns out that this is trivial to do in Rails (both Rails 2.3.x and Rails 3.x).

I had a SETTINGS table in the database that defined the settings that were available in order to customize a product. Anywhere that those settings were listed, I wanted them to be listed in alphabetical order.

In standard Rails fashion, I had a Setting model that corresponded to the database table. As shown below, a default scope can be defined that will automatically be applied whenever find is called for the model (unless overridden by the caller).

Listing 1: The Setting Model (Rails 2.3.x)

   class Setting < ActiveRecord::Base
       default_scope :order => 'name'
   end

Listing 2: The Setting Model (Rails 3.x)

   class Setting < ActiveRecord::Base
       default_scope order(:name)
   end

That’s it. One line of code in Rails 2.3.x or Rails 3.x, and my objective was achieved throughout my entire application.

On another note, AREL can be used in Rails 3.x to chain conditions:

   default_scope where(:deleted_at => nil).order(:name)

Should you need to override a default scope in Rails 3.x, here’s how:

   Setting.with_exclusive_scope.order(:created_at).all

Default scopes can be useful and convenient, just don’t overuse them.

Rubyology Interview

David Keener was just interviewed by Chris Matthieu and Jason Goecke for Episode 92 of the Rubyology podcast. The interview was about Facebook, Ruby on Rails and Dave’s upcoming talk at SunnyConf later this month. Check out the podcast!

Nick Sieger’s Rails/Java Video

While I functioned as the producer and driving force behind RubyNation’s video production effort, I had only limited editing experiencer with Final Cut Pro. Nick Sieger’s video on “Rails: The Killer Java Web Stack,” is the first conference video that I was 100% responsible for from beginning to end.

NOVARUG Rails/Facebook Talk

I’ll be giving my “Leveraging Rails to Build Facebook Apps, Version 2.0” talk at the NovaRUG meeting on September 15th. This version of the talk incorporates the recent changes that Facebook has made to its developer ecosystem. It will also be videotaped by the incomparable Don Anderson, although the talk won’t be available online until after I’ve given the talk at SunnyConf in Phoenix, AZ.

GSA Competitions and Prizes Industry Day

I attended the GSA’s Competitions and Prizes Industry Day yesterday, an event designed to facilitate President Obama’s mandate for using contests and prizes to spur innovation, transparency and collaboration within government. Contests represent an exciting application space, and I was pleased to be able to talk to folks about our Votridea Contest Platform.

I Have No Klout

Apparently, I have no clout, which is a new measurement of social media influence. Check out the Klout web site for more information about this new statistic.

Evolving Web Projects into Online Products

There’s a difference between a software project and a product. I’ve been helping clients create innovative projects on the web for a long time. Lately, I’ve been responsible for evolving, or planning to evolve, several projects into online products. It’s harder than you might think.

There are several reasons for this:

  1. A project is typically crafted to meet some set of specific and relatively narrow client requirements.
  2. Since the focus of a project is on meeting client requirements, project features generally are not designed with the flexibility to meet the more general needs of a wider audience.
  3. There’s no client telling you what the requirements for the product are. You have to figure that out yourself.

There are several tactics to address these problems, which I helped apply to a real-life project. That project was an online video contest for the Department of State’s Bureau of Educational and Cultural Affairs.

We structured the project in an unusual fashion. We threw two high-level architects on the project. The first was the team lead, Dave McVicar, whose responsibility was to ensure that we delivered a solution that 1) met the customer’s requirements, and 2) made the customer happy (note that these two things are not the same).

The second architect was me, and my responsibility was to push wherever possible and feasible for a generalized solution that was as close as possible to a general-purpose product. The project solution thus gained a healthy push-pull dynamic between the two architects, with the team lead having the final say (his responsibility was the paying client, after all). This also worked well because McVicar and I were already friends and familiar with each other’s capabilities; this was the third company we’d been at together.

The end result was a highly successful online video contest for the Department of State, which added more than 9000 members to their ExchangesConnect social network during the 2-month run of the contest. The contest site included the capability to run multiple contests (e.g. – separate annual contests), integration with Ning (a white label social network product used to host the Department of State’s ExchangesConnect social network) and an Admin area with a rich set of reports and site moderation features.

The contest site wasn’t completely generalized, but it was close. Through rigid adherence to the MVP principle, we were able to evolve the contest site into a generic contest platform called Votridea in three months.

Votridea Contest Platform

MVP stands for Minimum Viable Product, a phrase that summed up our strategy for defining a new product. MVP requires that you concentrate on implementing only the bare minimum of features necessary to have a cohesive and functional product. You have to be ruthless to do this, because everybody will give you ideas about what the the product should be. Save the ideas for later consideration as feature enhancements, but prune them until you have only the core left.

These tactics helped us craft a high-quality solution for our client, the Department of State’s Bureau of Educational and Cultural Affairs. Because we recognized the potential for a general product early on, these tactics also helped us create a solution, financed in large part by a client, that we were able to evolve into a viable online product in a short period of time.