Categories
Uncategorized

Three the Hard Way

You can do things the easy way or the hard way. I’m sure there are some in-between ways, but that’s not relevant here.

See, I was using the data from blo.gs for a while, and lamented that there was not an easy way to add support for XFN. So I thought about the problem, and came up with a solution. A less than elegant solution, mind you. I was going to implement the solution, but opted not too. Later, Matt makes a feature request to Jim at blo.gs to add XFN relations to things and blam! It’s in there.

So, the moral of the story is, if I had actually made the feature request, I might have gotten what I had wanted without doing much work. Even if I had done the work I had planned to, it would not have been as useful as the alternative, becuase now all blo.gs users have the XFN feature available.

So make feature requests! Even if you are some nerd who likes to roll their own, because this is a great big internet, and you’re not the only user out there…

Categories
Uncategorized

Weblogging Tools of the Future

Over at the BloggerCon site is an interesting post about visions for the next generation of blogging tools. Read through the comments for some neat ideas. Some of them are very doable today, while some of them just seem crazy or don’t make sense. That’s ok, they’re all just ideas, and they’re from users. Hopefully all the weblog tool makers get a look at this list, or are open to feature requests from their users.

As for me, I tend to build my own tools, and I use my own tools. So the feature requests have a much shorter path from user to developer. ;)

Categories
Uncategorized

A Tale of Two Formats

I recently did some work on a site that runs on a Windows server (gasp!) using IIS (yikes!) and ASP (eek!) If you know me, you know these are not my favored technologies. Nonetheless, we had a job to do.

The job was to add syndication feeds. We first added an RSS feed. Why did we choose to add an RSS feed first instead of an Atom feed? Well, not being familiar enough with ASP, we were not easily able to properly encode everything, In some cases data coming from SQL might need to be encoded, and our code didn’t always do the right thing. So we were faced with creating an RSS file that was occasionally invalid. We did not like this, but didn’t have another solution. We also knew that most of the RSS aggregators out there don’t mind invalid XML when it’s in the form of RSS. Still, while we were not pleased with the situation, we compromised.

At this point there was still not an Atom feed. We just couldn’t allow ourselves to bring an occasionally-invalid Atom feed to life, not until we discovered Server.HTMLEncode, which took care of the nasty characters that needed encoding. Once we had this final piece in place, we felt that it was OK to implement an Atom feed, and figured it would be valid (fingers were crossed of course.)

But wait, this wasn’t the final piece. There was one more, the dates and times… See, as an old Perl hacker, we’re used to using strftime to make any date/time we need. Since I couldn’t find a strftime function in ASP, I looked to the web and found A Customizable Date Formatting Routine which is close to strftime, well, close enough for my needs, but had some bugs. Anyway, we grabbed it, and it worked. More or less. (Ken Schaefer has pointed me to an update, though I still have to drop it in place.)

Where were we? Ah yes, the dates and times. Well, at first we just fudged the GMT which created valid feeds, but was lame. A little change in SQL eventually fixed that. Of course Atom requires a modified time, and it looks like it requires a created time, but if the created time is missing it should be considered the same as the modified time, and then there’s the time an item was issued as well, which is not required. I think.

Anyway, I’m pretty sure we’ve got it figured out now. The feeds both validate. Hopefully that will remain true. I think the dates and times even make sense now.

Categories
Uncategorized

ASP Entities (and RSS and Atom!)

I’m starting to really like ASP… Ha! Just kidding!

On the bright side, I finally found Server.HTMLEncode, which makes creating a (more-often-that-not) valid RSS feed using ASP a little easier for me.

Who knows? Maybe I’ll attempt to use my (limited) ASP kung-foo skillz to create an Atom feed. ;)

Categories
Uncategorized

Again with the Atom, XML, RSS, etc…

What to do with that bad XML? Aaron suggests I beat it with a stick. A stick made out of either HTML::Parser, or XML::Simple, or perhaps Tidy. At least I think that’s what he said…

As usual, Aaron is about 25 feet above me on this stuff, so I’ll take me some time to investigate his suggestions… I suppose I could just use the Universal Feed Parser, of course it’s written in Python. I might have to make some exceptions here…

Aaron also does some crazy transformations of XHTML 1.1 to Atom, and there’s some hackery titled atom03-to-rss as well.

Speaking of atom2rss, or as it’s called, the Feed Normalizer, is an Atom translator (to RSS) that Phillip Pearson put together.

Of course it’s written in Python… No matter. I’m starting to think this is the year I actually Dive into Python… I’ll let you know next month.