this space intentionally left blank

July 10, 2008

Filed under: tech»coding

Microcode

Thee examples of why scripting is an essential part of a "smart" phone:

Example 1: Belle recently switched to Sprint and got an Instinct, of which she will extol the virtues to anyone who will listen. Seems like a nice enough phone to me. But it doesn't rotate photos, so she has to hold the camera the right way when adding images to contacts. We didn't figure this out until after she'd gotten a picture she liked.

My phone also does not rotate photos--as a "business" phone, Nokia treats the camera in the E51 as an afterthought. I can rotate them while viewing, but it's not a permanent change. But since I'd already run into another limitation (the inability to resize photos), I'd taken a half-hour to write a Python script that rotates and resizes images, most of which was spent learning Python's syntax (dear Nokia: ECMAscript variant, please?). So Belle sent me the file via Bluetooth, I ran it through the script, and sent it back. Now she can see a truly dismaying (but correctly-oriented) picture of my face when I call her.

Example 2: A while back I wrote that life for colorblind people often doesn't come up roses (monochromatic ones, even). Why, I wondered, couldn't you use a phone camera to identify colors? Well, you can. I wrote a script called Color Dog that opens up a viewfinder, paints a little rectangle in the center, and displays the average RGB values for pixels in that square.

Example 3: The last call for me on my old phone was that I couldn't easily record calls from it--there's no headphone jack on a RAZR, and taping via Bluetooth is no fun at all. The E51 does have a jack for various audio attachments (for some reason, Nokia calls these 'enhancements') and can even discriminate between inputs and outputs, so I could continue to talk into the phone while taping the conversation through the jack. It's even got a decent voice recorder that can run during calls, for up to an hour (memory permitting).

But let's say I'm paranoid, or I'm forgetful, or I'm being targeted by obscene phone calls. For whatever reason, I want all my calls taped, automatically, and filed under the date and time they were made. That's probably only 40 lines of code, if that--a phone status callback, a basic UI screen, and a function for starting the recording with timestamped filenames. I haven't written this. Yet. This and my idea for an app that responds to SMS with a link to the phone's latitude and longitude on Google Maps (for people who lose their phones regularly) are at the top of my list.

None of these examples are things that any smartphone--or even most camera phones--couldn't do. But they are things that most smartphones don't do. And that difference between "could" and "does" is the important point here.

Is it possible that someone could write an app on another smartphone that would permanently resize and rotate a user's photos, or help identify color values, or automatically tape calls? Sure--even in a walled garden this is possible, although technical issues (limitations on access to filesystem, background processes, or low-level hardware) could make it more difficult. But for example two it's fairly unlikely, and example three much more so, for reasons involving both barrier to entry and (in the latter case) legal liability issues.

However, on a platform that's not walled off, I can freely write these kinds of little scripts to address those problems or add capabilities. And then I can share them with other people, who can just run them, or they can tinker with them and make them better (here you go: ImageTool.py and ColorDog.py). I don't have any problems with walled gardens for buying apps, if that's your thing. But as far as I'm concerned, it's not really a smartphone--a truly adaptable, innovative device--unless it also offers the option of tweaking it on the go this way. It needs to be the equivalent of a digital swiss army knife: if you're going to carry around a Turing machine in your pocket, why settle for anything less?

Future - Present - Past