Posts

Autoqueue

A nice little piece of code I came across quite a while ago and have been meaning to blog about ever since I wrote some code to extend it properly to the Rhythmbox music player is a generic cross-player autoqueue project.

The idea of the project is to generate interesting tracks to queue up automatically in your player while you're listening to music based on what you're currently listening to.  Put simply, seed your playlist with a few tracks of the sort you want to listen to, turn the plugin on and it will continue to populate your queue with similar tracks.  It's great when all you want to do is have some non-particular music in the background (say when you're coding for example) and you don't want to bother with managing what's playing right now.  If you're in the mood for some acoustic through to heavy metal, just seed with what you want and let autoqueue do the rest.

The Rhythmbox plugin for this project wasn't particularly mature when I picked it up so I've modified it so now I've got a nice little button in my player that I can use to switch the plugin on or off depending on whether I want to choose the tracks or allow the plugin to do it for me.  Autoqueue attempts to be generic about the players it supports by essentially providing a library that player plugins can talk to over a dbus interface.

The autoqueue project itself currently supports 2 mechanisms to determine track similarity.  There's what the project seems to hold as the primary method which is comparing the audio signal of the track you're listening to with those in your music library.  It uses an external library called mirage for this which was originally written for the Banshee player.  Then there's the method I prefer to use which is to call out to last.fm to ask for the similar tracks to the current one playing and queue up one from the list you already have in your library.  Eventually, I'd like to extend this so it takes into account your last.fm profile such that the similar tracks picked are ones you prefer to listen to.

While it's a great little project and I love this type of idea for generating dynamic playlists, the project is fairly stale, not much activity in development and the code repository is way more up-to-date than any released zip files.  However, if you're interested it's easy to get going so long as you know how to write a plugin for your player.

<edit>See comments from the project maintainer below for latest updates on project status at the time of writing.</edit>

Computer History

Hint to where my
first PC came from.
I was digging around clearing out a load of old paperwork from the house the other day and came across a load of old receipts and invoices.  I nearly threw them straight in the recycle pile but looked through and thought they actually contained quite an insight into the history of computer progress and pricing.

Not necessarily wanting to hang on to the paper I thought I'd make the info available here for future reference so here follows my computer history from way-back-when.  There's a chance not all of it was mine since some of it was delivered to friends houses and I've always regularly ordered kit on behalf of parents (who doesn't?), etc.

1995 JuneMy first PC system, we actually bought it from a shop in Basingstoke!
Pentium 60 PC with 540MB hard disk, 14" CRT monitor, keyboard, mouse, speakers, joystick, mouse mat, DOS 6.2, Windows for Workgroups 3.1.1, OS/2 Warp.  £1229.
1995 September - Wow, these things really were quite expensive!
10 Floppy disks.  £18.60.
1995 November - Replaced my Epson dot matrix (used with my Acorn A3010).
Canon BJC 4000 Printer.  £280.85.
1996 January - No idea why I kept the receipt for this. 

