Saturday, July 21, 2007

10 Years of XML: Global Warming

XML is almost 10 years old. 10 years, that is a long time. When it just came out, I thought it would be gone within a few months, but it wasn't. XML became popular because companies had to interact. Who has been making companies interact since the 70s, 80s, 90s? Programmers. And programmers are what? Lazy.

XML is the lazy person solution. It's easy, takes little time, but it's inefficient. I grew up with the idea that it is better to put a bit more effort into something at the beginning so that you would safe a lot of cost later. XML is the perfect example of something that does exactly the opposite. XML is simple. It's simple to write, it's simple to program with, but it is very verbose. Simple things take kilobytes of space. Why is that bad? Because it takes memory, processing power and bandwidth. You only have to program something once, but the memory usage, waste of CPU cycles and waste of bandwidth just keeps going on and on and on forever.

If people would just have invested into some protocols a tiny bit more, like XHTML, like SOAP, like RSS, like this hip new REST thing, they would have come up with more efficient protocols. Sure, the parsing would have been more difficult, but come on, we're IT people right? We're not sissies. Think about all the wasted resources, all the wasted energy.

People talk about global warming and energy waste. They should calculate how much of that can be blamed on XML. I think people would be surprised. Hundreds of thousands of servers are at this very moment wasting their CPU cycles and bandwidth, and with that their energy, on parsing and generating XML documents. Haven't we ruined enough with this already. Isn't it time to come up with more efficient data representation format?

Maybe Al Gore should make a documentary about that.