Tuesday 3 July 2012

LET'S GO LEGO

Dick Pountain/15 August 2007/14:12/Idealog 157

One of the many misapprehensions about our industry is that everything in it happens at breakneck speed. That may be true in the world of research, but the gap between research and production can be as long as in any other industry - installed bases in the 100s of millions impose huge inertia, while the sheer complexity of systems also induces viscosity, a conservative aversion to change among engineers and programmers alike. One good example is parallel processing, which I spent most of the 1980's writing about for Byte magazine, but which is only arriving on the desktop - in the shape of multicore CPUs - now that it suits Intel (because they're finally running out of headroom in sequential processing power).

Another striking example is the graphical programming interface. I've always been a great fan of environments that let you construct applications by wiring together objects on the screen rather than by writing code, but until very recently it seemed like an idea that had died. (Visual Basic is only a halfway house, because though it lets you drag objects, you still have to join them up with code). Now it seems that the penny has finally dropped in Redmond and Microsoft has announced PopFly, a visual wire-'em-up environment for combining the output from different websites into a single new application. I know it's more trendy to call these "mashups" but that sounds too much like tempting fate (the old programmer's word "mung" came from army slang meaning "Mash Until No Good"). I haven't got enough brownie points to download the PopFly beta for myself, but to judge from the website it really does use the wiring-boxes-together metaphor that I so enjoy. Another recent example came via an old friend of mine, Tim, who writes serious real-time software for a living. He dropped by with a great beam on his face bearing the latest Lego robot-building kit that he's just bought "for his grandchildren", and it certainly is a lot of fun. Most intriguingly, it has built into the controller a scripting "language" called NXT which you use by wiring together prefabricated devices on its tiny LCD screen.

I first encountered this wiring-up metaphor in an experimental application written in Smalltalk at Xerox PARC back in the mid-1980s, but the first proper commercial example I came across was a Windows application written by the UK firm Working Title in 1993. Called CleanSheet, it performed the functions of a spreadsheet but using graphical blocks representing mathematical functions that you dragged onto a blank sheet (hence the name) and then wired together. It was a lot of fun to use and very effective too, though I suspect it looked too alarming to appeal to many accountants. Great ingenuity had been applied to make CleanSheet work effectively: the graphical "wires" you dragged to join one block to another carried multidimensional arrays of data objects - of type Integer, Real, String, Boolean, Date, Time, Complex Number, Equation, Error or Null - which simplified things enormously since every operation returned just a single value but that value might be a six-dimensional array. You could therefore pass a whole conventional spreadsheet-like 2D table as a single object. There were around 60 different kinds of block, including 13 for data input, 11 for displaying data, 30+ for mathematical and other data processing operations and few control objects like switches, junctions and lookup tables that acted as the glue. CleanSheet failed to set the world on fire, and a recent Google search revealed almost no trace of it (and regrettably my old review copy won't even install under XP).

I still have one wire-up application on my PC, a little shareware sound synthesiser called WaveCraft (from Last Unicorn and, perhaps significantly, also written in the mid-90s). It simulates a Moog-style polyphonic, multitimbral, modular analog synthesiser - you get to define a new waveform by dragging oscillators, sinewave generators, mixers, clocks, filters and modulators onto a blank sheet and wiring them together, then it outputs a WAV file of the resulting hideous screech.

What I've always wanted is for this metaphor to be built into Windows itself, as a replacement for - or adjunct to - scripting, and now that Microsoft has finally "got it" about graphical programming interfaces maybe we can look forward to this in some successor to Vista. The way I envision it working would mean adding an extra option to the control menu in the top-right corner of every application's window. This option would switch into "wiring mode", whereupon every input and output box in that window sprouts a thick coloured border (say red for outputs, green for inputs) and a handle from which you could drag a wire to another box in a different application window. Clicking on a wire would pop-up a dialog in which you set its configuration, specifying what kind of values it can transmit (stealing CleanSheet's multidimensional array trick might help here). This way you could, for example, pipe a query from a word processor document into a database manager, then pipe the returned records back into the word processor, just by stretching wires between their windows. Such operations are visually equivalent not to Windows mouse commands but to piped Unix commands, so perhaps one of the Linux GUIs is a more promising place to start...


No comments:

Post a Comment

SOCIAL UNEASE

Dick Pountain /Idealog 350/ 07 Sep 2023 10:58 Ten years ago this column might have listed a handful of online apps that assist my everyday...