I finally have some control of my fate again. The dx13.co.uk domain has passed into the hands of my friend Jason, an able custodian if ever there was one. The previous person looking after the domain for me went missing in action sometime ago, which was rather worrying. Fortunately the domain was renewed last June when it came up for expiry by some mysterious entity. Needless to say, however, having a trusted friend looking after the name for me, able to point it wherever my whim desires, is most relieving.
A few months ago, there was a kerfuffle in the programming blog world about a little problem called FizzBuzz. Every now and then someone posts about their experiences interviewing candidates for coding positions. One such post was an example of a way to weed out the terrible developers from the merely not-that-good (i.e., the rest of us). It was titled Using FizzBuzz to Find Developers who Grok Coding and presented the following problem:
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: