Home » Miscellaneous » Breaking the Code

Breaking the Code

It’s been one of those days. I started the process of moving this humble blog over to WordPress late in the day, when the topic came up naturally for a friend. Why WordPress? Because it’s reasonably good looking, has nice features, and is in my price range (free). But to get things going, I thought it would be nice to move all of this junk, er, all these posts over to start ‘er out with some stuff. And there’s enough of them I’d like to automate it, yes?

Oy.

It’s not just that author’s den doesn’t have a decent output format for posts, as you might have guessed. I can get them off as text and work them up by hand later into an appropriate format. That’s what is needed to import them into WordPress. My best shot is to code my stuff with their own version of RSS, which is WP XML or WXR. OK, great. What does that look like? I mean, if I’m going to be hand coding stuff in notepad, what do I have to do?

Can’t find any description of WXR anywhere. OK, so why not take what I have and do an export from WordPress to see what it looks like? Oh, it’s about 100k of garbage, all kinds of tags that are immediately closed because there is nothing to put in them and other nonsense.

Clearly, no one wants a human to see what WXR is. You are supposed to look at the li’l importer button and if it’s not what you want, you just roll over and die. And the code these importer/exporters generate is easily 100x longer than it needs to be, meaning everything takes longer than it should to download.

I realize that I’m getting old here. I got my degree from Carnegie-Mellon in 1987, back when we were just learning the power of a distributed network. But I can’t help but think that there are some real fundamentals to writing good code that apply today as they did then.

Now, you’re probably thinking, “Why would you want to see the raw WXR code anyways?” Because I have to write my own conversion, is why, and there’s no reason I shouldn’t be able to do it myself. This isn’t the source code for an operating system, this is a big pile of blog entries – just some data, not much more. And it’s rendered largely unreadable by the fact that author’s den didn’t adhere to the standard protocol. Blame them? It’s not like WordPress observes the standard, either, or publishes what they do.

So what’s my point? Naturally, the main point is to kvetch long and hard; it makes me a better person later. Also, getting this down into an essay makes it into organized kvetching, which is the beginning of any political movement worthy of mentioning.

But my main point is this: with all the fun toys we have to play with on the ‘net, people are clearly not paying attention to the fundamentals. It’s like my blog entry on what makes good writing all over again, except this time it’s a form of XML. I think I see a pattern.

2 thoughts on “Breaking the Code

  1. I think this has a lot of potential and I like the fact that your URL has your name in it. Easier to remember than the Author’s Den site and page.

Like this Post? Hate it? Tell us!