programming as it could be: part 1

Over a cup of tea in bed I was pondering the future of business data processing and also general programming. Many problems of power-computing like web programming or complex algorithmics, and also end-user programming seem to stem from assumptions embedded in the heart of what we consider a programming language, many of which effectively date from the days of punch cards.

Often the most innovative programming/scripting environments, Smalltalk, Hypercard, Mathematica, humble spreadsheets, even (for those with very long memories) Filetab, have broken these assumptions, as have whole classes of ‘non-standard’ declarative languages.  More recently Yahoo! Pipes and Scratch have re-introduced more graphical and lego-block style programming to end-users (albeit in the case of Pipes slightly techie ones).

Yahoo! Pipes (from Wikipedia article) Scratch programming using blocks

What would programming be like if it were more incremental, more focused on live data, less focused on the language and more on the development environment?

Two things have particularly brought this to mind.

First was the bootcamp team I organised at the Winter School on Interactive Technologies in Bangalore1.  At the bootcamp we were considering “content development through the keyhole”, inspired by a working group at the Mobile Design Dialog conference last April in Cambridge.  The core issue was how one could enable near-end-use development in emerging markets where the dominant, or only, available computation is the mobile phone.  The bootcamp designs focused on more media content development, but one the things we briefly discussed was full code development on a mobile screen (not so impossible, after all home computers used to be 40×25 chars!), and where literate programming might offer some solutions, not for its original aim of producing code readable by others2, but instead to allow very succinct code that is readable by the author.

if ( << input invalid >> )
    << error handling code >>
else
    << update data >>

(example of simple literate programming)

The second is that I was doing a series of spreadsheets to produce some Fitts’ Law related modelling.  I could have written the code in Java and run it to produce outputs, but the spreadsheets were more immediate, allowed me to get the answers I needed when I needed them, and didn’t separate the code from the outputs (there were few inputs just a number of variable parameters).  However, complex spreadsheets get unmanageable quickly, notably because the only way to abstract is to drop into the level of complex spreadsheet formulae (not the most readable code!) or VB scripting.  But when I have made spreadsheets that embody calculations, why can’t I ‘abstract’ them rather than writing fresh code?

I have entitled this blog ‘part 1’ as there is more to discuss  than I can manage in one entry!  However, I will return, and focus on each of the above in turn, but in particular questioning some of those assumptions embodied in current programming languages:

(a) code comes before data

(b) you need all the code in place before you can run it

(c) abstraction is about black boxes

(d) the programming language and environment are separate

In my PPIG keynote last September I noted how programming as an activity has changed, become more dynamic, more incremental, but probably also less disciplined.  Through discussions with friends, I am also aware of some of the architectural and efficiency problems of web programming due to the opacity of code, and long standing worries about the dominance of limited models of objects3

So what would programming be like if it supported these practices, but in ways that used the power of the computer itself to help address some of the problems that arise when these practices address issues of substantial complexity?

And can we allow end-users to more easily move seamlessly from filling in a spreadsheet, to more complex scripting?

  1. The winter school was part of the UK-India Network on Interactive Technologies for the End-User.  See also my blog “From Anzere in the Alps to the Taj Bangelore in two weeks“[back]
  2. such as Knuth‘s “TeX: the program” book consisting of the full source code for TeX presented using Knuth’s original literate programming system WEB.[back]
  3. I have often referred to object-oriented programming as ‘western individualism embodied in code’.[back]

From Anzere in the Alps to the Taj Bangelore in two weeks

In the last two weeks I have experienced both Swiss snow and skiing and Indian sun and traffic for the first time. The former was in Anzere for the French speaking Swiss Universities’ annual winter school and the latter in Bangalore for meetings (including another winter school) connected with the UK-India Network on Interactive Technologies for the End-User. Both have been exciting both personally because of their novelty as experiences and professionally due to stimulating discussions … happily not dry business meetings. I will blog later in more detail about both.

I guess joy always has its pains: in the case of skiing, blisters on my shins; and in India, the nearly inevitable wobbly tummy!

People have been wonderful in both Switzerland and India, both those in the meetings themselves and those I’ve met along the way.

I knew a few of the Swiss people already Denis and Pascal from a previous visit, but most were new including Micheal, my ski buddy, who had been in Switzerland for a long time, but was his first skiing too. Our ski instructor Rudy from Ecole Suisse de Ski et de Snowboard – Anzère was absolutely wonderful with seeming endless patience as we practised again and again (including the odd tumble) things that to him were so natural … if you want to learn to ski, ask for Rudy! In the village the woman at the ski shop was also wonderful helping find the right boots and equipment for someone who hardly wears shoes normally, and when she realised how bad my shins had become, she Christened me “Brave Shins’ :-/ I struggled to recognise her English accent until she explained she was brought up in Belgravia … it was just posh 🙂 However, the lady at the Anzere tourist information was my hero of the week; insisting on picking up special ‘second skin’ plasters from the pharmacy and bringing them to me at the hotel. Thanks to their ministrations my last day of skiing was blessedly pain free.

In India again so many wonderful people, Rama from HP who organized our demo day, the people on my Bootcamp team Ramprakesh, Dinoop and Ramesh, and many many others , and not forgetting the drivers of ‘autos’, including the one who smiled all the time, but got so embarrassed when accosted by the begging transvestites at the traffic lights.

Bootcamp Team: Ramesh, Dinoop, me, Ramprakash
(photo by Ramprakash)

Bangalore dinner: me, Vijay, Dinesh, Sriram
(photo by Ramprakash)

a Bengaluru auto rickshaw
see more and movie at bengaluru-net.in