Worms.  £27.99.
1999 August/September -  I didn't invest in computer kit in the previous years (during university).
Borland Delphi 4 for Windows 95.  £89.30.
2x 16MB SIMM.  £47.00.
Maxtor Quantum Fireball Plus 13.6GB UDMA66 Hard Disk £138.65
120MB LS-120 Floppy disk driver.  £58.75
1x LS-120 120MB Floppy disk.  £10.57. 
Abit BE6 Motherboard.  £88.12
Pentium III 450Mhz Slot 1 Processor.  £88.12
32MB PC100 DIMM.  £31.00
2000 February - This was actually for some university work!
Creative Sound Blaster Live Player 1024 PCI sound card.  £56.40.
2000 August - Probably my first investment in photography as a hobby.
Agfa Snapscan e40 Flatbed Scanner.  £146.86. 
2001 January - Interesting hard disk, small (by today's standards) but fast.
46GB IBM PATA100 hard disk, 2MB cache, 7200 RPM.  £101.47.
Guillemot Force Feedback racing wheel.  £92.81. 
2001 June - First home network.
Dlink 8-Port 10Base-T Ethernet Hub.  £34.07
8cm cooling fan.  £5.87.
5 metre CAT5 patch cable.  £7.05.
2001 August - What on earth did I do with all these hard disks?
IBM Deskstar 20.5GB UDMA100 hard disk £69.32
Maxtor Fireball Plus 10.2GB UDMA100 hard disk £64.62
128MB PC100 168 pin CL2 DIMM model £18.08
2001 September - Not yet writing CDs or DVDs.
Pioneer Slot-in IDE DVD ROM, 16xDVD 40x CD £56.40
2002 May - I'm still using both of these today!
Asus 16xDVD 40xCD Player IDE
Epson Stylus Photo 790
 

Text Analytics Project Ends

Today sees the end of one of my major work streams for 2011 with a presentation of some research to our sponsors.  I've been working for a good chunk of the year researching text analysis, specifically, the automated expression of facts in controlled natural language.  It's always nice to see some work come to fruition, well not quite fruition in this case since it's research but at least it's reached an agreed stopping point - for now.

I haven't often been involved with relatively pure research in my day job so that coupled with leading the project presented a few challenges in itself which was most enjoyable.  While I can't give away the details, I wanted to express the areas this research concerned here.

The project was a text analytics project, not a new field in itself and a subject on which IBM and my local department (Emerging Technologies) contains many well read and respected experts.  For those of you not familiar, text analytics is essentially applying computer systems to text documents such that some sort of processing can be performed e.g. (simple example) the analysis of pages from news web sites to infer what the current news stories are.

One of the complexities we were investigating was natural language processing.  This is a major area of research for computer systems at the moment and presents one of the biggest problems of applying computer systems to human written documents.  Our brain is able to parse language in ways we've not yet managed to teach computers to do, taking into account context, slang, unknown terms and all sorts of other subtle nuances that make it a hard problem to crack for computers.

My recent work has been investigating how we can express things found in documents in the form of controlled natural language which leads to the question of what on earth is that?  Simply put, it's an expression made using normal words but using more rigid semantics than are found in pure natural language.  This makes it possible to parse it using a computer but it still feels fairly natural to the human reader as well.  This sounds great as you get computers talking a language that feels very usable to humans but with all the added power of memory and processing provided by the computer.  It seems to me this approach might only be a stop-gap solution until computers (inevitably it'll happen some time) eventually understand full natural language.

While having a discussion last night with my wife over dinner she expressed a sometimes-heard opinion from her that I occasionally "speak funny".  This came to light recently when on holiday in Ireland, I suspect it's a combination of both this type of research seeping into my use of language but also my semi-conscious approach to trialling these techniques in the real world and what better opportunity than when immersed in another English speaking culture.

So, as this article is published I'll be standing at the front of a room of people talking about the details of our work with my colleagues.  Wish us luck!

Hursley Extreme Blue 2011 Presentations

For the first time since starting my own blog I've written a post on the Eightbar blog.  It's a site originally set up by a bunch of us working at Hursley to talk about the interesting stuff we're working on in order to show the many different faces of Hursley and IBM.  I didn't want to reproduce the entire blog post here so I'll leave you with a link to the Hursley Extreme Blue 2011 Presentations post but since comments are currently turned off on Eightbar feel free to have any discussion here.

Rhythmbox Artist Prefix Plugin

I've recently started using the Rhythmbox music player.  It seems pretty simple to use and like other Gnome applications is actually quite powerful under the covers but hides a lot of the power from basic use.  You sometimes have to dig a little to find a feature you're looking for.  That said, with no amount of digging was I able to find a feature to enable artists to be sorted while ignoring certain prefixes.  This is a pretty bulk standard feature of most music players and allows artists such as "The Beatles" to be sorted under "B" for Beatles rather than "T" for The.  There's quite a lot of discussion to be found on this in various Rhythmbox bug reports and on the mailing list.  The view of the developers is that it's not possible to automatically provide a one size fits all solution so they implemented the ability to allow users to manually add a sort tag to each track.

I've just written a first versions of a plugin I'm calling Rhythmbox Artist Prefix which allows the user to choose whether to have Rhythmbox attempt to automatically sort artists ignoring certain artist prefixes.  If you use Rhythmbox then give it a try!

The plugin works by querying the Rhythmbox database for artists with the given prefixes and that don't currently have a sort order defined (which allows the user to manually override the sort order derived by the plugin).  So long as the plugin is active it will watch the database for changes too.  The first time you run the plugin it will automatically add an entry to the sort order of all tracks returned by the query and if you leave it running then any time Rhythmbox finds new tracks matching the query their sort order will be updated as well.  Whenever the plugin is notified of a track by an artist such as "The Beatles" and that track doesn't already have a sort order, it will chop off "The" from the artist name and add the remainder (in this case "Beatles") to the artist sort order property for that track.  Quite simple really and I'm amazed it hasn't been done before.

Another New Home Server

