Elliotte Rusty Harold roundly Read more
Sick and tired of getting a million hits, all to the same page, which more often than not hasn’t been updated in the mean time? Want to reduce your bandwidth and server-time loads without necessarily impairing your visitors’ experience of your site?
Steve compares “graceful degradation” with “progressive enhancement.” Mostly he takes issue (rightly) with the rhetorical spin that the former applies to the idea of building a website. But I think you can compare them with each other as if they were two different types of crowbar instead: two ways of prising open the task in hand.
There are three main technologies that your browser employs to present HTML for you: XSL, CSS and Javascript. The first two of these are functional: that is, they turn your incoming (X)HTML documents into a set of functions, or behaviours if you like. Because CSS isn’t generally considered a language, let alone a functional one, then it’s worth seeing an example in both languages. Here’s the CSS:
p.intro { color: green; }
And here’s a sort-of XSL equivalent:
If you’re here, then you probably came from here, and you want to make Javascript more functional. If you didn’t come from there—and this is getting a bit like a Choose-Your-Own-Adventure book, isn’t it?—then you might want to go there first, to see if you want to be here.
Ages ago Matthew Somerville emailed me to say that spliticket had fallen over. It's my hacky interface to his wiki page documenting split tickets, and ultimately it found the vagaries of even wiki-generated HTML a bit too hard to cope with.
At the time I built the HTML parser using core SAX-based HTML parsing, and it was horrible.
A Python3-compatible version of BeautifulSoup is now bundled with the Python2 BeautifulSoup tarball. It's actually been available since 27 December, but the most recent version 3.1.0.1 addresses a bug in attribute handling.
It's a bit fiddly to get it working---you need patch, and both python3 and 2to3 on the command line (and 2to3 to be called 2to3-3.0---but when it does so, that ol' BS magic is pretty clear.
Via Sean McGrath comes a reasonably lucid and comprehensible redux of the argument about of whether or not the XML standard should (or should have) stipulated draconian error handling.