In 1961 George Forsythe proposed to establish a department of “Computer Science” at Stanford University. The quotes are here on purpose, because at the time the concept was new. Even now, when even Harvard has a Department of Computer Science, there are those who question whether there is a concept rather than just an incongruous juxtaposition of two words. Such people are apt to snigger “telescope science”, with the message that astronomy is real science.
Archive for the ‘Programming’ Category
What is Computer Science?
December 27, 2009Software Engineering: “From Craft to Industry”?
October 31, 2009For brevity you can’t beat the following recap of software history:
Grizzled old hackers tell of going into insurance companies in the 1960s. The typical computer cost at least $500,000 and held data of great value. When Cromwell & Jeeves Insurance needed custom software, they didn’t say, “Maybe we can save a few centimes by hiring a team of guys in India.” They hired the best programmers they could find from MIT and didn’t balk at paying $10,000 for a week of hard work. Back in those days, $10,000 was enough to hire a manager for a whole year, a fact not lost on managers who found it increasingly irksome.
Managers control companies, and hence policies that irk managers tend to be curtailed. Nowadays, companies have large programming staffs earning, in real dollars, one-third of what good programmers earned in the 1960s. When even that seems excessive, work is contracted out to code factories in India. Balance has been restored. Managers are once again earning three to ten times what their technical staff earn. The only problem with this arrangement is …
This is from Philip Greenspun’s “Philip and Alex’s Guide to Web Publishing”, page 318. In case some background is required, read on.
What’s Behind “Design Patterns”
October 1, 2009One of the few true bestsellers in the computer world is Design Patterns by Gamma, Helms, Johnson and Vlissides (“The Gang of Four”). Not only did it sell well, but its success also triggered the appearance of dozens of books with title and content conspicuously linked to the original. As the Gang acknowledged, the original itself is, if not an imitation, at least strongly inspired by another book. Their product is highly original in having its source of inspiration in an area far away from computers and software. That source is Design Patterns by Christopher Alexander, Sara Ishikawa, and Murray Silverstein, and the area is design in architecture. Not computer architecture, not software architecture, but architecture. To avoid confusion, I will refer to the Gang-of-Four book as “DP” and accord to the original original the honour of Design Patterns in full.
What is not widely acknowledged, and does not even seem to be known among the aficionados of DP, is that Design Patterns is but a companion to the main volume, which is The Timeless Way of Building with Christopher Alexander as sole author. That the epiphenomenon makes a great furore in the software world while the main item remains unknown is, it seems to me, remarkable. The present essay may be useful in introducing the unknown main item and arguing its relevance for the building of software.
Against Structured Programming
April 22, 2009In 1968 the Communications of the ACM published a Letter to the Editor from E.W. Dijkstra (volume 11 (1968), pp 147–148). The Editor, perhaps a bit puzzled by the contents, summarized them by supplying as title “Goto Statement Considered Harmful”. The mere thought was sufficiently provocative to ensure that the idea spread like wildfire, initially to be dismissed, but soon to be blessed with universal approval. “Structured Programming” was born.
The most enthusiastic converts were the computer science professors. These people were doing research on esoteric topics like formal languages or graph theory and were gang-pressed into teaching introductory programming. With little programming experience, they welcomed a clear rule (no GOTOs!) and welcomed the casuistry required for forcing non-conforming code into the straight jacket of the officially approved formats.
This essay is a thought experiment: suppose one had never heard of Structured Programming, that one wanted to solve a little programming problem by common sense reasoning; that this solution process not only had to supply the conviction of correctness, but also had to help discover the algorithm. My conclusion will be that these goals, though ambitious, are achievable, but that Structured Programming is at best a handicap.
Remember Software Verification?
February 5, 2009Maybe not. It used to be taken for granted that in the more or less remote future it would no longer be necessary to debug software because it had been verified.
That time is long past. What we now take for granted is that, for example, the two pieces of software essential to the health and safety of the internet, MS Windows and MS Internet Explorer, “vulnerabilities” are discovered at such a rate that the repair sessions are saved up to the second Tuesday of each month. Rarely does such a Tuesday pass without an update; sometimes five or six. Another exhibit for the prosecution: many pieces of software that invite being downloaded distinguish between the “latest version” and the “latest stable version”. Forget correctness: “stability” is the goal. Diminished expectations …
Rewriting a Utility
December 10, 2008I can’t leave well enough alone. The most recent manifestation of this problem is the following program from Kernighan and Ritchie (“The C Programming Language”), which is perfectly OK code for converting a number to the equivalent decimal numeral.
No Silver Bullet? Get a Humble Programmer.
October 20, 2008Consider this:
- Software reliability is rapidly becoming more
important. - Software development technology is inadequate and
is only slowly improving.
The question arises:
Is disaster inevitable?
This has been debated for some time in the computer
science community. Recently it has begun to attract
attention from the general public.
For example a newspaper ran a story entitled: “A Lemon Law for
Software?” Here the author observed:
If Microsoft were liable for product defects the same
way automobile manufacturers are, then it would have
been driven out of business a long time ago.
As we all know, this has not happened. And this is only
because the law exempts the software industry from
product liability.
The question I’m now asking is: Should it be exempted in
this fashion?
Any suggestion that it is time for the software industry
to grow up and accept responsibility for its products is
greeted by an indignant chorus asserting that software is
special and that not recognizing it as such will stifle
innovation.
Clearly Microsoft stands to lose most in a change from
the status quo. But the rest of industry, including those
who love to hate Microsoft, do not dare to contemplate a
world where creators of software are responsible,
seriously responsible, for their products.
While in industry there is agreement on this topic,
academia, in so far as it has an opinion at all, is
divided. Some argue that software is special in such a
way that the current unreliability of software is
inevitable. They argue that there is no prospect of
drastic improvement. I will call this camp “The Real
World”. Their most eloquent, and most widely quoted,
spokesman is Frederick P. Brooks, Jr., in his paper “No
Silver Bullet”.
Others argue that techniques for producing reliable
software are known, that these are practical, and that
some of them have been known for decades. Whenever one
brings these to the attention of industry, one is
dismissed as being sadly out of touch with reality. Hence
I will denote the proponents of the known techniques for
producing reliable software as “The Ivory Tower”.
In this introduction I have sketched the problem,
which is:
- Software reliability is rapidly becoming more
important. - Software development technology is inadequate and
is only slowly improving.
I have also sketched the main points of view, and called
them “The Real World” and “The Ivory Tower”. In this
lecture I will elaborate further on these two opposing
positions, starting with the real-world people, and
continuing with those who inhabit the Ivory Tower.
Although I will avoid technical matters, few such
concepts need a brief review, which I will do next.
(more…)
Cargo-cult Engineering
August 27, 2008There is an old song about software engineering. I thought it had died until the other day I came across a post by Jack Ganssle (Embedded.com; 05/12/08). Under the title “Programmer or Engineer?” he argues that the word “programmer” should be banned and that embedded applications should by built by electrical or computer engineers.
It may well be that engineers are satisfactory for the “embedded applications” that Mr Ganssle has in mind. But another category of people is needed to meet the greater challenges posed by computers. Neither of the existing categories: “engineer” nor “computer scientist” can be relied on to fit the bill.
A Possible Future History of Logic Programming
June 14, 2008(from “The ALP Newsletter”, vol. 17, no. 1, Feb. 2004)
While it is well-known that it is hard to know anything about the future, it is less widely realized that it is also difficult to understand the present. It is therefore paradoxical that it sometimes helps to understand the present by means of a fictitious future history. In this essay I am going to exploit this paradox.
I place the viewpoint well away into the future. Again this may seem paradoxical, because in computing everything is supposed to happen fast. Not everybody thinks so. Paul Graham has embarked on a project that he calls “The Hundred Year Language” , pointing out that it is only hardware that changes fast. Programming languages change slowly. This is because they are part of culture; they reflect how human minds tackle problems. Hence Graham’s “Hundred Year Language”.
It so happens that Graham is concerned with Lisp. This is not the only paradigm in need of the long-term perspective. Accordingly, I imagine a history of logic programming as it may be written in the 2020s.
As I’m already exercising your indulgence with speculation, I will not attempt the fictitious future history itself, but instead bring out the salient points in an equally fictitious review of this nonexistent
history.
Specifications: the Good, the Bad, and the Ugly
May 18, 2008One can define a prime number as an integer greater than 1 that has no divisors other than 1 and itself. This is a declarative definition: it says what a prime number is rather than how to get one. One can also appeal to the Sieve of Eratosthenes. This would be a procedural definition. It is the opposite of declarative and it only tells how to get prime numbers.
In Software Engineering it is considered bad form to specify a function by pseudocode or by a reference implementation; a proper specification is supposed to be declarative. This blanket preference for the declarative assumes that such specifications are always better: easier to understand and to write. This is indeed the case with prime numbers, but not always. In the case of the Reef Knot, the Bowline, or any other kind of knot, a declarative definition, though perhaps possible, is likely to be less useful than being shown how to make one, which is procedural. Here I consider an example where it is easy to compare the merits of the Good (declarative), the Bad (procedural), and an even less respectable third approach.