Why Design If You Have to Uphold the “Coding Granny Argument”

Just saw in my mailbox that some of my mails were, incorrectly, marked as spam. The content of some of those lead me to discussions about HTML5 and XHTML 2. See the thread here called: XHTML 2 Working Group won’t be renewed?, that started with the remark “I was very surprised by this announcement: http://www.w3.org/News/2009#item119“.

Most of the discussions sound very familiar. Its all about design, distributed development and integration. Things were are used to in our relational database environments and multitier environments.

And, as you saw reflected in the title, I really liked this one:

The problem that XHTML 2.0 faced (and any XHTML adoption for that matter) is that you’re still dealing with the Coding Granny Argument, something that is used extensively by the HTML purist crowd who frankly do NOT want to see XML adopted as a lingua franca, especially for expressing HTML.

Most of you have seen the argument, of course. It runs along the lines of “HTML has to be accessible to non-programmers. My grandmother should be able to write HTML code, even if its ill-formed, and have the browser magically “know” what was the intent of such code, otherwise there will be no adoption of HTML.

In practice, this argument is specious in the extreme.  The eponymous coding granny is far more likely  to be writing in a blog engine or wiki in which the input of content is almost certainly going to be filtered into a final form for storage, they will likely end up using perhaps two tags, <i> and <b>, and may even by using a WYSIWYG editor that will let her incorporate code programatically. It is not, in fact, this user that the argument is intended to protect, but rather the coder with bad programming habits.

and a bit further on

There is a second facet to these arguments. The HTML crowd hates, fears and despises namespaces. Again namespaces mess too much with the Coding Granny argument, and they add to the complexity of writing inline HTML content for all of those AJAX programmers who tend to think that the only relevant angle bracket language is HTML. If Ian Hixie acknowledges the XML argument, then he also has to acknowledge the validity of namespaces, and I suspect this is a non-starter for him. By keeping the two languages “separate but equal” he gets his namespace free language and can then work towards eliminating namespaces from the spec down the road.

I have no idea if I have to laugh or cry. If one would read a specification like the following, an official one, as a Simon St. Laurent pointed out, mentioning the HTML5 syntax: http://www.w3.org/TR/2009/WD-html5-20090423/syntax.html:

“A DOCTYPE is a mostly useless, but required, header.”

Note:

DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a different rendering mode that is incompatible with some specifications. Including the DOCTYPE in a document ensures that the browser makes a best-effort attempt at following the relevant specifications.

I wonder why a “DOCTYPE” ever was introduced? “Tips for Webmasters” has an answer on that question (yep, a W3 official site):

Why?

Why specify a doctype? Because it defines which version of (X)HTML your document is actually using, and this is a critical piece of information needed by browsers or other tools processing the document.

For example, specifying the doctype of your document allows you to use tools such as the Markup Validator to check the syntax of your (X)HTML (and hence discovers errors that may affect the way your page is rendered by various browsers). Such tools won’t be able to work if they do not know what kind of document you are using.

But the most important thing is that with most families of browsers, a doctype declaration will make a lot of guessing unnecessary, and will thus trigger a “standard” parsing mode, where the understanding (and, as a result, the display) of the document is not only faster, it is also consistent and free of any bad surprise that documents without doctype will create.

Sometimes I glad that I am not a (good enough) developer and stick to database administration stuff.

I wonder why people keep re-inventing the wheel being a square object, instead of make progress onwards… I can only imagine big (company) powers driving this direction, this control over language evolution, that is. Good programmers wouldn’t approve a “Coding Granny Argument” to be upheld, they know this only means more work, more coding and more possible bugs.

Anyway, two rants in one week is enough…