Tag Archives: Hacking

Blunderground

Recently I wrote about doing some hacking for the Palm WebOS to create a tube app for K. It’s now in a reasonably usable form so I’ve put up a noddy website and a clone of my repository is available on GitHub.

As it’s at a stage where it works for the person I wrote it for (and a bonus user) it’s unlikely to be developed with any sort of pace, too many other fun things to hack on!

I’ve decided against trying to get it in to Palms app store as I’m fairly certain TFL won’t be too happy with me redistributing their map. There are ways around this but I don’t feel it’s worth it at this time, at the very least I’d need to support rotation and likely a couple of other features before submitting it to the app store otherwise Blunderground will just be a target for flames.

Writing apps for the Web OS is really easy, it’s just HTML and Javascript. I kept falling over the lack of static typing and my ability to create a large typo to LOC ratio but not everyone uses the compiler as a crutch like I do.

The develop/deploy/test cycle, even with the emulator, is a touch clunky. Seems to me a lot of the testing could have been done in a browser with a suitable harness but I didn’t have the inclination to develop that, I shall check out Ares if I write another WebOS application.

Finally interacting with web services wasn’t as rosy as the cloud pushers would have me believe, a significant bulk of the development time so far was spent on trying to figure out how to parse the JSON data TubeUpdates was returning. In the end I gave up and switched to using XML which I manipulated with JavaScript DOM methods and had the functionality running in minutes.

Mojo Hacking

Recently K had a software update on her Palm Pre, following this we decided to checkout the state of the app store. The conversation was brief:

“Is there a tube map yet?”
“Nope, I’m afraid not. Still nothing.”
“Can’t you write me one? You like programming ….”
“Well, yes. I do. I can …”

Irrefutable logic! I do like programming and I can write one. I’m no JavaScript developer but heck, time to learn it and give it a try!

Thus I set about poking around on the WebOS developer site, installing the SDK and following the Hello World tutorial. I’ve got to hand it to Palm, this is a *really* nice developer experience.

They have a decent emulator (by wrapping VirtualBox in a little launcher UI, palm-emulator), a rails like project generator (palm-generate), a simple packager and installer for getting things onto the (emulated) device (palm-package and palm-install) and there are a bunch more programs they provide which I assume are equally useful. I’ve yet to try out their IDE support yet, as I’m not an IDE person and just wanted to get stuck in and I already have js2-mode enabled in my editor of choice.
One criticism I have against the developer experience is that API docs, the sample code and the tutorials seem to use different coding styles. This is confusing to a new developer, especially one who doesn’t know JavaScript! Of course style doesn’t make the code, and one assumes that all of the demo/sample/documentation code is functional, but it would make things much easier to learn if there where a consistent style so that paradigms are more easily recognisable.

Once I’d finished fudging through Hello World I palm-generated a new project and hacked together the start of a tube app.

After several iterations I realised that the easiest way to have a pannable map was just to load the map into an <img> and have that inside a Mojo Scroller widget. This after an evening trying to make ImageView do things it can’t… I quickly loaded this 3 lines of HTML “app” onto K’s phone to prevent her having to carry a paper tube map, now I can take my time playing around with the WebOS API’s and hacking together a more full featured tube application for the WebOS.