And God Bless All Who Sail In Her

And so, with nary a soul to witness, the Mobile Phone Project site goes live.  Behind it lie endless, trackless deserts of Python code, some encrusted around the Zope engine, the rest in the background scripts that take the raw content and upload it to the several different servers, watermarking and rescaling images, checking databases and pre-generating webpages.  I’m happy to say that throughout it all, whilst Zope has frustrated me and PIL has fallen short of my expectations, I’ve never once regretted the decision to use Python as the core of the whole thing.  If only I could have written the actual Floofs software in it, my joy would have been unconfined.

Which will raise the question; what the blinkin’ flip is a Floof.  Click and find out.  Enjoy, or not, I don’t mind.  I have a website to run, more software to develop and miles to go before I sleep.  And there’s a bottle of Shiraz with my name on it…

Advertisements

Back To The Future

So the past returns to become my future.  A project heaves into view, and it’s Java-based.  Heavily so.  J2ME, to be precise.  And so the far end of the shelf of books next to me gets dusted off and a pile of Java references thump onto my desk.  I gaze longingly at the well-used set of Python books; farewell, Lutz, adios, Beazley.

Actually, it’s not as bad as that, as well as being worse.  The Python coding will continue, since the entire web-site is Zope-based, and all the utility code that uploads, downloads, munges, packages and files the serial numbers off data is all in Python.  That’s why it’s not that bad.  What’s worse is:

  • I’m going to have to get my head back into Java-mode
  • I’m going to have to switch between two languages on a daily basis

I’m sure many of you have been there; the realization hits you that huge swathes of the syntax of a given language have settled in your fingertips rather than in your head.  Semicolons magically appear at the end of statements that don’t need them[0].  Braces flicker in and out of existence.  And if you use the same editing environment for more than one language… you lack even visual cues as to what the hell you’re supposed to be writing in.  Switching languages, when you’re a deep hacker, is a pain.  And I humbly submit that this simple fact is hugely responsible for the continuing prevalence of C and C++.

You know how it is.  You try out a new language; grab yourself an IDE (or even just fire up vi, emacs or notepad) and there it is.  A blank page.  Waiting for you to create.  But you don’t know the words to use.  You have to start looking at examples… figuring out the basic idioms of the language.  And all the time, nagging at you like an imp sitting on your shoulder, is the knowledge that in a month or so, you’re going to look back at the code you’re writing now and cringe at how naïve and newbie this code you’re writing now will look.  Ugh.  Thus the continual drive to use the languages you already know; the fear of looking as though You Don’t Know How To Program.  Because, of course, you do: it’s part of the deep and fundamental definition of yourself.  No wonder people stick to C.  They have self-images to cling to.

On the other hand, I already know Java.  Or at least, some dormant, swapped-out part of my head does… it’s just that it takes a while to page in that knowledge from whatever slow, offline part of the cortex it’s stashed in.  Whilst[1] shifting my Java books, I found my very first Java In A Nutshell.  From 1996, before O’Reilly made all their covers follow the animal-print style (this one has some bloke in black and white pyjamas – I think it’s supposed to be a referee, if you’re American).  It’s completely annotated with notes, covered in post-its… once I had my head so deep into Java that I had trouble with C.  But that was with Java 1.0.  These days, of course, we’re in Java 2 land.  I fish out the newest Nutshell… Java 1.1.  I sigh, and hie me to Amazon for an updated copy.

The extra-super-interesting fact about this project is… it’s mobile.  Therefore J2ME.  For those who haven’t encountered this set of platform/configuration/profiles, let me assure you that if you thought Java was for big, sprawling, memory-hungry enterprise stuff, J2ME is about as far as you can get from there.  We’re talking about midlet sizes of 64k, total.  We’re talking about platforms with no floating point support at all, and where releasing resources is vital, lest the tiny RAM space available overflow.  We’re talking about trading off a compressed file format against the size, in bytecodes, of the code required to decompress it.  And before you say it, I will; it’s like going back to the 1980s again, and writing for those single-board microcomputers where having BASIC was a luxury.  Yowza.

So at one and the same time, Java is more powerful than I remember… and vastly more limited.  What brave new world that has such contradictions in it!  Now, which are the curly brackets again?

[0] To make this worse, I remember that when I started Pythoning several years back, it took me ages to realise this was happening.  A semicolon is a legal statement separator in Python, so there were no error messages or the like to warn me of the lingering Java/C-ism…
[1] Ages ago, I used the word “whilst” on a progress dialogue, in an X-Windows application.  It came up during a demo of the software to some big-cheese American customer (since the demo was in the USA, this was to be expected).  After all was shown and explained, he said, thoughtfully: “I like it all, but how come you guys can’t spell while?”  It was only then that I became enlightened as to the absence of this word from the American English vocabulary.  Go figure.

