Category: Computing

Portable computers

I like the iPad hardware; shame about the crippled iOS software. Similarly, I like the Kindle hardware - shame about the restrictive DRM system.

But the biggest shame is that I'm actually tempted to own three or more different computing devices, purely because of different situational specialisations in the hardware. A smartphone (or, more ideally, a wearable computer) for real-time pervasive tasks. A tablet device for portably viewng stuff on (whether it's ideally electronic ink or a nice colour LCD really depends on what I'm viewing) . A laptop for actually working on... ideally a small one for portability and a larger one for power (both in terms of CPU+RAM and in terms of more screen real estate). Plus remote servers that store a significant part of my data since it needs to be available to others in some way (this blog, my email, etc).

But this sucks - there's a lot of duplication of hardware (mass storage and CPU power) there, when I'll only really be using one device at a time. And there's an annoying duplication of data that needs to be "synched" between things. And an annoying variation of user interface, as different devices often have very different models of storage management.

Here's what I'd love to have:

In my pocket sits a smartphone. It might have a Blackberry-style keyboard or an iPhone-style touchscreen, depending on taste. It has a small computer to run its apps, and a battery, and the usual Bluetooth/USB/GSM/etc interfaces. And it has a wodge of Flash to store my stuff.

Maybe it has enough Flash to store all my stuff. Maybe it doesn't in which case, I might also carry a featureless cuboid that contains batteries and a lot of flash, or even a hard disk, or some combination of the two. In which case, my phone is slaved to it - using its own internal flash to cache resources fetched from the storage box, and accessing it via Bluetooth or some more advanced personal-area radio network; but when it's plugged into the storage box via USB, it can access it more speedily, and suckle power from the larger battery.

Perhaps I'm lucky enough to also possess a head-up display (which also functions as a headset for audio), and/or a chord keyer, that talk to the smartphone via radio or wired links. They're just extra I/O devices that plug into it, though.

But maybe I own a tablet computer, or an electronic paper device. They might have their own internal storage, but I'd slave them to my phone, or direct to my storage box (slaving to the phone, if the phone is slaved to the storage box, just slaves them to the storage box, in effect), and use their local flash as a cache. Also, if I don't like their file-browsing interfaces, I can just use the phone to select a file and "send" it to any willing device reachable through the slaving relationships, which causes it to access the file (from the original source) and open it up. The file isn't actually "sent", it just seems that way (except faster, and with a single central copy if I start editing it).

But what of the laptop? Or my big, powerful, desktop machine? Let them be slaved to my phone or my storage box, too. Take my home directory and installed apps from my central storage. Then there's no synching of address books and all that. There might be files in my phone that only laptop-scale software can manage, which I then can't open on the go, but I can at least use my portable devices to email a copy to a colleague who needs one, and to open simpler types of files that happen to be associated with the same project. They can talk to my storage box via a wireless link within range, or I can hook my storage box, phone, etc. up to it via cables for high-speed communications and power distribution.

What will it take to do this? Some cleverness to negotiate which device should give which power when they're joined by a cable (easy if one of them has access to mains power, trickier to decide if they're both battery devices; perhaps the default should be to not share power at all unless asked to by the user or unless the battery of one device is flat, turning it into a non-self-powered device). But it's mainly down to standardising file systems and protocols. Working at the "USB mass storage device" level is a bad idea, as only one device can have such a filesystem mounted. It needs to be more like NFS. And, mainly, devices and desktop OSes need to let go of managing their own filesystem and learn to use a shared standard for home directory layout - which will NEVER happen for legacy systems, but at least they can mount your mobile data store as "My Documents" or something like that, and perhaps make some effort to invisibly sync between their own personal-information databases and whatever's in there.

There'll still be some need for syncing - my email and blog, and shared work stuff like Git repos and group calendars, have to be on servers somewhere. And there's a good reason to mirror my portable storage to somewhere else whenever I can, as a backup. But the less syncing, the better!

Syntax diagrams

I've always liked syntax diagrams as a way of describing languages. They make it clear what options are legal in any given situation.

However, drawing them by hand is tedious, so after a moment's thought, I realised it would be pretty trivial to design a reasonable layout algorithm to generate them automatically.

And so, on a train journey, banterpixra was born!

It's quite simple. It takes a BNF-esque grammer, encoded in s-expressions like so:

(rule
 . (choice
    rule-label
    literal
    (seq "(elidable" " " literal ")")
    (seq "(optional" " " rule ")")
    (seq "(zero-or-more" " " rule ")")
    (seq "(one-or-more" " " rule ")")
    (seq "(seq" (one-or-more (seq " " rule)) ")")
    (seq "(choice" (one-or-more (seq " " rule)) ")")
    (seq "(optional-choice" (one-or-more (seq " " rule)) ")")
    (seq "(comment" " " literal " " rule ")")))

...and it turns it into a nice syntax diagram, rendered as an SVG file. I found producing an SVG to be a very easy way of generating vector images - SVG is quite a decent format to generate, and inkscape will happily convert .svg files to .png and .pdf from the command line, so it's easy to automate rendering.

