Plain Text Config Files are Confusing

Monday, February 26th, 2007

There’s a large rebellion over XML config files from programmers who don’t like to type XML and don’t want to learn APIs for processing it. They’d rather limp along with the same scanf code they’ve been using for the last 20 years.

The problem is there really isn’t such a thing as a plain text config file. What there is are specially formatted text files that are easily as complex as the XML equivalent but inconsistent, poorly documented, and easily broken. For instance, consider this extract from LogValidator’s “plain text” config file:

Murphy’s Law of Co-occurrence Constraints

Wednesday, December 20th, 2006

Co-occurrence constraints are a perennial topic at XML conferences because the usual schema languages (DTDs, W3C Schemas, RELAX NG) can’t handle them. Consequently they’re a fertile source of papers like XML 2006’s keynote from Paolo Marinelli on Co-constraint Validation in a Streaming Context.

However, I mentioned in hallway conversation that I wasn’t sure how common or necessary co-occurrence constraints really were. In fact, I didn’t think I’d ever found one in the real world. Naturally two days later I stumbled across several of them in a very common, very frequent real world example.


Sunday, November 26th, 2006

Among the XML cognoscenti, the debate is effectively over. Everyone is choosing RELAX NG as their schema language, and compiling to DTDs or W3C XML Schemas as necessary. I don’t know of a single project in the last couple of years that considered both RELAX NG and W3C Schemas and chose to go with the latter. Certainly, there’ve been a lot of W3C Schema adoptions. However those seem to have been made mostly by people who didn’t know they had a choice. In particular, the W3C imprimatur seems very appealing to larger, more bureaucratic organizations such as government agencies.

With that in mind, I thought it might be useful to list some of the groups (including some of the W3C’s own working groups) who have chosen to do their work in RELAX NG:

Why Tim Berners-Lee is Wrong

Sunday, October 29th, 2006

The W3C is finally waking up and realizing they’ve got a problem with HTML. The browser vendors are once again abandoning them and going their own way (except for Microsoft, which is going in a different direction entirely). The W3C has wisely decided to start listening to Mozilla, Opera, and Apple and revisit classic HTML. Unfortunately though they realize they have a problem, they haven’t yet realized what the problem is. Berners-Lee seems to think it’s about “quotes around attribute values and slashes in empty tags and namespaces”, and it’s not.

XHTML is not the problem. Well-formedness is certainly not the problem. Hell, even namespaces aren’t really the problem although they’re clunky and ugly and everyone hates them. The problem is that the W3C has abandoned HTML for years. HTML hasn’t moved forward since 1999. No wonder browser vendors are getting antsy.

Flipping Slides with JavaScript

Friday, October 20th, 2006

I’ve been writing my talk notes in XML and delivering them in HTML for years. These days I rarely if ever use PowerPoint. Especially since my talks tend to be quite code heavy, HTML works much better. It’s much easier to put a decent amount of (still legible) source code on an HTML page than a PowerPoint slide, plus I can scroll if I need to.

One of the most common questions I get when I give one of these talks is how I make the slide advance from one to the next by just hitting one key. It’s actually not that hard, but it does surprise people, so I thought I’d show you.