You appear to be using Internet Explorer 6 or lower, which this site does not support. I recommend you upgrade to a more recent browser, such as Firefox or IE7.

Internets

Archived Posts from this Category

New Extension

Posted by Sam on 19 Jan 2010 | Tagged as: Internets, Mozilla, Music, Web development

So I got annoyed with looking up albums in RYM and decided to write something to extract the ratings into Songbird.  The result is here, it’s actually at 0.2 already because I’ve done quite a lot of work on it recently (whilst being something of a slack blogger).  Now all I need are the POTI guys to make Songbird do multiple genre tagging, improve the search/filter functions accordingly and then make Songbird much snappier with large libraries.  Then I will have the (almost) perfect media player.

Future plans include integrating the RYM enhancer script into this, once I’ve got the hang of pref management.

Assorted site woes

Posted by Sam on 24 Feb 2009 | Tagged as: Internets, Web development

In the mini-flurry of work I’ve been doing on this site recently, I’ve noticed that the loading speed is very slack.  I used the same tools as I use at work (Firebug, YSlow) to analyse the performance issue and have made a number of structural fixes that have made things a bit faster, but it seems to be the initial GET request that is taking the most time.  I’ll talk to DreamHost about it, although given that they’re in the US, it could just be that I need to look at acquiring a CDN.  Obviously I can’t afford it, but I did find an interesting article detailing how to set up Google App Engine, for free, as a personal CDN.  It’s apparently limited to files smaller than 1MB, 650,000 requests per day and 10GB of downloads – but that’s perfectly fine for 99.9% of the things that this site serves.

On a side-note, I’ve switched to a better browser detection script as the old one had serious issues with IE8.  I know that browser-sniffing is not a good thing, but it seems to work fine for now (and it’s only really for IE6/7 – everything else gets pretty much the same standards-based HTML/CSS/JS), at least until I sort out some kind of feature detection routine.

And on a completely different side-note, using this page I finally fixed the annoying console error messages that plague Firefox with Firebug and HTML Validator extensions installed.  Hurrah!

RYM Greasemonkey script

Posted by Sam on 19 Feb 2009 | Tagged as: Internets, Mozilla, Web development

Yes, that’s right.

The short story is I got annoyed at the glacial pace of feature development over on Rate Your Music, Richey showed me a couple of Greasemonkey scripts he found to enhance the experience and this one popped up as being the most useful.  Except that I didn’t like a few things about it, so proceeded to simplify the options and add a small pile of new features.

So I present my enhanced version of the RYM enhancer script.  Features:

  • Changes ratings from 0.5-5 to 1-10*
  • Sets hover (title) text of star rating to a 1-10 scale*
  • Calculates average ratings for each artist and release category (album, single, video, etc.)*
  • Enhances ratings with colour (1-4 red; 4-7 yellow; 7-10 green)*
  • Highlights rated, owned or wishlist items in both custom charts and lists
    • Rated items are highlighted in blue, owned items in yellow, wishlist items are red.
    • Each type of highlight can be switched on or off depending on user preference.
    • If both owned and rated highlights are selected, owned items which have also been rated are highlighted in green.
    • If both wishlist and rated highlights are selected, wishlist items which have also been rated are highlighted in purple.
    • Calculates the total number of each different highlighted item type at the bottom of the page.  This is performed dynamically based on the highlighting preferences.

Starred items are features carried over from the original version of the script.  Highlight colours have been carefully chosen to allow readability, and also to provide a colour combination metaphor when rated & owned, or rated & wishlist, highlights are selected.  You can’t own an item and have it on your wishlist, so there is no combination highlight for that.

There are certain circumstances where releases that you have rated will not be highlighted.  This is because RYM allows you to rate multiple versions of any given release, but doesn’t provide a user friendly way to manage these ratings with respect to the release as a whole.  So if you have rated a release version which is different to that displayed in a list or chart, that album’s entry will not show up as having been rated.  Most annoyingly, this also happens when looking at artist pages; the way I currently get around it is to rate multiple versions of the same album, which achieves the desired results but can be annoying as you are rating the same release multiple times.  I might see if I can provide a better fix to this issue with an extension to the script.

Needless to say, this requires Firefox and the Greasemonkey extension.  Go get it :)

New Wordpress Widget/Plugin

