Code Reads #3: Edsger Dijkstra’s “The Humble Programmer”

This will be a briefer entry than I originally planned. I’ve fallen behind a bit this week! So rather than post about all three essays I mentioned last week, I’m going to confine myself to “The Humble Programmer,” Edsger Dijkstra’s Turing Lecture, delivered in 1972.

In “The Humble Programmer” (text, PDF) Dijkstra offers an overview of the programming universe as he saw it in 1972. In the ’50s and early ’60s, programming pioneers struggled against the “painfully pinching shoe” of inadequate equipment. Then they got the more powerful machines they longed for. “But instead of finding ourselves in the state of eternal bliss of all progamming problems solved,” Dijkstra wrote, “We found ourselves up to our necks in the software crisis!” The problem was that the upward curve of ambition driven by new hardware capacity outran the improvements in software:

As the power of available machines grew by a factor of more than a thousand, society’s ambition to apply these machines grew in proportion, and it was the poor programmer who found his job in this exploded field of tension between ends and means. The increased power of the hardware, together with the perhaps even more dramatic increase in its reliability, made solutions feasible that the programmer had not dared to dream about a few years before. And now, a few years later, he had to dream about them and, even worse, he had to transform such dreams into reality!

From its title to the repetition of phrases like “the poor programmer” to its references to “the intrinsic limitations of the human mind,” the essay presents a chastened vision of the human capacity to create software: the programmer, Dijkstra says, must be “fully aware of the strictly limited size of his own skull.”

[Read more...]


 

Eye-raq: Santorum, Tolkien and terror

I am the first in line to enjoy a good Lord of the Rings analogy. But there is something distinctly off in Sen. Rick Santorum’s effort to recast the Iraq War in Tolkienian terms:

Embattled U.S. Sen. Rick Santorum said America has avoided a second terrorist attack for five years because the “Eye of Mordor” has been drawn to Iraq instead.

Santorum used the analogy from one of his favorite books, J.R.R. Tolkien’s 1950s fantasy classic “Lord of the Rings,” to put an increasingly unpopular war in Iraq into terms any school kid could easily understand.

“As the hobbits are going up Mount Doom, the Eye of Mordor is being drawn somewhere else,” Santorum said, describing the tool the evil Lord Sauron used in search of the magical ring that would consolidate his power over Middle-earth.

“It’s being drawn to Iraq and it’s not being drawn to the U.S.,” Santorum continued. “You know what? I want to keep it on Iraq. I don’t want the Eye to come back here to the United States.”

The trouble here is not that Santorum is daring to compare a bloody real-life tragedy to a fantasy novel — pace my colleague Tim Grieve, who brought this bizarre tirade to my attention, or the spokesman for Santorum’s opponent, who complains, “You have to really question the judgment of a U.S. senator who compares the war in Iraq to a fantasy book.” That doesn’t bother me. Myths and fictions offer us powerful ways of seeing and talking about the real world. Popular politicians — like Ronald Reagan, who borrowed his “Evil Empire” imagery from George Lucas — understand this.

No, the problem is that Santorum’s analogy makes no sense. I think the senator means to offer a Middle Earth version of the GOP’s “We’re fighting them over there so we don’t have to fight them here,” but he’s messed it up badly. (Warning: Tolkienian geekery ahead!)

First of all, in Tolkien’s saga, the good guys are outgunned and outmanned by the Dark Lord, whereas in our world, the U.S. is a “hyperpower” whose military, in 2001-2, seemed to bestride the world. Second, in Tolkien, the good guys sent Frodo with the Ring into the depths of Mordor as a sort of last-ditch, bet-everything gamble; then they sent an army to the gates of Mordor as a diversion — to keep the Eye occupied and distract it from the hobbits headed for Mount Doom.

Santorum says the war in Iraq was meant to keep the Eye distracted. But what kind of diversionary maneuver keeps more than a hundred thousand troops fighting and dying for years? And what are we distracting our enemy from? Who are our hobbits? What secret plan is underway to break the power of Al-Qaeda once and for all? None, of course, because this is where the analogy dissolves into air: In Middle Earth, the Dark Lord’s forces are centralized and his minions are incapable of operating independently; in our world, our enemy is organized as a headless guerrilla network. There is no “Eye” to distract.