General Purpose Is A Bad Idea

‘Course, I don’t necessarily believe that, but it’s a good premise to think about.  Musings on very cool dedicated devices.

I get lost.  A lot.  This is not something to which most blokes[1] will readily admit, but I’m past caring.  I’m okay at remembering routes when I’ve driven them a few times, but a couple of wrong turns and I’ve had it.  If there were a Directionless Anonymous for those of us who are navigationally challenged, I’d be there, standing up and muttering my name and confessing: “I’m Ben, and I can’t tell you how to get from here to the A50.”

So for a good while now, I’ve suffered from SatNav Envy.  My boss, for example, has one in his Not-Really-An-SUV.  My dad has one in his Not-Really-Compensating-For-Turning-Sixty-Vehicle.  A couple of weeks ago I swear I saw one installed in a Robin Reliant[2].  So, when flicking idly through the latest issue of Empire, I saw an ad for this, I did something I never do when reading a magazine.  I stopped and looked at the advert.

Now, cynical Brit as I am, I believe only a certain amount of product blurb; pretty much I believe the name and maybe the price.  The rest I assume is hype, marketing guff and general flimflam to persuade me that I should covet the items displayed before me.  So I went in search of comments from real users, via Google.  And boy, did I find them.  They glowed.  They praised.  They were, to sum it up, as chuffed as it is possible to be after shelling out over £400.  And so, prepared to eBay the damn thing if it failed to live up to my dreams, I bought one.  It sits beside me now.  And it’s wonderful.

Well, let’s define wonderful; in this context, it means does what it’s advertised as doing and does it well.  But what really interests me is that it’s a computing product.  Inside the actual Go is a 200MHz ARM920T running a Linux-based OS.  But it’s not, in any real sense, open.  Sure, you can add in extra sets of data via the memory card, but this is a dedicated device of the best sort.  What it does, it does beautifully.

Previous TomTom products have been PDA-based.  Makes a certain sort of sense – a PDA is a general purpose computer that’s designed for portability, but I balked at shelling out for an iPaq or the like just so I could navigate.  I mean; I already carry a smartphone and a laptop.  I don’t want another personal digital whatsit to tote around.  There seems to be that same old trend re-emerging; the towards the idea of unified devices.  Remember the combined PC and Megadrive?  The several attempts to fuse a TV and a PC?  These days it’s phones that are also mp3 players (with pitiful amounts of storage).  Don’t like ’em, don’t want one.  I like dedicated devices, like the Go.

Anyway, if you really want to know more product details, go read the many reviews.  Cheapest UK price is Amazon.  Enjoy.  Me, I’m off to listen to it telling me how to get downstairs to the kettle.

[1] Translation for Americans – bloke = guy.  In the male sense.
[2] Further translation for Americans – the Robin Reliant was/is an incredibly cheap three-wheel fake imitation car substitute sold in the UK.  It had all the style that’s associated with the 1970s and was as stable as you’d imagine a three-wheeled vehicle to be.  Naturally, it now has a cult following.

Bluetooth, Bluetooth Everywhere

I’ve been at a show.  The Symbian Expo, to be exact, in fair London City.  Well, the rather-less-fair Docklands part of it, but hey; trade shows will be held and those seeking to engage in commerce must attend.

Anyway, one of the tasks that I was carrying out was installing The Mobile Phone Project onto Series 60 handsets for people to play with, crow over and generally applaud/denigrate.  To do this, I had the choice of:

  • Infra-red; delicate positioning of handsets, the eternal search for what obscure bit of the casing is actually the IR “eye”, the slow data exchange.  I think not.
  • Just pop your memory card in here…; have you ever tried that?  Guaranteed route to odd runtime errors until you get around to formatting the damn thing.
  • Bluetooth; fast RF transfer – batching up of files… yes!  Let’s Do It That Way.

Now, there are those commentators (mostly American) who will assure you that Bluetooth Is Dead.  Perhaps they should fire up a Bluetooth-equipped laptop in the middle of a mobile phone trade show in Europe and see what they get.  Remember – Bluetooth range is limited; we were only seeing devices that were enabled and discoverable (around 50%) within a few metres.

The big problem was finding someone’s handset to do the actual transfer.  What the image doesn’t show you is that nearly every 6600 out there has the Bluetooth name “Nokia 6600”.  I’ll bet you can guess what the other Nokia models were called.  Thus you’d have to check that Bluetooth was on, that the handset was discoverable, that the name was distinguishable, wait up to a minute for the Bluetooth stack to report all the devices it could see… and after that, you needed to put in PIN numbers and accept transfers.

Bluejacking?  If only it were that easy…