Posts from January 2009

Sugary new rspec syntax

A new version of rspec was just released and I love this bit of syntactic sugar (taken right out of the blog post):

describe Person do
describe “born 19 years ago” do
subject { Person.new(:birthdate => 19.years.ago }
it { should be_eligible_to_vote }
it { should [...]


Protoload is great

Just wanted to give a shout-out to a little javascript tool that I include in pretty much every project.  Protoload lets you mark an element as “waiting” while your AJAX is doing its bit.  It works with prototype and extends Element to add startWaiting and stopWaiting methods.
Its as simple as:
$(’foo’).startWaiting();
or in a slightly bigger example:
var [...]


Working with large (thus slow) assets

You have a website with fantastic images that are big, plentiful, and full of color.  Like a fashion website, for example.  Or maybe you’ve decided that all the text on your website needs to be in a non-web font–as images–and now you have hundreds or thousands of image files to be deployed.
What to do so [...]