It’s hard, in truth, to find any useful Middle Earth analogy to the Iraq War: the parallels break down across the board. Still, you might think of Bush’s invasion of Iraq as the equivalent of a beleaguered Gondor, attacked by the armies of Mordor across the River Anduin, sending its army off on an expedition to Far Harad, after its leaders issued proclamations that the White Council had incontrovertible evidence of the Haradrim’s possession of Rings of Mass Destruction.

Something like that, anyway. But as you can see it really doesn’t work, even when you try harder than Santorum.


 

Ballmer explains Windows delays — or, how Vista is like Iraq

Steve Ballmer was interviewed in Saturday’s Times. Noted:

Q. What was the lesson learned in Windows Vista? After all, it wasn’t supposed to ship more than five years after Windows XP.

A. No. No, it wasn’t. We tried to re-engineer every piece of Windows in one big bang. That was the original post-Windows XP design philosophy. And it wasn’t misshapen. It wasn’t executed, but it wasn’t misshapen. We said, let’s try to give them a new file system and a new presentation system and a new user interface all at the same time. It’s not like we had them and were just trying to integrate them. We were trying to develop and integrate at the same time. And that was beyond the state of the art.

This is at once an unusually candid and an oddly defensive statement.

Ballmer is saying that, in 2001-2, as Microsoft pondered the next phase of Windows’ evolution post-XP, the company deliberately chose to “re-engineer every piece of Windows in one big bang.” It’s a telling choice of phrase. In the software development world, “big bang” (typically used in “big bang integration”) is used to describe a bet-it-all strategy that involves building lots of parts of a system separately and waiting until the end to hook them up and hope they play nicely together.

So Ballmer is essentially admitting that the “design philosophy” of the new Windows was founded on a risky, widely discredited approach. Then he turns around and says that it wasn’t “misshapen” — twice.

Misshapen? Is this a new buzzword I’ve somehow missed? Did the Times reporters mistranscribe “mistaken”? What is Ballmer talking about?

Then he says, “It wasn’t executed.” Note the passive voice, correct for it: “We didn’t execute it.” Which means, “We didn’t do it.” That’s, you know, obvious, I’d think.

Then Ballmer closes the explanation by declaring that the problem wasn’t one of integration; it was even worse than that — it was that Microsoft, the largest and most successful software company in the world, set out to simultaneously “develop and integrate” new versions of all the core functions of its central product. Now, in 2006, the company understands that this was “beyond the state of the art.” But back in 2001-2, they didn’t see that.

This is a fascinating rationalization. I’m loathe to draw too facile a comparison between the tribulations of a technology company and the drama of global conflict. But here, I think, there’s a clear and illuminating parallel between Microsoft’s hubris in this era and the Bush administration’s overreaching in Iraq — two phenomena that overlap almost precisely on the historical timeline.

And no, of course I don’t mean to suggest that there is any moral equivalence, or that the sad saga of a software product’s delay is in any way an event of equal import to the tragedy of an unnecessary war of choice resulting in hundreds of thousands of deaths. But there are some similarities, too, to wit:

Bush’s team — chests puffed large from its success in invading Afghanistan post-9/11 — ignored conventional wisdom and disregarded expert intelligence and invaded Iraq, only to discover that the effort to control and transform that country was beyond its means.

Gates’ team — surveying a decimated post-dotcom industry landscape as the “sole superpower” of technology — simiarly ignored conventional wisdom and disregarded expert knowledge. Incremental development? Continuous integration? They are for mere mortals. Microsoft, with its mountain of cash and its armies of developers, could bring brute force to bear on the most intractable of large-systems development problems. The company would rip out the guts of all of Windows’ key subsystems and renovate them at the same time — because it was invincible!

The result was predictable. Now a more humbled Microsoft is limping to the finish line with a version of Windows that — whether users find it reat or so-so or terrible — will always be overshadowed by the ambitious claims once made for it. In the context of that falling off, Ballmer’s statement is positively bizarre.


 

Code Reads progress report and schedule

I’m very happy with the knowledgeable and far-ranging discussions we’ve been having in the first two Code Reads (The Mythical Man-Month and “Go To Statement Considered Harmful”). The discussion of Dijkstra’s famous essay led us to some other related readings that I’m going to lay out for the next reading (which, like this week’s, will probably post a day late, on Tuesday rather than Monday — because it’s my kids’ birthday this weekend!). This will be a Dijkstra triple header: Notes on Structured Programming, “What led to ‘Notes on Structured Programming’”, and “The Humble Programmer.” Together these papers provide a deeper understanding of the perspective Dijsktra offered in the celebrated “Go To Statement” piece.

