Posts

Showing posts from 2009

All Self-Service Checkouts Are Not Equal

Having just read this article about The problem with self-service checkouts on the BBC News Magazine site, I started to pen a response but it soon grew beyond a simple comment, so I thought I'd publish it here instead. Let's look at two stores differing approach to self-service. Sainsbury's variant seems specifically designed to be as inconvenient as possible, with a tiny area allocated for you to tortuously scan all your shopping and then put-each-item-one-at-a-time-into-the-bagging-area. The system is a nightmare if you are trying to pay for a large grocery trip. To date, I have never had an experience with Sainsbury's self-service where the system didn't have a problem of some description requiring a staff member to meander over and enter a code to allow me to continue. It always falls over if I try to use my own bags rather than taking fistfuls of the orange plastic ones provided. I was in there last weekend and the ghastly thing allowed me to finish scanning...

Gotta Love Joined-Up Government

Image
As many will know, five weeks ago today, back on October 12th I had an episode of impactful tarmac interaction - as in I came off my bike. Of course, to say 'came off my bike' does not illuminate the context of the event, and lends itself to speculation of incompetent riding resulting in a self-inflicted tumble, or perhaps the other extreme of having been mowed down by an errant eighteen-wheeler. In the interest of illustration, I shall provide that required context in the form of... telling you what happened. View Larger Map I was pootling along Long Lane in Tilehurst, Reading (UK), which is near where I live. As I was approaching the junction with Orchard Close, I saw three boys (I'd say between 8-10 years old I think) on bicycles waiting on the pavement to cross the road. The first of them kicked off and was safely to the other side long before I was anywhere close. The second made a motion to go, but looked and saw me, and stopped. I made eye-contact to make sure he...

Thai Curry

Image
This particular blog is for Onimua, who asked me over Twitter how easy this kind of dish is to create. You must excuse the quality of the photography in this entry - with the exception of the image above, I just took snapshots with my iPhone, the camera on which is pants . The answer to Onimua's question is, 'very' - if you have the right ingredients. To start, you will need: Thai curry paste Coconut milk Creamed coconut Palm sugar Thai fish sauce Bamboo shoots Petits pois For the particular variant I am describing here, you will also need: Fresh galangal Baby corn ... and your curry paste will need to be yellow. There are five different kinds of Thai curry paste readily available in asian supermarkets and the occasional western supermarket. They are Red, Green, Yellow, Masman and Panang. Each have their own characteristics, between fiery hot (green) and gorgeously aromatic (masman). In this particualar instance, I'm using yellow curry paste. The curry paste you use is...

Workaround for jQuery's lack of scope management in event / AJAX handlers

Yesterday, I wrote about the importance of the ability to have event callback functions reference this as the containing object of the method in which the event listener was created, and noted that with version 1.3.2, jQuery does not support this functionality. I also found that the latest version of jQuery (straight from SVN) supports scope assignment through the .bind() function. This seemed great, until I realised that it's necessary to have similar functionality for AJAX handlers too, and jQuery still lacks this. Therefore, after some fiddling around, the following workaround was devised: jQuery.extend({ scope: function(fn, scope) { return function() { return fn.apply(scope, arguments); } } }); Which allows us to do the following... myClass.prototype.addHandler = function(element) { $(element).click($.scope(this.handleClick, this)); } myClass.prototype.handleClick = function() { // this refers to the myClass object, yay! this.doStuff(); } The very nice thing ab...

The Importance of 'this' Scope Management Through Javascript Event Handlers

During the development of vBulletin 3.x, much of our Javascript code started to take on a far more object-oriented style. With more widespread use of client-side scripting for features that would appear multiple times on a page, such as popup-menus vBMenu and collapsible elements vBCollapse , having encapsulated code made development much easier. With one exception - event handling. Let's take some very simple code to illustrate the problem. The purpose of this code is to force all links to be diverted through a different script. It's overkill, but it illustrates the problem. function linkRedirect(link_element) { this.redirect_base = "http://example.com/redirect?url="; this.link_element = link_element; this.link_element.addEventListener("click", this.handleClick, false); } linkRedirect.prototype.handleClick = function(e) { e.preventDefault(); // The following will not work window.location = this.redirect_base + escape(this.link_element.getAttribut...

Garlic and Ginger Chicken Fried Rice

Image
This is a recipe I've been making for a long time now. It's not traditional chinese in any way shape or form, nor does it claim to be. It's just easy to cook and delicious, take it or leave it. Since Jo was diagnosed coeliac, I've had to make a few changes to the recipe, such as making hers with gluten-free ingredients, but essentially it's remained the same since I started cooking it many years ago, with minor tweaks here and there. Firstly, let's have a list of ingredients. Thai fragrant jasmine rice (or american long grain if you can't get jasmine - just not easy cook rice - that stuff is rancid!) Fresh eggs Chicken (or turkey) breasts Frozen peas Fresh root ginger Fresh garlic Light soy sauce (I like to use golden label superior soy, but light soy is fine) Worcestershire sauce (Lea and Perrins) Chinese five-spice powder Chinese shaohsing rice wine (or dry sherry) Pure sesame oil Cornflour / corn starch Salt Monosodium glutamate (MSG, yeah I know I know, ...

The Leap of Faith

A person told me not so long ago that I was standing on the ledge of a metaphorical window, and that I was under the impression that it was very high up. That person told me that in fact, the window was not high at all, and that I should step back off the ledge and I would find the ground a safe distance below me. That person was wrong. The ground was even further below than I had initially thought. The fall was long and terrifying, and when I finally saw the ground it was far from where I wanted to be.

vBulletin Style Blogs at vBulletin.com

I have now posted part two of my series of blogs detailing some of the highlights of the vBulletin 4 style system. Part one dealt with markup and included some screenshots: First Look: The vBulletin 4.0 Style Part two, posted today, lays out some of the ways that administrators can make use of new features of the style system in vBulletin 4.0: vBulletin 4 - Style Variables

Rainy Days

I've had this account registered for a while now, saving it for a rainy day. Check back from time to time, especially if the forecast is for storms.