Saturday, December 19, 2009

A new beginning

Hmm... "slow start" is probably an understatement. Let's try again...

Computer technology is in my veins, and I'm not your usual flavour of programmer. I tend toward a contrarian philosophy. I tell myself it's because everyone else is getting it all wrong, but in my weaker moments I admit the very slight possibility that a small subset of "everyone else" might have a point here or there.

In this blog, I will describe and defend my views, partly to reinforce and (hopefully) organise them in my mind, and partly to expose them to the cold hard light of day, that the weak may perish and the strong photosynthesize.

I'm going to start off by briefly listing the problems with I.T.:
  • XML
  • SQL (not relational) databases
  • Java
  • XML
  • OO
  • Threads
  • XML
Have I mentioned that I don't like XML? Actually, that's only partly true. The other part is that I hate, loathe, detest, abhor, and would very much like to put a stake through the heart of XML. Those insipid little angle brackets just sit there grinning smugly, looking innocent and benign, whispering sweet lies to me: "Trust me, I am the end of all your tears. I can safely hold all your email, your documents, your databases and bank accounts. Just give in to me, and the pain will all go away." Only it doesn't. The pain gets worse; much, much worse. Don't believe me? Spend a few months programming XSL, or diagnosing broken SOAP packets, or configuring some big fat object graph with an XML-based DI framework.

Why, oh why, did we all fall for this putrid, festering disease of a standard? Almost anything would have been better. S-expressions have been around since the late 60's for goodness sake! Instead of this:



<person>
<name>
<first>John</first>
<last>Doe</last>
</name>
<dob>1984-04-04</dob>
<status>married</status>
</person>


We could have had this:



(person
(name (first "John") (last "Doe"))
(dob 1984 4 4)
(status married))


Is there a self-respective programmer anywhere who would argue that the XML is better? Cleaner? Easier to read and write? I can't think of a single dimension along which XML ranks better. Other than popularity, of course, which is precisely my point. How does such an fetid, rancid idea take root and become the lingua-franca of the programming planet? Answer me that!


If you need more convincing, consider this. To even enter the above XML into Blogger, it wasn't enough type it in as you see it, I had to type this:


<pre>
&lt;person&gt;
&lt;name&gt;
&lt;first&gt;John&lt;/first&gt;
&lt;last&gt;Doe&lt;/last&gt;
&lt;/name&gt;
&lt;dob&gt;1984-04-04&lt;/dob&gt;
&lt;status&gt;married&lt;/status&gt;
&lt;/person&gt;
</pre>


And you don't want to know what I had to type just above in order to show you what I had type further up. If the whole HTML roadshow had started off with S-expressions, typing a literal S-expression into an S-expression-based document could have been as simple as:


'(person
(name (first "John") (last "Doe"))
(dob 1984 4 4)
(status married))

No comments: