Iron ... Codewoman?

As said to Heather: the last error in a script is always the most difficult to track down. Sure enough, I've spent far more thought-cycles today on the last, final error in the portal code I was writing than on any other bug I've squashed today.

The website:, "the world's most useless portal." Its major purpose right now is to syndicate all of the sites that belong to our group of friends. Fourteen sites are currently syndicated there. Some sites, like and, are updated almost daily. Others, like, see updates once or twice a week. Others, like flocci*.net are updated much less frequently.The original plan: rewrite how our RSS syndication code handled the sites.

The problem, part I: the XML parser regularly barfed on non-ASCII characters, even when we tried to escape them properly. Instead of displaying some kind of error, sites would just disappear from syndication until the owner noticed and fixed the problem. Also, syndication only occurred every 30 minutes; that's quite a long time to have to wait to correct an error.

The problem, part II: there were so many sites syndicated that it was becoming increasingly difficult to tell which sites had been recently updated.

The question: How in the world were we going to come up with some kind of periodic RSS/XML solution that was flexible enough to suit our needs? Was there any way to write up some code so that only the five most recently-updated sites had blurbs, while the rest were just indexed by title?

The idea: so who said we had to use a standard RSS/XML solution? While working on something random this morning, it occurred to me that Heather had been able to perform PHP includes on files hosted on other web servers.

What if, I thought, we could write something that dynamically pulled all the files in when someone loaded the page? Something that would dump everything into an array, sort it by a timestamp, and then spew out only the five freshest entries?

I can't link to it just yet, because there's some stylistic work yet to be done on the output, and some of the sites don't have their syndication files in place yet. But in my other web browser window, I'm staring at the output of the fully-functional script, and I'm literally bouncing in my chair.

As I started to write this, an email popped up from Sean. "Your code fu rules all."

Once upon a time, I tried to claim that I was just a wannabe coder. I still think that sums me up pretty well, but I realize that after a post like this, no one is ever going to believe me, ever again. If I can't be an Iron Chef, I'll settle for looking like an Iron Codewoman every now and then.

I find myself wondering what my next code-related exploit will be…

all tags: 


Many many many thanks for figuring that out. Wondergeeks is a group site; I thought I might as well get help. This way, the new wg will be finished sometime this century. :)

You and Noah ... -chuckle-

Your comment about the last error being the hardest to find I think holds true for any sort of coding that you do. Man, those last errors will drive you nuts.

I think I'm a wannabe coder who didn't really wannabe. =)