This is the short post I wish I’d found this afternoon to remind me: try the simplest thing which could possibly work. I was trying to work out whether acts_as_sphinx and will_paginate would work together.
It turns out they do, and it is the most obvious thing in the world.
Exhibit A: Using will_paginate on its own:
Exhibit B: Using acts_as_sphinx on its own:
Exhibit C: Stop looking at internet and just damn well try something:
Easily the best new feature in Firefox 3, in beta, is the new location bar, dubbed the “Awesome Bar” in some quarters.
Most web browser location bars will search through the addresses of the websites you’ve visited recently when you type in them, including the ones in Firefox 2, Safari and Internet Explorer. Firefox 3 differs in that it searches the page titles too. In this age of non-descriptive URLs, searching only the web address is certainly sub-optimal. A page’s title is far more likely to contain useful information if you are searching for something but don’t know where you saw it.
If something looks ugly in ruby, there’s usually a better way to do it. So was the case this afternoon, in a Rails view template:
You rated this page: Good
All those angle brackets, percent signs plus a mish-mash of HTML and ruby code? Yuk! There must be a better way.
And, as may have been expected, there was. Rescue was delivered via two vectors.
Firstly, there are helpers for use in Rails templates which generate HTML code via a ruby method call. Often these are not useful—where it’s more concise to write the HTML itself—but this is an occasion where they come in very handy for cleaning up some code. Instead of this:
At MacWorld yesterday, Apple introduced film rentals from the iTunes store, but it’s US only for now. The pricing looks good — $3.99 for new films, $2.99 for older ones — and interesting: it’s variable. I don’t know what Apple’s position on films-to-buy was as we still haven’t received this over in the UK, but Apple are notorious in their single-price model for music.
As for the conditions, most of the details are unsurprising as they are similar to the conditions I wrote about a few weeks ago which other stores offer. I’m pleased that rentals will be offered in both standard and high definitions, so hopefully my Mac Mini will be able to cope with viewing them.
In an interesting article titled Scoble/Facebook Incident: It’s Not About Data Ownership, Ed Felton makes a useful point:
Where did we get this idea that facts about the world must be owned by somebody? Stop and consider that question for a minute, and you’ll see that ownership is a lousy way to think about this issue. In fact, much of the confusion we see stems from the unexamined assumption that the facts in question are owned.