The 7-bit Internet

When I first started digging into the bowels of the Internet, I was fascinated by how many of its protocols—like HTTP and SMTP, for example—were entirely text based.

At first, this struck me as a very odd thing; text is inefficient, and machines, not humans, are meant to interpret protocols. A binary setup would save bytes—bytes!—and be all-around more manageable by software.

It wasn’t long, however, before I realized the true genius behind this decision. When everything is based on text, all you need to interact with a server is plain-old telnet; and this, in turn, means that you can poke around things with ease, particularly since so much of the Net’s infrastructure is based on the Robustness Principle.

It would be hard to overstate how important the ability to explore things this way is. Understanding how things work is a first—and important!—step towards using them well. When we don’t understand the tools we use, we are forced to rely on other tools to hide the underlying complexity and dumb things down to a point where they are manageable.

In the process, we trade in the ability to create solutions that fit the actual problem, instead of the apparent problem that all the abstraction layers put in front of us.

History and itself

I’m writing this with the HTTP 2.0 draft in mind, which introduces undue complexity in the HTTP protocol to satisfy what are essentially the needs of a small group of very influential players1, but rather than trying to predict the future by looking into a crystal ball, you can see how this principle affects Web development by looking into a mirror pointed towards the present.

Consider, for example, Web-based APIs, which are my current obsession. On one hand, you have REST, a simple set of principles that underscores the very fabric of the Web itself. Used properly, it has the amazing property of being both powerful and very simple to understand.

Contrast that with SOAP, which is nominally text based, but is orders of magnitude more complex than REST because it is built with the idea that humans will never really have to read or understand it. I’ve been in this business for two decades, and the only way I know to hand-debug a SOAP transaction is with a hammer and a straitjacket2. Heck, I’ll take an old-school EDI transaction over SOAP any day.

The real tragedy is that so many people don’t seem to understand how important this is. Obscurity and obsessive abstraction are two of the worst problems that affect software development; they combine into a form of wilful ignorance that makes us write crappy code. Make it stop.