Posted by Sam on 14 Jan 2009 | Tagged as: Internets, Web development

I wanted to find an easily customisable search box plugin for my blog, as the default one is a bit boring to say the least.  I couldn’t find one that did everything I wanted, so I set about writing my own.

Features:

  • Customisable title
  • Customisable button text
  • Choose between text button or image button
  • Customisable margin between button and text box
  • Choose between small or large image buttons – small image button is designed to be used with a negative margin to place the search button inside the text box
  • Info boxes in the admin area explaining everything
  • Change the default images for your own, with optimum margin for ‘inner button’ case dynamically calculated and displayed in the admin area

This is based on the rather obviously named Search Widget with Title, and has been fully tested on Wordpress 2.7.

So, here it is…Advanced Search Widget

Instructions: Unzip the download, upload the directory within to your plugins directory.  Then, activate the plugin and add the widget to one of your sidebars.

Some movement…

Posted by Sam on 14 Nov 2008 | Tagged as: Internets

My very awesome Web host Dreamhost just upgraded me to unlimited disk and bandwidth, to say sorry for moving my site to a different server with no warning.  Considering nothing whatsoever broke as a result of the move, I’m rather pleased.

Wordpress is also finally updated and the new version is so much nicer.  It was a bit weird that I had to comment out the entire wp-admin/admin-db.php file to get the admin area to work, but I have forgotten most of the messing about I did whilst setting up this site so it’s probably something to do with that.

I don’t really use MySpace any more, apart from to check out the odd band that don’t have any tunes on Last.fm, and gig dates (Last.fm is getting much better for gigs though).  However I found a wordpress plugin that supposedly allows crossposting of these blog entries to my MySpace account, so we shall see if that works when I hit ‘publish’.  I like the idea of my blog posts automatically being pushed around all of the different networks/apps that I’m on, I’ll see about finding one for LiveJournal (which I also barely use, but whatever…).

JS++

Posted by Sam on 21 Sep 2008 | Tagged as: Internets, Web development

The recent massive improvements in JavaScript performance are absolutely awesome for a number of reasons:

  1. When I use a Web app, it will be much faster, and more responsive :)
  2. Microsoft and Adobe should be scared, as JS may just prove to be the true open-source competitor to Silverlight and AIR.
  3. It will pave the way for more advanced, cross-platform Web apps.
  4. Hopefully, as the speed difference between old and new browsers becomes more apparent, it will speed up the switchover from the horrors of IE6.  New apps will start to support IE6 less and less, as the performance hit will be unacceptable.
  5. It could help attempts to piggyback certain technologies that Microsoft will probably never support (such as Canvas), onto IE.  Of course, this assumes that MS keeps up with the curve regarding JS performance.

And on a completely unrelated note, I found a cool page that beautifully sums up the options for IE when it comes to exploiting CSS hacks.  Whilst I knew most of the hacks on the page, this inline rule was quite interesting:

style=”*background:red!important;background:white!important;background:blue;”

The first background rule applies to IE7 only, the second to all other (more advanced) browsers, and the last one to IE6 only.  While inline CSS is not good for obvious reasons, I have found this hack to be quick and useful when restricted by bad design in some of our older sites.

Edit: This can also be used in external CSS files, as shown by this neat tutorial.  Furthermore, it shows that we can combine the star hack (applies to IE6 and 7) with the underscore hack (applies only to IE6), to produce a more streamlined version of this style attribute:

style=”*background:red;background:white;_background:blue;”

MmmmmmWordPress…

Posted by Sam on 08 Mar 2007 | Tagged as: Internets, Mozilla, Web development

Ok, so new blog set up with minimal customisation (everything is likely to change) and the first theme that validates properly with HTML Tidy (it also happens to be nice and green).

This is the first speed comparison of the new native JavaScript GetElementsByClassName functionality which is built into what will become Firefox 3. Very impressive, it should mean Fx3 will actually feel significantly faster when poking around sites, especially those with lots of JS.

Picture from the above link:

GetElementsByClassName Speed Comparison

On a side note, I’m very impressed with WordPress so far, it’s all very well laid out, nice and intuitive. You can edit anything you want so eventually I’ll be hacking up a theme and hopefully integrating the blog with the rest of the (not yet existent) site. Oh, and the Dreamhost installation really was only one click!