Life On Mars/Ashes to Ashes: It’s over now

I’ve just finished watching the final episode of Ashes to Ashes season 3. The ending didn’t come as a complete surprise, since two years ago I wrote up my thoughts on possible explanations for what was happening. Granted, I was wrong about what if Gene Hunt is an “angel”, but I was right about a few things.

Tyler was sent to make a better man of Hunt.

The reason I’m suspect I’m right about this point- that Sam Tyler was sent to redeem Gene Hunt- is that by the time of Ashes to Ashes, Gene has forgotten who he is and why he was there. Some of the lines in Life On Mars would cast some doubt on whether Hunt had forgotten his role, but we can certainly see the character being redeemed over time. Further evidence is given in Alex Drake’s actions helping Hunt remember who he is and why he’s there.

Interestingly, Hunt ends up forcing Ray Carling to go through the events that led up to him committing suicide- namely that Carling caused a civilian to die during the course of his duty (I’ll have to re-watch Life On Mars to refresh my memory as to whether he beat up the prisoner in that episode), and his boss covered up Carling’s role in the matter. Sharon Granger goes through a similar ordeal in episode 7 season 1 of Ashes to Ashes when she gets stabbed in the stomach, almost dying in the process (and seeing the Angel of Death that had been stalking Alex Drake). Again, I’ll have to watch the DVDs to see if Chris is made to relive the manner of his death during the course of either show.

So in the final episode of Ashes to Ashes, we’ve found out that the world that the majority of both shows takes place in is actually an afterlife of sorts for police officers. In this world, Hunt is responsible for helping them work through their issues. So while he’s not an angel as had occurred to me two years ago, he’s certainly an important figure in the spirit world.

Interestingly, getting back to the references to Quantum Leap I made in my previous musings, Nelson the barman bears some subtle similarities to Al the barman in the final episode of Quantum Leap.

Ashes to Ashes ends things well, and although things were certainly left open with Hunt continuing in his role guiding the spirits of police officers, I’m hoping no further shows are made within the Life on Mars/Ashes to Ashes universe. I don’t really think there were any unanswered questions left (unlike how things ended with Firefly), so any further shows set within the same universe would likely involve entirely different characters (e.g. no Philip Glenister reprising the role of Hunt), or perhaps some plot involving Hunt finding himself a replacement which would allow him to move onto Heaven (such a plot would be unlikely to produce a show as good as either Life On Mars or Ashes to Ashes). However, a book detailing Hunt’s original death and how he comes to gain his responsibilities in dealing with the spirits of police officers wouldn’t go amiss.

Dogbert: Viewer Advocate

Original Strip

Dilbert characters are by Scott Adams and ©2009, United Feature Syndicate, Inc. Mashup created under the Collaborative Content License of The Official Dilbert Website terms, from where the above images originated.

Updates to agni.sl.mapapi.net

I’ve made quite a few changes to my pluggable version of slurl.com, most of which centred around replacing the hash-slurl.js plugin with hash-fu.js. Below is a summary of the changes made today.

The Map

  • Removed some CSS code left over from the original work done for Hack a Day 2009.
  • Replaced hash-slurl.js with hash-fu.js.
  • Removed the Gears plugin since that’s being phased out, with developers being encouraged to use HTML5 goodness.

