AJAX v Accessibility on Rails: Fallbacks

Created: 16th January 2006 by Jamm!n

I’ve tentatively placed a toe aboard the AJAX bandwagon, thanks largely to Rails which makes it possible, even painless, to achieve AJAX functionality without having to learn Javascript.1

While AJAX, done properly, can be a big win for Usability for those whose browsers support it, I am also concerned with issues of Accessibility, and indeed keeping things usable for those with non-AJAX browsers.

Standards-Schmandards have come up with some useful hints about how to make AJAX pages more accessible to screenreaders, such as providing an option to pop up an alert box instead of, or as well as, simply updating the page. This is good advice, but it’s only half the story. These methods don’t help those without Javascript at all, or with non-AJAX-aware browsers.

In this article I will detail one method to help ensure accessibility for such people, without compromising on AJAX spiffiness, and most importantly without causing much extra work for us poor developers. The example is in Rails, but may be of interest to those using other frameworks. More »


Quantum Imagination

Created: 21st December 2005 by Ben

Imagine a creature, about the size of a football, which has long green fur, and several purple tentacles with a glowing red eye at the end of each.

You have never seen such a creature; you are never likely to see such a creature. But I bet you were able to imagine such a creature, and perhaps your mind also filled in additional details than the ones I described. Perhaps you added a mouth, teeth, perhaps the creature moved, the wind ruffled its fur. Maybe it had feet. Maybe it made a sound. Maybe you found that a whole environment sprung into existence around it.

Now try to imagine a sphere, a snooker ball say, which is spinning in one direction, and also, simultaneously, spinning in the opposite direction.

Again you have never seen this, but this time, you could not imagine it.

The simple difference is that the creature, however unlikely you are to ever encounter it in your day-to-day life, is possible. It is entirely feasible that this very creature exists somewhere in the universe. The ball spinning in opposing directions is impossible, by the very definition of “spin”.

Now, something amazing comes out of this seemingly futile exercise. Your mind is capable of imagining only what is possible. If something is possible, you can imagine it, just by someone describing it to you, even if it bears little or no resemblance to anything you have seen before — provided it can be described in terms that you understand. But if it is impossible, you cannot, no matter how well it is described.

Why?

More »


Atomic clocks

Created: 29th November 2005 by Ben

Leap seconds are introduced because, according to our reference standard — the atomic clock — the earth’s rotation is slowing down.

But surely it’s all relative? The earth’s rotation could be staying the same, and the oscillation of caesium speeding up, for reasons we don’t understand. Is it actually possible to tell the difference? Is atomic oscillation calibrated against something other than other atomic oscillations?


Parsing CSV files with embedded newlines in Perl

Created: 15th November 2005 by Jamm!n

Need to parse CSV (comma-separated values) files which contain embedded newlines in the fields, as produced by many applications including MS Excel? The usual Perl modules Text::CSV, Text::CSV_XS and CSV.pm can’t do it. Fortunately there is one that can, called Text::xSV. Find it on CPAN. I’m posting about it here to raise awareness because Google searches threw up lots of people asking about this but the answer was not obvious.


Review: Body Glove Scuba Cellsuit for K750i

Created: 13th June 2005 by Jamm!n

A good mobile phone deserves a good case — ideally one that it never has to be removed from, so that it’s always protected from dirt and droppage. So I invested in a Body Glove “Scuba Cellsuit” for my K750i (got it on eBay). Here follows a review with some pictures.

For me the important things about a case are, in order:

  1. Doesn’t impede usage of the phone while in the case.
  2. Provides some protection if dropped.
  3. Doesn’t make the phone twice as big.
  4. Provides extra grip, making droppage less likely.

You’ll notice the absence of any requirement for it to look good. In fact, I’m quite happy for a case to look rubbish if it fulfills all the above criteria. Not least because it makes it look less worth stealing.

The Body Glove however manages to succeed at all the above and looks alright too. Not as good as the phone looks without it, obviously, but that’s fine by me. More »


Sony Ericsson K750i and Linux

Created: 10th June 2005 by Jamm!n

I just had a very strange experience. I hooked up my new Sony Ericsson K750i mobile phone via USB to my PC (running Linux 2.6.11 Debian unstable). And it just worked. I didn’t have to faff around with the USB driver as I’d had to for my Treo 600 a year ago. It just thought for a while, dumped several KB of its thoughts into syslog (I probably selected a debugging option when I built the kernel), and *ping* the memory stick in the phone appeared as /dev/sda. I just had to mount /dev/sda1 (vfat), and there it was.

Almost disappointing.

The phone is very nice, btw. Screen is good, mp3 playback is very good (even with the supplied earbuds — even through the speaker is not bad), camera is alright (for a phone). Organiser is rubbish: you can’t set up events without a time, or recurring events like birthdays, and the bold font used to identify dates with appointments in calendar view is barely different from the normal font. Sometimes I think I should just go back to a paper diary…