New Scientist - USA (2013-06-08)

(Antfer) #1
8 June 2013 | NewScientist | 39

A small bug in a financial
algorithm nearly took
down a global company

bugs will worm their way into every corner of
our lives. “Every major industry is grappling
with the enormous and unsolved challenges
of software dependability, design and
productivity,” says Kevin Sullivan at the
University of Virginia in Charlottesville.

Software crisis
In April, a software error meant that American
Airlines had to ground their entire US fleet.
Banking software has already failed many
people in the UK, leaving them without access
to their money for days on end, derailing
house purchases and other major life events.
Tomorrow’s driverless cars will run on code,
but will they be any more bulletproof than the
cars that had to be recalled by General Motors
and Toyota due to software errors?
“It’s sometimes called the software crisis,”
Edwards says, “but that term was coined in
the early 60s and it’s not clear we’ve made
any progress since then.”
But what can be done? One seemingly
obvious solution might be to build a single
universal master language from scratch. In the
1960s and 70s there was a concerted effort to
do just that. Academics, industry experts and
scientists from all over the world converged on
a venue, then tried to thrash out the best way
to standardise programming. “The transcripts
of those meetings are hilarious – people got

into really big fights,” Payne says. They also
got nowhere, as the panoply of languages
today attests. Pagel draws parallels with
Esperanto, the prototype universal human
language. The reason it has never caught
on, he says, is that it simply isn’t needed.
A universal programming language is not only
unnecessary, it might even be an impediment.
“I like lots of languages,” Lopes says. “I find it
hard to think about being stuck with just one.”
Whether a universal programming
language is desirable or even workable is still
up for grabs. However, salvation may be at
hand in a nascent endeavour in computer
science: user-friendly languages that rethink
the compiler.
Yes, these are yet more languages teetering
atop a 60-year-old tower of Binary Babel.
But what makes them different is that their
designers are building them to allow
programmers to see, in real time, exactly what
they are constructing as they write their code.
Bizarrely, the outcome might look rather
familiar. Edwards is aiming to reproduce
something like Microsoft Excel. “It’s a
programming language,” he says. In fact,
according to Payne, it is the most widely used
programming language of all. You plug in
some numbers and tell the computer what
to do with those numbers, depending on
the row and column they are in. “You can
do sophisticated computation without
even realising that the formulas you enter
are a form of programming,” says Timothy
Lethbridge at the University of Ottowa.
This realisation led Edwards to a simple
question: why shouldn’t building web
applications be as easy as using a spreadsheet?
He is now building a new language called
Subtext, written by copying and pasting
existing routines and making small
alterations that change the outcome. The
different routines are nested together in ways
that allow you to see their relative position
within the program. The result is a visual
representation of what the program does.
While Subtext is still a “thought experiment
in language design” and “just a vignette of
what such a language would look like”,
Edwards thinks it is a good first step.
Like Edwards, Victor is also pioneering
a new way to “let people see what they’re
doing”. In his scheme, a programmer can see
intermediate steps in a program and check
what happens in real time as they tinker
with the code.
These approaches have inspired
programmer Chris Granger to come up with
another innovation, called Light Table. This
allows a coder to work as if everything they
need is in front of them on a desk, all easy

to grab and move around. Assembling the
elements of a program creates instantaneous
results, and the results of any changes to the
code – good or bad – are immediately obvious.
But the most radical option might be to
let the program write itself, based on what
you want it to do – entirely bypassing your
linguistic peccadilloes.
In some ways, that’s already happening.
These days, choosing a language for a task
involves considering what pre-written
modules and libraries you can pull off the web.
“The first thing people do is a Google search
to see if anyone’s done it before,” Lopes says.
“Even experts like me do it: professional
software developers use Google liberally.”
Then, when they get stuck, they turn once
more to Google: over the past five years, rich
bases of accumulated knowledge have sprung
up all over the web. “In the 60s it was really
hard to get unstuck,” she says. “You had to

read through manuals or call the experts.
What took a week now takes 2 minutes.”
So why not take advantage of that,
and build a language composed entirely out
of questions? Let computers develop their
own languages and programs in response to
the objectives you give them. Lopes’s dream
is to create exactly that system to build a
program from a sequence of internet search
queries. “It is a dream, but lots of it is already
here,” she says.
Granted, a better compiler alone won’t be
the end of software glitches. You would also
need to address manufacturers’ never-ending
quest to entice consumers to upgrade by
bloating their products with unnecessary
extra features, or maybe reduce the pressure
to rush products to market at the expense
of quality.
That’s why none of the reformers are under
any illusions that the industry will push aside
C++ and Java and switch to a language based
on Excel or a Google search. “What we have
right now works – if you’re willing to put effort
into it,” Edwards admits. But that doesn’t
mean developing these new languages is a
pointless exercise. “Wouldn’t it be great if we
could open this up to normal, average people,
not just the savants?”
There’s hope for me yet. n

Michael Brooks is a writer and New Scientist
consultant based in Sussex, UK

” The best option might
be to let the program write

itself, bypassing your
linguistic peccadilloes”

130608_F_Program_Languages.indd 39 30/5/13 14:14:53

Free download pdf