Sunday, 1 July 2012

WHAT IF SOFTWARE WORKED

Dick Pountain - 03/05/95 11:07 - Idealog9

Do you ever play the What If game? You know, "What if Archduke
Ferdinand had stayed in bed on June 28th, 1914", "What if Bill Clinton
had inhaled", "What if Margaret Thatcher's dad had been a doctor
instead of a grocer".... I occasionally indulge in What Ifs about the
computer industry, and for some unfathomable reason I've found myself
doing it more and more often over the last year.

Of course the most obvious one is "What if Gary Kildall had been
afraid of flying". For those too young to remember, Gary Kildall (who
regrettably died in June last year) was one of the great pioneers of
the personal computer; he wrote PL/1, the first programming language
for the first microprocessor, Intel's 4004, and then went on to write
CP/M, the first grown up operating system for personal computers. The
urban myth (for such it is) has it that when IBM was looking for an
operating system to put onto its soon-to-be-launched PC, it sent a
party to visit Kildall's company Digital Research but Gary was out
flying his light aeroplane. The IBMers left in a huff and so an almost
unknown hacker called Bill Gates got the contract and the rest is
etc... (The truth is rather more boring, for IBM did initially offer
CP/M-80 on the IBM PC as an alternative to MS-DOS, but overpriced it
so that it failed to catch on.)

For me, a much better game is "What if IBM had chosen the Motorola
68000 instead of the Intel 8088", which isn't that far-fetched since
both chips must have been considered. The effect on the relative stock
market prices of Intel versus Motorola isn't what interests me here.
By choosing Intel's 8088 with its horrible segmented memory
architecture, IBM consigned the PC industry to a fate equivalent to
that of those unfortunate Chinese girls who had their feet bound at
birth, and it's been hobbling ever since. In our industry the number
of the beast is not 666 but 64K, the size of an Intel processor's
memory segment and hence the largest size that a single data structure
can efficiently take.

It's because of 64K that you keep running out of resources when you
try to run more than one component of Microsoft Office; Windows only
has room for 64K of resource handles which isn't enough for modern
applications - our estimable columnist Dave Jewell has reported on the
contortions that Microsoft is having to go through to fix this for
Windows 95 while maintaining backward compatibility. It's those two
innocent words 'backward compatibility' that are the cripplers. Intel
has long since fixed the problem - all x86 processors since the 386
have been capable of addressing a flat (ie. non-segmented) memory
space of many megabytes - but MS-DOS has not been able to exploit this
ability because it was spawned in that hobbled world of 64K, and
rewriting it so drastically would break all the existing DOS and
Windows software.

The segmented Intel architecture has corrupted two whole generations
of programmers, forcing them to dwell on clever memory-mangling tricks
rather than secure programming practices (you can spot the ones:
red-eyed, chewing frantically from caffeine abuse, wearing Red Dwarf
tee-shirts, hanging around on Cix corners.) It hindered the
introduction of GUIs to IBM hardware for years, and it blighted the
chances for advanced programming languages like Lisp and Prolog. Worst
of all, it was almost certainly responsible for the commercial triumph
of the C programming language, a disaster from which the software
industry may never recover.

There was a time in the early 1980's when, hard to believe now, Pascal
and C were vying for place as the application programming language of
choice (Windows still contains an archeological relic of those days in
its Pascal function-calling convention.) Macho programmers have always
preferred C because it allows them to roam unfettered through the
hardware strewing their mallocs where they may fall, whereas Pascal
was designed to stop you doing foolish things and to help you to write
correct programs. Nevertheless Borland's Turbo demonstrated that you
could do almost anything in Pascal that you could do in C - but note
that 'almost'. The one thing that C had over Pascal was that it
supported bizarre memory models with names like 'large', 'huge' and
'incredibly vast', that allowed you to write programs larger than 64K
on the benighted Intel 8086 processor; end of contest.

What prompted this particular outflow of spleen was reading the
"Report of Inquiry Into the London Ambulance Service (Feb 1993)". On
4th November 1992 London lost all effective ambulance cover due to a
catastrophic crash of its new computerised dispatching system. This
software was written in a mixture of Visual Basic and C, running under
Windows 3.0 on a network of 486 boxes. The inquiry team concluded that
the crash was caused by a memory leak - I quote from para 4039:
"...the programmer had inadvertantly left in the system a piece of
program code that caused a small amount of memory within the file
server to be used up and not released..." In my alternative What If
universe that system might have been written in Oberon 2 (the current
descendant of Pascal, featuring an automatic garbage collector that
prevents memory leaks) running under Bortech Windows 11.0 on a 250MHz
PowerPC 9064. 


No comments:

Post a Comment

POD PEOPLE

Dick Pountain /Idealog 366/ 05 Jan 2025 03:05 It’s January, when columnists feel obliged to reflect on the past year and who am I to refuse,...