Those of you following this blog over the past couple of years will know I've already had several low power home servers including an NSLU2, tinytuxbox and Joggler.  The NSLU2 and tinytuxbox are both history but we've still got the Joggler at home.  After finding it was grinding to a halt with the stuff I was running on it while trying to use it interactively it became clear we needed something else at home too.  Since I was also running out of storage space on my home PC a NAS solution seemed like the obvious choice so I went for a Netgear ReadyNAS Ultra Plus 2 (RNDP200U).

I opted for the ReadyNAS Ultra series because I run a SqueezeBox Duet for my music and Netgear are the only partner directly supported by Logitech for their music devices.  After spending huge amounts of time hacking the NSLU2, tinytuxbox and Joggler I felt it was about time I had a device that "just worked" so the option of simply downloading and installing stuff and having it work is really quite attractive.  Of course, other NAS devices can run SqueezeCenter but whether the community supported versions work well and are kept up to date is another matter which I didn't investigate thoroughly.  Another good reason for choosing the Ultra series is they're based on x86 hardware so some of the code and plugins I know I want to run which had previously not worked (or been possible) on the slug for example would be fine, a lot of NAS boxes are still running ARM processors.

The Ultra 2 comes in 2 flavours and I went for the more powerful of the two (the Ultra 2 Plus).  They are exactly the same except the Ultra 2 Plus has a dual core processor vs a single core on the Ultra 2.  Given I'm fully intending to run what is probably more than average on the NAS the chance of getting a more powerful processor was well worth the extra few quid it costs.

On the subject of price, the NAS solution is probably one of the more expensive ways to get yourself a home server.  Again though, the "it just works" factor comes heavily in to play here as I'm not responsible for installing the O.S. and setting up a raft of different services on the box, they're all just there, working!  Probably the most competition for a NAS would be the Asus Revo running Linux, possibly with FreeNAS on it too.  The Revo with the same processor as the Ultra 2 Plus I bought is around 60% of the price.  The Revo isn't able to support the amount of storage you can get with a NAS device though, doesn't (easily) support RAID and if I did want to do those things it would have to be with ugly USB attached disks which are hard to spin down when not in use.

It took just a matter of hours to unpack, boot and setup the device in the way I wanted.  The array has been formatted and exports a share to Linux and Windows boxes, all my data has been copied on there with plenty of room for expansion and user management is sorted.  After that, updating SqueezeCenter to the latest version was simple and installing other additional software (whether official or community supported) is also really easy.  So far I've set up transmission (for bit torrents) and enabled ssh access.  Hardware management is all done through a web interface so the option of automatically powering on/off the device on a schedule or setting up disk spin down is merely just a box tick away.

I've got it connected to a 10/100 switch which is fine for streaming music to the SqueezeBox or sharing pictures with the Joggler but for access from my PC and to large amounts of data I figured that throughput wouldn't be enough.  Fortunately, the NAS has 2 Gigabit Ethernet ports so I've used the second one to direct attach it to my PC and enabled Jumbo frames.  The performance over that link has been absolutely fine whether measured simply by the subjective feel of how long it takes to do certain tasks or via a more rigorous iozone test.

With the tasks of device and software management all taken care of the the thing up and running in no time at all, I'm looking forward to having more time on my hands to do some even more interesting hacking with the box instead.

ReadyNAS Ultra 2 Plus

I recently bought a Netgear ReadyNAS Ultra Plus 2 (RNDP200U) Network Attached Storage (NAS) device and before buying found it hard if not impossible to find out the finer technical details of the hardware specification.  In a similar way to some of my previous posts I thought I'd list out some of the key specs as found under Linux running on the device.

It appears to be running a distribution based from Debian Etch which Netgear have modified to make what they call their Raidiator operating system.  It shipped with Raidiator version 4.2.15 and this is upgradeable when they release new versions.

The kernel version is 2.6.33.7.RNx86_64.2.2 and (surprisingly) is x86_64 rather than the 32 bit OS I would have expected.

The tech specs list the RAM as 1GB DDR2 SODIMM and I can happily report free sees all 1GB available, there's around 500MB of swap space too.

They seem to carve out some sort of virtual storage on the disks you put into the box too.  I've not quite worked this out yet but df reports the following
/dev/md0              4.0G  572M  3.3G  15% /

The CPU is pretty beefy for this type of hardware, Linux sees one processor and two hyperthreaded cores so you get four lots of the following in /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping : 10
cpu MHz : 1800.215
cache size : 512 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm
bogomips : 3600.43
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

