, , , , ,

Reflections on Postel's Law

Jon Postel was an American computer scientist who helped to develop the basic protocols on which the Internet is built. Among other accomplishments, he is remembered today for the formulation of a robustness principle, now often referred to as Postel’s Law.

Be liberal in what you accept, and conservative in what you send.

This was originally included as part of an early specification for the Transmission Control Protocol (TCP), and was stated in this way:

TCP implementations should follow a general principle of robustness: be conservative in what you do, be liberal in what you accept from others.

In other words, software code that sends commands or data to other programs should conform completely to the relevant specifications, but code that receives input should accept nonconforming input as long as the meaning is clear and the effects are benign.

Note that, for a computer scientist, this principle is much more akin to an ethical admonition than a technical specification. That is, it does not state an absolute law or standard, but a general social code for software: be strict in your own behavior, but tolerant of harmless quirks in others.

And, like most ethical principles, it is not universally accepted. Some have argued, for example, that being tolerant of minor failings is a slippery slope, and can allow problematic software to pass through implementation gates without correction, and then cause problems in the wild, when these problems may be much harder to identify and fix.

In general, though, I think that the proposition and acceptance of Postel’s law marks the passing of our computer systems from relatively small, well bounded, tightly controlled architectures to more sprawling, unbounded, and extensive systems. If a single architect can tightly control all elements of the architecture, and all instances of its implementation, then the need for Postel’s law never arises. It is only when we enter the era of systems like the Internet and the World-Wide Web – small pieces loosely joined – that the value of Postel’s law emerges. In systems like these, excessive fussiness can cause the entire network to become unreliable.

Postel’s law, as originally stated, was intended to apply to program-to-program communications. But what about communications between humans and software programs? It can be applied there as well. When a user interface asks for my phone number, and then rejects it because I’ve entered it without dashes – or with, depending on the whims of the interface designer – then I know I’m dealing with an intolerant interface. On the other hand, when my entry is happily accepted, however I punctuate it, and then reformatted for me to a convenient standard – as happens when I enter such information into Apple’s Contacts app, for example – I know I’m dealing with a human interface based on Postel’s Law: be liberal in what you accept, and conservative in what you send.

The evolution of the Hypertext Markup Language (HTML) specification over the last decade or so can also be seen as an example of Postel’s law at work. The original HTML language was designed to be written by humans, and early Web browsers were tolerant of minor irregularities in coding, so long as the intent of the author was clear. Upper-case tags? No problem. Lower-case tags? More, please. A paragraph tag without a matching closing tag before the next paragraph? Works for me.

But then, along came eXtensible Markup Language (XML). And (despite its use of the letter “X” as an abbreviation for “extensible”) XML parsers were not at all tolerant of minor quirks in others. No. As a matter of fact, they were notoriously and intentionally fussy, making the office grammarian who insists on correcting others’ usage of “who” and “whom” seem like a generous and indulgent soul by comparison.

So when someone had the bright idea of staging a shotgun wedding between HTML and XML, giving birth to little XHTML, trouble eventually ensued. No more mixed case in tags. Oh no. We can’t put up with that. No more starting tags without matching tags, unless such tags are carefully identified as self-closing. And so forth. Web authors put up with this for a while, but when the XML zealots started to get really fundamentalist on them about interpretation of the specifications, they finally rebelled, and the result was HTML5. And the most notable feature of this new language specification is that it requires no version declaration, because one of the rules of the new HTML is that it always and forever accepts all prior versions as legitimate: be liberal in what you accept….

And what about communications between people? Are these too subject to Postel’s law? I believe so. As human societies develop from traditional, fundamentalist levels to postmodern, pluralistic levels, they of necessity embrace Postel’s law, just as computer systems do when they evolve in a parallel fashion. Live and let live. Turn the other cheek. Different strokes for different folks. Do unto others as you would have them do unto you. All of these maxims reflect the same underlying intent of Postel’s Law: follow the highest standards in your own behavior, but accept diversity in others.

And so, as we continue our adventures in developing and participating in ever larger and more complex systems – whether computer systems or human societies – it is worthwhile to reflect on Postel’s law from time to time. There’s an awful lot of practical wisdom packed into this simple principle.

May 10, 2013

Next: Fighting Organizational Friction