UI Top Bar

  • Plugins for the UI top bar were altered so they’d report an error if the UI top bar plugin wasn’t loaded instead of throwing an exception to the JavaScript console.
  • The UI top bar plugin was tweaked so it could be hidden.
  • If the error reporting plugin is loaded, but UI top bar isn’t, the modal dialog pops up immediately instead of adding a notification to the UI top bar.
  • Implemented a feature request; When plugins with drop-down boxes are loaded into the top bar, they’re hidden until they’re populated with options.
  • A bug in the region search plugin was fixed (return false wasn’t getting passed from the search handler to the event handler).
  • Support for hash-fu.js was added to the third party services plugin. Example loading the New World Notes stories featuring SLURLs.
  • mapapi.js

    No feature alterations here, just some fixes for a couple bugs that cropped up during the course of today’s updates, one of which was in the error handler and the other was to fix how axes with co-ordinates set to 0 were handled.

    hash-fu.js

    hash-fu.js isn’t too dissimilar to hash-slurl.js, in the respect that they both monitor document.location.hash for changes, then attempt to act upon those changes.

    Where hash-slurl.js tried to cram the processing for such changes into the same file, hash-fu.js prefers to leave such logic to other plugins. Where hash-slurl.js uses an if-else structure with hard-coded feature support, hash-fu.js uses a for structure with callbacks. Additionally, it supports multiple commands being fired in the same fragment via a fake query string e.g. example.com/#?foo=bar&slurl/Ahern/.

    Second Life: Script-triggered Sounds and Viewer Audio Channels

    Second Life allows objects to be scripted to trigger the playback of sounds. These can include anything including (but not limited to) birdsong, gunshots, clicks and sound bites.

    The viewer- or at least those intended to present the full audio-visual experience (there are text-only applications for accessing Second Life)- has an audio preferences panel, giving the user control over the sound levels of various channels:

    • Music
    • Media
    • Voice
    • Sounds
    • Ambient
    • UI

    There’s also the “Master” volume slider, but that’s not a channel per se.

    Currently, all script-triggered audio gets piped through the “Sounds” channel- this allows you to mute in-world audio if you’re on a voice conference, mute the UI if you’re filming Machinima, or mute the in-world gusts of wind via the Ambient channel (though I’m not sure what else uses Ambient).

    An idea that occurred to me that seemed to gain some interest in AW Groupies (hence the blog post here fleshing out the idea a little more) was whether or not script-triggered audio could/should have the ability to be declared as belonging to a specific audio channel, i.e. set sounds like birdsong, the roar of a waterfall or the trickle of a stream to the Ambient channel, so the sound level could be reduced or muted entirely, leaving the user more able to hear sounds like footsteps, doorbells, or anything else that’s intended to provide audio feedback to the user (such as the earlier gunshots example). CodeWarrior actually suggested that some script-triggered sounds might be more suitably applied to the UI channel rather than the current global “Sounds” channel.

    This is obviously a feature that would require some server-side assistance to work as intended, though I am curious to know if it’s possible to have a viewer “intelligently” distribute sounds across the various channels, e.g. if a particular asset gets constantly looped, it should be shoved into the “Ambient” channel. Although not really suitable for long-term use (it would probably break a few intended behaviours in current content), it would certainly give a tangible demonstration of what effect any extra functions should have on the overall user experience. Then of course, there is the issue that any server-side solution would have to be done in such a way that was backwards compatible with non-supporting clients (e.g. not preventing script-triggered sounds from glooming into the global “Sounds” channel).

    Fixing a pet peeve with the display of many Twitter avatars on a single page

    So I sent Suzen Juel a tweet about Spotify, suggesting that if not for distributing her own music, she could use it to let her fans know what music she likes.

    Twitter being twitter and having the open API that it does, SpotiChart had a tweetbot that detected the presence of a link to Spotify playlist, inviting me to make use of their service (and thankfully, their coders seem to have implemented a mechanism to save their resources and the sanity of Twitter users by only sending the automated tweet directed at each user once). So I took a look around their site, specifically the “Most Tweeted Playlists” chart. Given that it was the first time I’d viewed the page, even on my fast (~8mbps) ADSL connection there was a noticeable delay as the images loaded- lots of irritating “broken image” place-holders being displayed by Firefox. Even after all the avatars had finished loading, one or two avatars had just 500′d, resulting in the display of the alt text.

    This experience agitated my web geek sensibilities, and it sparked a possible solution in my head, which I successfully tested.

    The Problem

    The problem lies in browser’s default behaviour when handling uncached images, as well as ones that have failed for whatever reason. If an alt attribute is specified on the image tag, the text gets displayed in place of where the image should be. This isn’t always desirable, since alt text can mess up the layout of a web page.

    Example of Twitter avatar display

    No special CSS close-up

    With no special CSS applied- only some basic floating, you can see that things don’t look so pretty. It looks worse in browsers such as Internet Explorer, which display a broken image icon alongside the alt text.

    Adding constraints

    constraints close-up

    When no dimensions are specified, elements are allowed to expand to accommodate the alt text, or in the case of an image containing no alt text, the elements usually shrink down to a point where they may as well not be on the page. By adding height and width, a problem is avoided where the page expands vertically (and occasionally horizontally) as the content loads. On newer computers this is problem is merely an annoyance, but on older or underpowered devices, this could be quite irritating as it causes unnecessary reflows and repaints.

    We’re still left with the alt text being displayed, as well as potentially having holes appearing in a large grid of avatars when images fail to load.

    Solution Attempt One

    clipping close-up

    The initial solution that popped into my head after visiting spotichart.com worked, but it introduced a problem: images that load will get replaced by the fallback image along with images that don’t!

    Solution Attempt Two

    jQuery solution close-up

    So we need a solution that allows us to only apply the fallback image in cases where it’s needed. Well the server serving an HTML document can’t reliably detect when an image will fail, so the detection has to occur on the client. This is where JavaScript comes to the rescue, or in this case: jQuery.

    Since JavaScript provides an “error” event, jQuery can be used to append a value to the class attribute of an image that has failed to load. When JavaScript is disabled or not available, the CSS provides a graceful fall back.

    Summary

    • Not providing image dimensions can interfere with your layout, and can cause a source of annoyance as the page is rendered.
    • jQuery can help indicate which images failed to load.
    • CSS allows for graceful degradation.

    The code for this solution- which can apply to other situations like image galleries, or anywhere that large numbers of small images are displayed together in a list or grid- is available under the public domain with all the example CSS & HTML removed to make the source code easier to read through.

    Observation: Police and Fuel Prices

    So it seems that fuel prices have reached the point where the local constabulary are being sent out on public transport instead of doing rounds in a patrol car.

    WebComic RSS

    I had a poke around my public services (the stuff on services.signpostmarv.name), cleaned up a bunch of crap that was no-longer in use, then decided to poke around the code for my WebComic RSS service. There’s a mix of UHU4 and UHU5 code in there, so I thought it was time to start upgrading the code to UHU6.

    I’m making heavy use of the namespaces & late static binding features in UHU6, so it’s easier for me to keep things organised (yay namespaces!), as well as trimming down on the code used in methods for inherited classes (yay late static binding!). This, combined with my weaning myself off Smarty templating in favour of Object API methods seems to have made the turnaround time for generating the feed much shorter.

    At the time of writing, I’ve only upgraded the feeds for , , and . Additionally, the simplified code for WebComic RSS in UHU6 eliminated a long-standing bug with the Punch an’ Pie feed which caused the strip urls to be borked.

    Object API methods

    A quick word on what I’m referring to here- basically, I’m using methods with hinted types for the arguments to restrict the input at runtime so I know that the objects going in will be of a specified interface. For instance, the API for my project makes heavy use of the vCalendar format. Rather than creating a never-ending list of parsing rules for the various classes I’ll be creating as I work more on UHU6, I’ve just written a single parsing rule for a calendar class. The calendar class implements the but can only contain objects which implement the “event” interface. Coding to interfaces instead of particular implementations of an interface keeps the code much, much leaner.

    Quick SL Achievements web client demo

    Since I’ve made some progress on the project, I decided to create this video demonstrating the web client for the SL Achievements API that I’m working on.

    There is a working HUD at the moment, but that version of the HUD doesn’t talk with the server so completing an achievement doesn’t get recorded.

    For the API, I’ve used a vCard/vCalendar-based syntax that should be easily parsed by LSL, though some API calls will have extra-condensed outputs available. With the “list all achievements” call for instance, there’s a vCard-based output that’s fairly human-readable, and the extra-condensed output designed to be used by the LSL HUD.

    I Took The Tateru Comic Challenge

    Some say that creativity is a product of our freedoms.

    I’m more of the opinion that creativity is a product of our constraints, whether externally imposed or self-imposed.

    So, the self-imposed challenge: Take five images (already taken) from the digital camera’s memory-card and weave them into a one-page comic that tells a story.

    Tateru Nino

    When your world ends, what will you do ? Will you suffer to deal with your loss ? Or will you supress it, trying to forget the pain ? Or try to move on, look to the future even though it may appear empty ?

    Metaverse ID 0.14.2 released!

    While tinkering away this morning with an upgrade to my WordPress plugin MV-ID, I thought I’d sneak in a new feature: shortcode support!

    What this means is that in addition to sidebar widgets, you can now embed the profiles inside blog posts like so: [mv-id mv='agni SL' id='83b3987f-9520-4275-8efe-3ac13dd3f635'].

    The plugin supports displaying individual profiles as shown above, but also supports displaying multiple profiles in one go: [mv-id mv="WoW EU"].

    Additionally, by including the “h” parameter in the shortcode, the name of the metaverse the profiles are from is displayed: [mv-id mv="CO" h=3].

    Remember- because MV-ID is hosted on the WordPress Plugin Directory, you can install MV-ID right from the comfort of your blog, no FTP or SVN geekery required!

    Bad Behavior has blocked 146 access attempts in the last 7 days.