The other hardware in the system is pretty much covered by the output of lspci
Host bridge: Intel Corporation Unknown device
VGA compatible controller: Intel Corporation Unknown device
Display controller: Intel Corporation Unknown device
PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1
PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2
PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3
USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1
USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2
USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3
USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4
USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller
PCI bridge: Intel Corporation 82801 Mobile PCI Bridge
ISA bridge: Intel Corporation Unknown device 27bc
SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) Serial ATA Storage Controller AHCI
SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller
Ethernet controller: Marvell Technology Group Ltd. Unknown device 4380
USB Controller: NEC Corporation Unknown device 0194
Ethernet controller: Marvell Technology Group Ltd. Unknown device 4380

The hardware Specs from the ReadyNAS site are

Physical Specifications
Intel® Atom 1.8 GHz Dual-core CPU (Ultra 2 Plus)
1GB DDR2 SODIMM
Two (42) Serial ATA II channels
Hot swappable and lockable trays
Two (2) 10/100/1000 Ethernet ports
One (1) USB 3.0 port
Two (2) USB 2.0 ports
Embedded 128 MB Flash Memory for OS
Kensington Lock security hole
Software controlled 80 mm chassis cooling fan
Dimension (H x W x D): 101 x 142 x 220 mm (3.98 x 5.59 x 8.66 in)
Weight: 2.07 kg (4.56 lb), without hard disks
Electrical
60W External AC power supply
Input: 100-240V AC~ 50-60Hz 5A(Max)
Power Consumption
34W typical with 2 x 2TB disks
32W idle, 19W with disk spin-down
Environmental Compliance
0 to 40 C (32 to 104 F)
20% to 80% Humidity (non-condensing)
FCC, UL, CE, RoHS, C-tick, VCCI, CCC, KCC compliance
Available Configurations
Diskless
Half-populated

When Jogglers Go Bad


My Joggler went wrong over the festive period 2010.  It refused to boot, it simply showed the O2 logo on the screen and didn't go any further so it appeared to get stuck during POST somewhere never reaching the boot loader.  I was going to replace it with something else but was (quite rightly) persuaded to use the guarantee to get another one since it was only 8 months old.

I contacted O2 early in the new year via their usual support channel.  What follows shows just how wrong a company can get it when they venture outside their core business.  It seems all support processes and staff just were not cut out for supporting the Joggler.  The best way I can put across my experience is simply to recount the notes I took at each point of contact with them.  I had a feeling at the start of the process this wasn't going to go smoothly so started taking notes from the very first call.



7th January
Called O2 for the first time to report my broken Joggler.  Spoke with "Neil" and agreed the Joggler team would call back in 3-5 days.  Direct Joggler support is not available to the customer, Neil has to email the Joggler team to get them to call me back.  It seems even O2 customer support aren't able to contact their Joggler team via any other method than an internal email.  Neil was not able to find a record of my purchase since I'm not an O2 customer for anything other than the Joggler.  Fortunately, I still had a copy of the dispatch email so was able to look up the order number to locate the purchase on the O2 systems.  I left mobile and work numbers with Neil and was given a support case number.

10th January
Received a call from "Simon" in the Joggler team.  He queried the symptoms of the broken Joggler and asked for it to be sent into O2 for a replacement product to be issued.  I agreed to return the Joggler to an address Simon was able to confirm via email.  He advised this process should take up to 2 weeks in order for me to receive a replacement and that I should obtain proof of postage.

11th January
I returned the Joggler via first class post to the address Simon provided with a cover note including all my contact details and the case ID number.  Proof of postage was obtained.

1st February
No Joggler or correspondence received from O2, twice as long as promised.  I phoned O2 support and spoke with "David".  He emailed the Joggler team once again and I agreed to receive another call-back from the Joggler team by phone for an update on the issue.  Particularly, why four weeks have passed without any contact from O2 when I was promised a replacement product within 2 weeks.

4th February
No call-back yet received from the Joggler team.  I responded to the email sent by Simon on 10th January asking for an update.

7th February
Still no call back.  Phoned O2 and spoke to "Thomas Wright".  He investigated and informed me he thought the case had been sent to the wrong team and he was going to email the Joggler support team.  I agreed that I would receive a call-back from the Joggler support team within 48 hours and left my home telephone number in addition to the details already on record with Thomas.  He informed me everything I had been told so far must have been incorrect and I could now not expect to receive a replacement product and O2 might instead insist on issuing a refund instead.

