Some really cool tricks with Ruby hashes–if you supply a block to
Hash.new, that will act as a default value for a given key. For example, here’s a Fibonacci hash I put together which caches the values (making it pretty quick):
fibonacci = Hash.new do |h,k|
if k < 2
h[k] = k
h[k] = h[k-1] + h[k-2]
fibonacci # => 8
fibonacci # => 354224848179261915075
I just announced our new Ruby gem over on the Viddler blog. It’s a fairly basic wrapper for our v2 API for now, but I definitely have plans for some really cool features, like having ActiveModel compatible classes for stuff like videos, playlists, users, etc., as well as making it easy to integrate into existing ActiveRecord models in Rails.
So, if you’re into Ruby and you’re looking for a way to integrate video into your site, definitely check us out. We have a really great API, and now that there’s an official gem, it’s easier than ever to get started.
This looks like a nice alternative to Flash-based uploaders like Uploadify:
This plugin uses XHR for uploading multiple files with progress-bar in FF3.6+, Safari4+, Chrome and falls back to hidden iframe based upload in other browsers, providing good user experience everywhere.
A great summary of how to build a non-blocking JS widget.
Quick and easy way to test a Sinatra app with RSpec.
Neat trick by John Nunemaker for sending deploy notices to a Twitter account.
Leslie Camacho, president at EllisLab, discusses how the ExpressionEngine team works on a day-to-day basis. Most of post revolves around Scrum, a framework for project management. The video included in the post gives a great insight into how Scrum works.
Oh and did I mention how excited I am about ExpressionEngine 2.0?
Google has a great selection of tips on how to make your website faster. I posted a little while back about several frontend optimizations I’ve made to make my site faster.
ObjectiveResource is an Objective-C port of Ruby on Rails’ ActiveResource. It provides a way to serialize objects to and from Rails’ standard RESTful web-services (via XML or JSON) and handles much of the complexity involved with invoking web-services of any language from the iPhone.
I’ve been considering trying out some iPhone development (even though I don’t yet own one), and this seems like a really slick way to interface with an existing Rails application.
Rein Henrichs does a great job explaining an agile git workflow for teams, and I found it to be very helpful, even for my 1-person projects (e.g. this site). I’ve always been a little confused as to when I should rebase and when I should merge, but after reading through this, it makes a little more sense now.
Man, how did I miss this before? New Relic is having Gregg Pollack, of Rails Envy fame, do screencasts on scaling Rails. There’s some really great stuff in here, and I definitely need to reserve some time to go through each of them myself.