Some of you may have noticed that the data feeds from Slashdot and The Register were getting old. Very old... in fact, several months old.
This was due to a problem with the system that pulls feeds (RSS) and stores them in a database, known as CS-RSSDB. The system broke following an upgrade to the internal XML parsing system (CS-PHPXML) that is used on the site for configuration, AJAX requests, and various other things. I tried in vain for a long time to get the script to work by forcing it to use the older version of XML parser, which at least allowed retrieval of the SlashDot feed.
I tried to fix the system to follow the new XML parser, but found that it was seriously broken. So broken, in fact, that it would require a fairly significant overhaul so that it would once again be able to pull basic data out of the feeds. I just about gave up... then I found SimplePie, an RSS framework that was just as easy to implement as it sounded.
I found it after getting frustrated at the idea that I had to write from scratch every piece of code that powers CrazedSanity.com. Every piece might not seem like much, for what seems like such a petty website, but it is actually quite an undertaking. You might not realize it, but CrazedSanity.com uses many different systems/frameworks:
Anyway, I started to feel like I was suffering from the "not written here" syndrome, a problem the befalls developers wherein they basically won't use any code not written by them. That, coupled with the idea that I had to spend a ton of time rewriting something just to get it working again, made me feel like there just had to be a pre-written alternative out there. Something that could just parse RSS feeds without all the fuss (trust me, XML of any kind in PHP, even RSS, is painful)... then I found the SimplePie system.
I read the instructions, even downloaded it, and started to feel like I was being mislead. Like the code just was not as simple as it implied, and that the only way I'd be able to do what I wanted to do would be writing my own. Have I said that enough yet? Have I mentioned how truly daunting that task felt?
Anyway, after figuring out how their demo code ran, and ripping out a bunch of stuff that I didn't need, I found that I could get my RSS system running again really quickly with virtually no hassle. Amazing. I think it was the first time that I ever found code written in PHP that was actually as useful as it claimed to be.