9th February
Wrote to Matthew Key, the O2 CEO, via email.  I wasn't expecting a response to an individual case query but thought he might be interested in a copy of my notes recounting my poor experience with his company.

15th February
Again no call, email or any form of correspondence from O2.  Phoned O2 and spoke to "Robert".  He investigated and was going to pass me to a senior advisor but none were available after a lengthy hold period on the phone.  He said he would continue attempting contact with a senior member of his team and call me back later.

I raised a formal complaint via email to complaintreviewservice@o2.com and copied Matthew Key for his information once again.  I used the advice from the government Consumer Direct site, stating what the issue was with full reference to my notes and case ID and giving O2 14 days to respond before starting small claims proceedings for their breaking the terms of their guarantee i.e. running off with my money!

17th February
Received a call (finally) from O2 but it wasn't from the support department as expected, instead it was a member of the CEO office, Jonathan Moore.  It appears my emails to Matthew Key had got through.  Jonathan was responding to my formal complaint email sent 2 days earlier.  He apologised for the way I had been treated by O2 and promised to take my issue under his wing and follow it through to conclusion.  His thoughts on the issue were that I would be issued a refund rather than a replacement product.  He was not aware of any support systems that might be able to use the case ID I had given him, seem O2 aren't joined up at all and they have several different support systems.

18th February
Jonathan Moore called twice during the day to confirm he was sending out a refurbished Joggler in addition to organising a full refund for the original purchase.  The original purchase include a £10 mobile broadband USB dongle, the cost of which was also refunded.  He had managed to contact both the Returns Department to determine there are in fact a small number of refurbished Jogglers available to send out as replacement products and the order team to organise the refund.

During the week beginning 21st Feb I received a refurbished Joggler and was able to verify a full refund had been credited back to my account.  I don't think I'll be returning this Joggler when it eventually goes wrong as I don't much fancy going through all that again.  While I'm clearly satisfied with the response of receiving both the refund and the replacement I view that merely as compensation for the hours (literally) spent on the phone and costs incurred.

Would I deal with O2 again?  Actually, I probably would but that would very much only be for their mainstream products but if a competitor had a comparable offer I'd probably shy away from them now.  I'm still awaiting a call return from Robert in support and 2 calls from the Joggler support team... useless!

CEL MT3 Multi Tool

I've been re-grouting my kitchen and bathroom recently, not in itself something worthy of a blog post.  However, I discovered a power tool to make the job far easier and since a few people have already asked me about it...

The MT3 made by CEL UK is an oscillating Multi Tool with all manner of different attachments, one of which is a carbide grout removal tool.  The fact the tool oscillates (rather than rotates, say like a Dremel multi) means you don't fling the grout all over the house as dust.  Vibrations from the tool are enough to remove grout and drop the majority of the mess neatly out of the joints in front of you.

I think at this point you probably already get the picture so here's a fun video of someone using the tool before I splurge out a bit more detail on it:
As you can see in addition to grout removal, it can be used for cutting but also sanding, rasping and probably a whole load of other tasks too.  There's a bunch of other videos on the MT3 and other tools from CEL on their YouTube channel.

As an alternative, the known branded version of this thing is the PMF 180 E from Bosch.  The best deal I found on the Bosch was at Amazon who sell the tool and large accessory pack together for just under 100 quid at the time of writing.  This is more or less the same price as the MT3 from CEL so here's my logic for why I didn't go for the big name product.

Accessories are expensive for both products, but the Bosch is even more expensive than the CEL.  However, the Bosch is only capable of using bits supplied by Bosch themselves where as the CEL is capable of using bits from pretty much anywhere, including Bosch (they include an adapter for Bosch bits).  Given this and the fact the CEL is slightly more powerful I thought I'd go for supporting the small British startup company rather than the large German corporation and if CEL doesn't survive into the future I can always buy alternative bits for the tool from other manufacturers anyway.

Now I've mentioned CEL are a small British startup, it's probably a good point to say they successfully pitched on the Dragon's Den TV programme back in August 2010. You can see the designer and company MD, Chris Elsworthymaking his pitch on YouTube.  However, it seems that ultimately CEL didn't accept the offer of investment.

Dealing with CEL while buying the tool was an absolute dream, one of the best Internet buying experiences I've ever had and really shows how the personal service you can get from a small company makes a difference.  I wanted to buy the MT3-C Pack which at the time was advertised as "coming soon" and is made up of the MT3 Tool, accessory pack, and a case.  Buying all 3 as a pack represented a saving of around £20.