Then, the following week (Oct. 23), let’s look at Donald Knuth’s “Structured Programming with go to Statements”. The Knuth is almost certainly way over my head, but I’ll give it a go, and maybe you guys can help me out.

The week after (Oct. 30), let’s change the scene entirely, and look at Mitch Kapor’s Software Design Manifesto, which extends the discussions we’ve been having about the development process (Brooks) and coding discipline (Dijkstra) into the realm of design process.

I’ve added a permanent link in this blog’s sidebar to the Code Reads category archive and also a link to the RSS feed for the category, if you ‘re only interested in the software discussions and not in keeping up with my other topical ravings. I’ll also try to keep a link there to the post that lists the next reading(s).

Thanks to the denizens of Lambda the Ultimate, joel.reddit.com (the Reddit category created for devotees of Joel on Software), and programming.reddit.com for linking here and pointing people to the conversations. Also thanks to these individual bloggers for linking in: Rafe Colburn, Anarchaia, Hacia la Cuarta Generacion del Software, danvk.org, Superficie Reflexiva, Strange Quarks, Honey of an Anklet, and Ralph Johnson (one of the so-called “gang of four” authors of the original Design Patterns book). If I missed you (I’m relying on Technorati), let me know!

As for that book giveaway, here’s my plan: When I have the books in hand, I will award them at random from the list of people who have made what I consider substantive contributions to the discussion (which means nearly everyone so far). Then I’ll email you if I have an email address, or post here if I don’t, to let the winners know.


 

Microsoft sniffed at “acquiring YouTube’s technology”

This little tidbit from the Journal’s day-one story on the Google/YouTube deal caught my eye:

A Microsoft spokeswoman said the company “evaluated acquiring this type of technology several months ago” but decided to build its own service, a test version of which opened recently.

It may be foolish to read too much into an unnamed spokesperson’s boilerplate wording, but it is unwittingly illuminating.

YouTube’s “technology” is smart: the company made a good bet on making posting videos really easy — it did for Web video what AOL did a decade ago to help people get online. But the technology itself is something that Google, or Microsoft, could duplicate for a tiny fraction of YouTube’s price tag.

Google traded its stock not for YouTube’s technology but for its massive and growing community of users. That Microsoft would describe the deal as “acquiring technology” is an indication that it’s still thinking like a packaged-software-goods company.


 

North Korea in 60 words or less

Josh Marshall has crisply debunked the Bush team’s attempt to throw smoke in the world’s eyes at the failure of its “we don’t talk with the axis of evil” stance in regard to North Korea’s nuclear test. With the administration desperately trying to cloud the issue, it is worth simply reposting his description:

“Failure” =1994-2002 — Era of Clinton ‘Agreed Framework’: No plutonium production. All existing plutonium under international inspection. No bomb.

“Success” = 2002-2006 — Bush Policy Era: Active plutonium production. No international inspections of plutonium stocks. Nuclear warhead detonated.

Face it. They ditched an imperfect but working policy. They replaced it with nothing. Now North Korea is a nuclear state.


 

Code Reads #2: Dijkstra’s “Go To Statement Considered Harmful”

The title of Edsger Dijkstra’s 1968 “Go To Statement Considered Harmful” is among the best-known phrases in the history of programming. Interestingly, the phrasing of the title — which has become so regular a cliche in the field it inspired Eric Meyer to compose the waggish “‘Considered Harmful’ Essays Considered Harmful” — was not Dijkstra’s work at all. As Dijkstra explained it:

Finally a short story for the record. In 1968, the Communications of the ACM published a text of mine under the title “The goto statement considered harmful,” which in later years would be most frequently referenced, regrettably, however, often by authors who had seen no more of it than its title, which became a cornerstone of my fame by becoming a template: we would see all sorts of articles under the title “X considered harmful” for almost any X, including one titled “Dijkstra considered harmful.” But what had happened? I had submitted a paper under the title “A case against the goto statement”, which, in order to speed up its publication, the editor had changed into a “letter to the Editor”, and in the process he had given it a new title of his own invention! The editor was Niklaus Wirth.

How did Wirth come up with the odd phrase? My hunch is: some combination of English-as-a-second-language (though, since Wirth got his PhD here at Berkeley, that may be completely wrong) combined with the essential trait of radical concision drummed into the heads of programmers of that era. Fewer words! Fewer characters! Less space in memory!

[Read more...]