So, I’ve been working to migrate my ultrasaurus weblog from Movable Type to WordPress (this one will come later). Since all the links were changing anyhow, I decided to move from ugly numbered permalinks to pretty links based on the title of the post. I only had a few hundred posts, but enough so I didn’t want to be doing it by hand. Since I’m learning Ruby and infatuated with it at the moment, I wrote a Ruby script to generate the .htaccess directives.

In case this would be helpful to anyone else, here’s the code:

[sourcecode language=’ruby’]
require ‘date’
require ‘find’

Find.find(‘./archives/’) do |fname|
# puts fname
date_string = “”
title = “”
next if File.directory?(fname)
File.open(fname, “r”) do |f|
f.each_line do |line|
if m = line.match(“(

)(.*)(

)”) then
date_string = m.captures[1]
elsif m = line.match(“(

)(.*)(</h3)") then
title = m.captures[1].downcase
end
end
end

# for some reason my mt archives include some old drafts with no titles
next if title == ""

oldfilename = File.basename(fname)

# 1) remove chars that I think wordpress removes
# 2) change spaces to dashes
# 3) handle this case to avoid —
# Emmy Award for Outstanding Lead Actress – Miniseries or Movie
# also avoid — which I saw in my data, but not sure why it was there
# 4) remove trailing dash if there is one
# Thank you ruby-talk http://www.ruby-forum.com/topic/167299
title = title.gsub(/[(,?!'":.+=/)]/, '').gsub(' ', '-').gsub('–','-').gsub(/-$/, '')

# get the new path to the entry, like "/2003/03/brand-new-weblog/"
date = Date.parse(date_string)
newpath = sprintf("%d/%02d/%s/", date.year.to_s, date.month.to_s, title);

# we want something like this:
# redirect 301 /old/old.htm http://www.you.com/new.htm

output = "redirect 301 /sarahblog/archives/" + oldfilename + " /sarahblog/" + newpath
puts output

end # loop thru files in directory
[/sourcecode]

The only way that the Realtime Web is going to happen is for the tech to be adopted by the browsers, and for application developers to stop worrying about the details of how to get bits from server to client and worry more about the applications they are creating. The technology to support a Realtime Web was developed in 1981. TCP/IP or “socket” connections are, in fact, what the Web is built on. We don’t need to invent a new protocol or innovative techniques, we just need to expose some APIs for what is already happening at a low level when you browse the Web.

We do need to invent new stuff. We need to invent common paradigms of how people interact in real-time. We need to make web applications more responsive and proactive. Perhaps presence and the threaded chat conversation are the blue underlined links of the Realtime Web, but I think that the world is ready for more.

Zac Bowling leads an interesting discussion using seesmic about the technologies used for real-time communication the Web. As I have said before, these are old technologies being used in a new way with more shared code via open source.

What I expect to happen next is for realtime applications (chat, push, etc.) to become so ubiquitous on the Web that it will be only natural for browsers and Web servers to expose APIs that support this next generation of applications. Just as people have come to expect professional applications on the Web to give immediate feedback without a full-page-refresh, so they will come to expect dynamic updates.

By 2015, the refresh button which figures so prominently in the Web browser today will be relegated to an obscure menu. In fact, I expect the browser to disappear from mainstream consciousness. Today most people are only vaguely aware of what a Web browser is or that they use one. They just surf the Web or read their mail. Whether they are using Hotmail or Outlook’s Web client or the Outlook desktop application is a minor technical detail. The folks who develop the technology need to catch up with that way of thinking. We’re getting there with interactive UI, but we’re only just beginning to create the kind of applications that people need and expect.

I’ve been periodically trying to fix comments on this weblog with no luck. Since I started this weblog in 2003 with Movable Type 2.63, I have upgraded it every year or two and periodically added do-dads and code snippets. Sometimes it is easier to start fresh than to fix what’s there.

This morning I decided to completely recreate this blog and the comment system does seem to work. If you have posted a comment in the last couple of years I made you a trusted commenter. If you are a new friend (or one of my old friends who reads this and then never says anything), the next time you comment I will make you trusted. If you are a trusted commenter, then comments will be posted immediately. If the new MT is better at spam prevention, then maybe I’ll just let anyone comment, but I had over 7000 spam comments that I just deleted so it has been a bit of a problem.

Please post a comment to help me test. Feel free to give me any feedback on blog design. I plan to bring back in elements of the old design after ensuring that the functionality is working. Do folks like the new three-column layout or is it too cluttered? Should I post an image of me with my new purple hair?

The tag cloud is obviously broken. I’ll tackle that next. Please let me know if you see anything else funky.

[Update: moved to WordPress and the lovely thematic theme.]