I wrote to the generic sales email address on their web site asking when the pack might be available as I was interested in buying all 3 products together.  Within half an hour I had a response back from their office saying they had all three parts, they were willing to put them together as a pack and honour the advertised pack price on the web site.  This is where it gets really good, in addition they also sent through a PayPal invoice so should I wish to go ahead with the purchase I just had to complete the invoice and they would send the products out that afternoon for next day delivery!  At this point it was a no-brainer, I returned the invoice and followed up via email too.  Again, only half an hour later I had a response saying they had received the payment and sent the product out.  8:30am the next morning arrives and I've got my new tool, brilliant!

So far the tool and dealing with the company have both been great so I'm completely sold and wish CEL every success for the future and in creating some more great kit.

Building Native-like Web Apps for Mobile

Sencha Touch
I spent a few months at the back end of last year working on a project to bring company information down to mobile devices within that company.  I took the decision early on in the project to implement the solution using a web browser to host the application and a Javascript tool kit to fake the look and feel of a native application inside the web browser.  It's this technique and tool kit that I want to focus on here.

The first key decision in a project such as this is whether to go with a native application or an app delivered through the browser.  Since in this particular case the people I was writing for all used iPhones, perhaps the natural choice would have been to write a native iPhone application.  They could, however, just as easily have been using Android or a whole host of other devices.  The real benefit of the native application (aside from speed perhaps) is the ability to interact with the hardware on the device your application will be running on.  Since I did not require access to a camera, GPS, accelerometers or any other phone features, delivery through a web browser was a very realistic option.  In giving up the ability to access these hardware features you gain the ability (if done carefully) to write-once run-anywhere.  That is, the application I came up with would be able to run on an iPhone and Android or pretty much any device with a web-kit based browser and a decent touch screen interface, but at the cost of not being able to use, for example, a bar code scanner.

There are probably others but to the best of my knowledge there are currently three Javascript toolkits positioning themselves for the mobile space.  Dojo MobileJQuery Mobile and Sencha Touch.  Did I just say positioning for mobile space?  Lucky you, if you're playing buzzword bingo, sorry!  At the time of creation, Dojo and JQuery weren't options, they are both only now ramping up development in this area and in the case of JQuery releasing early alpha drops.  Sencha Touch was much more advanced and already at a 0.90 beta when I first started playing with it.  I followed it through the beta development cycle over the summer months in 2010.  Fortunately, it seemed the timing of the production release of Sencha Touch was likely to be at the same time the first phase of my customer work went live so it became the obvious choice.

As a bit of background (and again this is my understanding so may not be absolutely accurate) Sencha was formed by the merger of JQ Touch and the EXT JS toolkit when the original author of JQ Touch, David Kaneda, joined forces with EXT development.  Essentially, Sencha Touch is the next generation version of JQ Touch but now has a small army of developers, a community, and a company behind it to provide a support network.

I quite like the approach of delivery mobile apps through the web browser, where it's appropriate to do so of course.  I've already discussed that in my view you can develop a web app in the browser if you don't need access to the device hardware.  If you don't require that sort of access, it's hard to see why you'd want to develop any other way.  As an Android user, I often get frustrated when apps (pointless or otherwise) are released only for the iPhone simply because that's what an iPhone user expects.  One example I had recently was while reading through my subscription of BBC Good Food magazine who seem to provide only an iPhone or iPad application.  In fact if you go to their web site they also provide a Chrome app and a Samsung Wave app, why I wonder?  The magazine simply displays content with little or no interaction from the user, sure the online versions contain video and other features you can't put down on paper but there's nothing there to suggest the maintenance of a myriad of different apps for different mobile platforms is worthwhile.  Not to mention my surprise that an organisation such as the beeb are carving up their community by device type rather than, as we'd expect, supporting the masses as we saw with iPlayer coming to Mac and Linux after their early Windows only versions.  Surely, a javascript toolkit approach here would be better?

In the early days of my playing around with the Sencha Touch beta code I wrote a mobile version of a badminton web site I maintain.  It's not particularly advanced and certainly not representative of all the things you can do with a toolkit like this but thought I'd put it out there anyway.  It should, at the time of writing work with iPhone, iPad, Android and Blackberry devices and quite probably with others too.  If you're trying on your desktop then make sure you're using a WebKit based browser such as Google Chrome or Safari, or for something a little bit different the great little browser Midori.  For a better selection of demos take a look at the Sencha Touch Demo page and for a developer perspective on the widgets and options available in the toolkit have a look at their Kitchen Sink demo which gives a simple overview of many of the components.