To Wash It All Away
James mickens
hen I was in graduate school in Ann Arbor, I had a friend who
was deeply involved with the environmentalist movement. He
purchased his food from local farmers’ markets, and he com-
muted by bike instead of by car to reduce his carbon footprint, and he main-
tained a horrid compost bin that will probably be the origin of the next flu
pandemic. One day, he told me that he was going to visit a farm for a week.
I asked him why, and he said that he wanted to “get closer to the land,” a
phrase that you can only say with a straight face if you’re narrating a docu-
mentary about ancient South American tribes. I told my friend that the land
didn’t want to get closer to him, and if he really looked at the land, he’d see
that it was not composed of delicious organic trail mix, but famine and
vultures and backbreaking labor involving wheelbarrows and generally
un acceptable quantities of insects. He responded with an extended lecture
about eco-responsibility, a lecture that I immediately forgot because I real-
ized that my naïve friend was going to die on that farm. So, I told my friend
that he shouldn’t be afraid to end his trip early if he wasn’t having a good
time. He smiled at me, the way that people in slasher movies smile before
they get chopped up, and he left for the farm. Precisely 37 hours later, he
called me on the phone. I asked him how everything was going, and he made
a haunting, elegiac noise, like a foghorn calling out for its mate. I asked him
to describe his first day, and he said that his entire existence revolved around
bleating things: bleating goats that wanted to be fed, and bleating crows that
wanted to steal the food that he gave the bleating goats, and bleating farm
machines that were composed of spinning metal blades and had no discern-
able purpose besides enrolling you in the “Hook Hand of the Month” club.
I asked my friend when he was coming back home, and he said that he was
calling me from the Ann Arbor train station; he had already returned. And
then he let out that foghorn noise, that awful, lingering sound, and I thought,
Computer scientists often look at Web pages in the same way that my friend looked at
People think that Web browsers are elegant computation platforms, and Web pages are
light, fluffy things that you can edit in Notepad as you trade ironic comments with your
friends in the coffee shop. Nothing could be further from the truth. A modern Web page is a
catastrophe. Its like a scene from one of those apocalyptic medieval paintings that depicts
what would happen if Galactus arrived: people are tumbling into fiery crevasses and
ing various lamentable things and hanging from playground equipment that would not
OSHA safety checks. This kind of stuff is exactly what you’ll see if you look at the HTML,
This is my last column! Thanks
for reading, and thanks for all
of the support :-). Never forget
that when you are alone, I
am with you, and when you
are with someone else, I am also with you,
because I think that I am better than that other
person and I have lengthy opinions about why
this is true. mickens@microsoft.com
To Wash It All Away
CSS, and JavaScript in a modern Web page. Of course, no human
can truly “look” at this content, because a Web page is now like
V’Ger from the first “Star Trek” movie, a piece of technology
that we once understood but can no longer fathom, a thrashing
leviathan of code and markup written by people so untrust-
worthy that they’re not even third parties, theyre fifth parties
who weren’t even INVITED to the party, but who showed up
anyways because the hippies got it right and free love or
ever. I’m pretty sure that the Web browser is one of the “dens of
iniquity” that I keep hearing about on Fox News; I would verify
this using a Web search, but a Web search would require me to
Describing why the Web is horrible is like describing why its
horrible to drown in an ocean composed of pufferfish that are
pregnant with tiny Freddy Kruegers—each detail is horrendous
in isolation, but the aggregate sum is delightfully arranged
a hate flower that blooms all year. For example, the World
Wide Web Consortium (W3C) provides “official” specifications
for many client-side Web technologies. Unfortunately, these
specifications are binding upon browser vendors in the same
way that you can ask a Gila monster to meet you at the airport,
but that gila monster may, in fact, have better things to do [1].
Each W3C document is filled with alienating sentences that
largely consist of hyperlinks to different hyperlinks. For
instance, if you’re a browser vendor, and you want to add
support for HTML selectors, you should remember that,
during the third step of parsing the selector string, “If result
invalid ([SELECT], section 12), raise a SYNTA X _ERR
exception ([DOM-LEVEL-3-CORE], section 1.4) and abort
this algorithm.” Such bodice-ripping legalese is definitely
exciting for people who yearn for the dullness of the Cheerios
ingredient list combined with the multi-layered bureaucracy
of the Soviet Union. Indeed, you could imagine a world in which
browser vendors hire legions of Talmudic scholars to under-
stand why, precisely, SYNTA X _ERR is orange and not mauve,
and how, exactly, this orangeness relates to the parenthetic
purpleness of ([DOM-LEVEL-3-CORE]). You could also
imagine a world in which browser vendors do not do this, and
instead implement 53% of each spec and then hope that no
Web page tries to use HTML selectors and then the geolocation
interface and then a <canvas> tag, because that sequence of
events will unleash the Antichrist and/or a rendered Web page
that looks like one of those Picasso paintings that you pretend
to understand, but which everyone wants to throw into an
ocean because nobody wants to look at a painting of a blue man
who is composed of isosceles triangles and has a guitar
ing from his forehead for no reason at all.
Given the unbearable proliferation of Web standards, and the
comically ill-expressed semantics of those standards, browser
vendors should just give up and tell society to stop asking for
such ridiculous things. However, this opinion is unpopular,
because nobody will watch your TED talk if your sense of
optimism is grounded in reality. I frequently try to explain to
my friends why they should abandon Web pages and exchange
information using sunlight reflected from mirrors, or the
enthusiastic waving of colored flags. My friends inevitably
respond with a spiritually vacant affirmation like, “People
invented flying machines, so we can certainly make a good
browser!” Unfortunately, defining success for a flying machine
is easy (“I’M ME BUT I’M A BIRD”), whereas defining success
for a Web browser involves Cascading Style Sheets, a technol-
ogy which intrinsically dooms any project to epic failure. For
the uninitiated, Cascading Style Sheets are a cryptic language
developed by the Freemasons to obscure the visual nature
of reality and encourage people to depict things using ASCII
art. Ostensibly, CSS files allow you to separate the defini-
tion of your content from the definition of how that content
looks—using CSS, you can specify the layout for your HTML
tags, as well as the fonts and the color schemes used by those
tags. Sadly, the relationship between CSS and HTML is the
same relationship that links the instructions for building your
IKEA bed, and the unassembled, spiteful wooden planks that
purportedly contain latent bed structures. CSS is not so much
a description of what your final page will look like, but rather
a loose, high-level overview of what could happen to your page,
depending on the weather, the stock market, and how long its
been since you last spoke to your mother. Like a naïve Dungeon
Master untouched by the sorrow of adulthood, you create
imaginative CSS classes for your <div> tags and your <span>
tags, assigning them strengths and weaknesses, and defining
the roles that they will play in the larger, uplifting narrative of
your HTML. Everything is assembled in its proper place; you
load your page in a browser and prepare yourself for a glorious
victory. However, you quickly discover that your elf tag is over-
worse, your barbarian tag does not have an oversized hammer
or axe. Without an oversized hammer or axe, YOUR BARBAR-
you look at your wizard tag, and you see that he’s not an old
white man with a flowing beard, but a young black man from
FANTASTIC VINYL COLLECTION. Such are the disasters
[1] “Gila Monsters Meet You at the Airport” is the name of a real children’s
book that had an enormous impact on my emotional growth. The books
unflinching realism inspired my own series of ill-received children’s
books, such as “Spiders Ate Your Sister That We Never Talk About,”
talist Advertising Makes You Hate Your Body and Buy Things Made
from Slave Labor,” and “I Could Lie and Say that Your Comic Book Collec-
tion Is Interesting, Or I Could Tell The Truth and Explain Why You Don’t
Get Second Dates.”
To Wash It All Away
that CSS will wroughth upon thee. Or wrought *at* thee. To be
honest, I don’t know how to conjugate or spell “wrought,” but
my point is undoubtedly understood. See Figure 1 for a con-
crete example of CSSs wroughtiness. Or CSS’ (no trailing “s”)
When you’re a Web developer, CSS is just one of your worries.
The aggregate stack of Web technologies is so fragile that
developers just accept a world in which various parts of a Web
page will fail at random times. Apparently this is okay because
e-commerce isn’t a serious thing, and if you really wanted a
secure banking experience, you’d visit the bank in person like
someone from the 1800s instead of accessing a banking Web
site that is constantly (but silently) vomiting execution errors
to the console log (a console log which the browser does not
show by default, because if you knew about it, and you read its
tales of woe, you’d abandon computer science and become a
maker of fine wooden shoes). In Figure 2, I provide an unal-
tered example of such a console log; the log was generated by a
real Web page from a popular site.
The first log entry says that the browser executed a downloaded
file as JavaScript, even though the MIME type of the file was
text/html. Here’s a life tip: when you’re confused about what
CLUES. This is like observing that your next-door neighbor
is a creepy, bedraggled man with weird eyes, and then you start
falling asleep on his doorstep using a chloroform rag as a pillow,
just to make sure that he’s not going to tie you to a radiator and
force you to paint tiny figurines. Here’s how your life story ends:
The second and third errors say that the page’s JavaScript used
a variable name that is deprecated in strict mode, but accept-
able in quirks mode. How can I begin to explain this delicious
confection of awfulness? Listen: when a man and a woman fall
in love, they want to demonstrate their love to each other. So,
they force browsers to support dierent types of runtime envi-
ronments. “Standards mode” refers to the unreliable browser
APIs that are described by recent HTML and CSS specifica-
tions. “Quirks mode” refers to the unreliable browser APIs that
were defined by browsers from the Eisenhower administration.
Quirks mode was originally invented because many Web pages
were made during the Eisenhower administration, and the
computing industry wanted to preserve Web-based narratives
about why “the rock and roll” is corrupting our youth. Quirks
mode then persisted because Web developers learned about
quirks mode and used it as an excuse to not learn new skills.
But then some Web developers wanted to learn new skills, so
standards mode was invented to allow these developers to
make old mistakes in new ways. There is also a third browser
mode called “almost standards mode”; this mode is similar to
Figure 1: One time, I tried to build a browser-agnostic debugging infra-
structure. I had a client-side JavaScript library that could traverse the
JavaScript heap and display fun things about the page’s state. My art his-
tory friends told me that console output is for Neanderthals, so I made an
HTML GUI to display the diagnostic information. The first version of the
GUI used the browser’s default layout policies. Much like Icarus, I dreamt
of more, so I decided to make A Fancy Layout™. I wrote CSS that specified
whether my tags should have static positioning, or floating positioning,
or relative zodiac-based positioning. Here’s what I learned: Never specify
whether your tags should be static or floating or zodiac-based. As soon as a
single tag is released from the automatic layout process, the browser will
immediately go insane and stack random HTML tags along the z-axis, an
axis which apparently is an option even if your monitor can only display
two dimensions. I eventually found a working CSS file inside a bottle that
washed up on the beach, and I tweaked the file until it worked for my GUI.
Then I went home and cried big man tears that were filled with ninja stars
and that turned into lions when they hit the ground.