The layout algorithm is quite easy. The BNF is parsed, and a tree of layout objects generated from the bottom up. Layout objects may contain other layout objects, recursively, and cover a rectangular extent of the two-dimensional plane. New layout objects are created at the origin, and then the parent layout looks at the sizes of the child layouts within it, and relocates them to appropriate locations within itself. When the layout object tree has been generated, it's processed top-down to generate actual SVG. Each different type of layout object renders its children recursively (unless it's a terminal, in which case it just renders itself at the chosen location), then it adds the arrows and lines that join the children together.

That's really all there is to it.

The output is quite decent, if your browser supports SVG!

User Interfaces for Event Streams

Reading Phil Gyford's post about the reasoning behind his Todays Guardian app reminded me of an old interest of mine - the design of user interfaces that show people streams of events.

I hate the fact that I have several systems that have reason to throw notifications at me:

  1. Incoming email (with multiple accounts)
  2. Twitter (with multiple accounts)
  3. RSS feeds I follow
  4. Voicemails/SMSes
  5. Notification of server failures and other such technical problems
  6. Incomng phonecalls, Skype calls, etc
  7. IMs and DMs in IRC, and people mentioning my name in IRC channels
  8. People talking in channels I'm following in IRC
  9. Scheduled alarms (time to stop working and eat!)
  10. Batch processes have finished (I often start a long compilation/test sequence going then browse the Web for five minutes while it runs - then get distracted and come back twenty minutes later)

Many of these event sources are capable of producing events of different levels of urgency, too. It's really quite complex. Some things shout in my face (incoming skype messages cause a huge window to pop up over what I'm doing, for example) while some need to be manually checked (such as email; I get too much spam for the "you've got mail!" noise to mean much to me), and this has little correlation with the relative importance of them.

Obviously, the first thing to do is to have some standard mechanism in the user interface system for notifying me of events. Growl is a start, but it's focussed on immediate notifications, rather than handling a large backlog of events. What I want is something like my email inbox, that has a searchable, scrollable, history, and notifies me when new events come up. But I also want richer metadata than Growl has; I want all IMs, emails, and whatnot from the same person to be tied to that 'source' of events, so I can filter them into groups. I want to have Personal, Work, and Systems events, and to have Personal deprioritised during working and Work deprioritised during personal time. And so on.

The BlackBerry OS goes someway towards this with its integrated Messages system. Any app can register to put messages into the message stream, so when I get emails, BlackBerry IMs, notifications of new versions of software being available, etc. they all appear in the same time-stream and I get a 'new message' notification. I want something similar on my desktop, but with much more advanced filtering and display capabilities. My design for 'user agent' entities in ARGON involves using a standard "send an object to an entity protocol" for all email/IM/notification activities - the same protocol that is used to send print jobs to a printer, files to a backup system or removal storage device, orders to an automated process, and so on; it's roughly the equivalent of "drag and drop" in a desktop GUI. Incoming objects from 'elsewhere' are then combined inside the UA with internal events such as calendar alarms and situations the user agent might poll for, such as things appearing in RSS feeds, into a centralised event stream, by the simple process of translating all internal events into incoming objects like any other; but actually designing a user interface for displaying that is something I look forward to doing...

Phil's analysis of the newspapers interests me, because it's a very similar challenge. You have a stream of events, and the user may want to skim over them to see what's relevant then zoom into particular ones. How do you present that, and how do you help the user deal with an inundation of events, by applying heuristics to guess the priority of them and suitably de-emphasising or hiding irrelevant events, or making important events intrude on their concentration with an alarm? Priority is mode-dependent, too; if you're in an idle moment, then activity in your interest/fun RSS feeds should push out work stuff entirely - apart from important interruptions. And some events will demand my attention to respond to them, in which case they should offer me links to the tools I need to do that - a notification of a problem on a server, ideally, should carry a nice button that will open me up a terminal window with an ssh connection to that server. But some things might require my attention, but I can't give it yet - so I need to defer the task, so it doesn't then clutter my inbox, yet in such a way that it reappears when all higher-priority tasks are done. There are elements of workflow, where events need an initial "triage" to be categorised into "read-and-understood, do now, do later today, do whenever" and maybe prioritised, then later, deferred tasks need to be revisited.

Also, some event streams are shared. Perhaps an event should be handled by the first member of a team to be free, such as a shared office phone ringing, or a bug to be fixed or feature added to a software product. There needs to be some system for shared event pools, with support for events to be "claimed" from the pool by a person, or put back. Perhaps personal event systems should be able to contain proxy objects that wrap events stored in a shared pool somewhere, so they can be managed centrally as well as appearing in personal event streams along with events from other sources. Standard protocols would be required to manage this.

Looking at the relatively crude support for this kind of thing in even the supposedly integrated and smart combined email/calendar apps, I think there's a lot of fun research to be done!

Ugarit Roadmap

I've not had much time to hack on Ugarit lately, which is a shame - but just to keep you enthusiastic, here's my current roadmap.

Read more »

Debill - A Protest Poem

Debasing
Electronic economy
Being blinded by
Illogical idosyncrasies
Leading literate
Lynchings

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales