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.
Perhaps other web frameworks come with similar powers, but of late I’ve been bowled over by Ruby on Rails’ routes. In Rails, routes are how a request like “GET http://dx13.co.uk/blog/2008/01/07/Routing-in-Rails” is processed into a method call in the Rails application. It’s more powerful and flexible than anything I’ve worked with before in its domain.
Learning about routing in depth has taught me several methodologies and idioms used throughout rails, making it seem far less magical than it felt originally. Getting intimate with some portion of your chosen frameworks allows you to see into the minds of its creators in a way nothing else will, granting insights otherwise missed. This insight makes the workings of the framework more intuitive, meaning you can begin to work with the framework rather than merely in it.