My todo list has been telling me to play with Yahoo’s YQL for far too long now, so last night I did something about it. YQL is a Yahoo SQL-like language that allows developers to easily aggregate data from various disparate data sources without having to go through the rigmarole of writing their own API. There is a large selection of base tables that allow the developer to work with e.g. Flickr or Upcoming. There is also a community contributed selection of tables (see datatables.org). You can contribute to the project by forking the GitHub project and sending a pull request once you’ve committed changed to your tree.
That’s exactly what I did last night. I did some digging and found the UK government’s data source for nutritional information, the “Composition of Foods” report. To use the data, I had to apply for a free Click-Use license. I didn’t have to specify what data I was using or how I was going to use it; it seemed more the case that I had to have my name added to a list of people who use government data in some way, shape or form. Once I’d munged the data a bit, I created a CSV, and corresponding XML file as described by the DataTables documentation.
You can use my DataTable by querying YQL (or in the YQL-console) like this for example:
use "http://maxmanders.co.uk/lab/nutritionals/nutritionals.xml";
select * from nutritionals where name = 'banana';
At work, I have a Snom 360 IP phone that is hooked up to our internal Asterisk PBX. If I’m listening to music with my headphones in, I’m not always aware that my phone is ringing – some Perl and PHP hacking later, I’ve got a crude (and work-in-progress) solution.
As I mentioned in my last post, I have had issues getting Firebug working in Firefox 3.0b5. Unfortunately at the moment Firebug isn’t compatible with the beta release of Firefox 3. To be honest, I’m quite happy with Firefox 2.x. From what I’ve read, Firefox 3 is more stable and less memory-hungry that its predecessor, and it does look nice (especially so according to Mac users). Unfortunately, these benefits are outweighed by my love of the Firebug extension. It is, in my opinion, the best debug tool for web developers bar none. To that end, I’ve chosen to remove Firefox 3 (and all the bits and bobs that come with it) and install Firefox 2.
A few apt-gets later, I had got rid of Firefox-3 and related packages, and installed Firefox-2, symlinked to /usr/bin/firefox. However, Firefox-2 still used the profile created by Firefox-3 in my home directory. I started Firefox from the terminal, with the ‘-ProfileManager’ switch. I created a new profile, renamed default, and renamed my new profile to default. I then copied my bookmarks and related data from the old profile directory to the new one. Once this was done, I started Firefox with my new default profile, installed my favourite plugins and all was good – Firebug now works like a dream!
After some months of being unhappy with the service from Hostgator, I decided yesterday to move to Dreamhost. While Hostgator are very affordable and for the most part reliable, the ssh connection was always painfully slow; it took me considerable effort in the beginning to even get ssh access (having been required to justify my need to them); the control panel they provided (cPanel) made it difficult to get anything done; and as far as I know I could only host a single site with them.
After a recommendation from a colleague at work, I decided to switch to Dreamhost. I opted to pay for a year in advance, as the monthly direct-debit payments are a little more expensive otherwise, and there is an initial setup fee if you pay monthly. The control panel is far more intuitive and a lot easier to use. I can host as many sites and sub-domains as I like with as many users, email accounts and MySQL databases as I like. Once I had created the account and switched my name servers with my domain registrar everything was underway. Within half an hour I had shell access, an initial account with which I could create more accounts, an initial email address of my choosing (thus reducing email outage to a minimum) and a general impression that Dreamhost were a lot more professional and experienced.
Obviously it will take up to 48 hours for the new name server settings to propagate to the root name servers, but despite this within about four hours the name server change had been effective for me. After about 15 minutes work making changes to my local copy of my WordPress installation and MySQL dump, I rsync-ed everything to the new server, got the database up and running, and job done!
Up until recently my hosting was provided by Fasthosts. For reasons that have nothing to do with the experience I have had with Fasthosts I have had to move to an alternative hosting provider. After some research I opted to go with Hostgator’s Baby plan. The features included with this hosting plan are excellent for the small fee of £5.00 per month. And the technical support is brilliant. I initially had problems getting SSH access, but after raising the issue via the ticket system, I had SSH access within a few emails!