Quote of the Moment

Ben: My laptop has left Toronto's sorting centre (which means that it could conceivably be in my hands by Friday). ^_^ And no, I'm not going to stop talking about this until it arrives :D
Ben: It's like having a baby, only I don't have a significant other and my laptop won't need a college fund. -Ben
(moar?)

Up down up

My PMI stock jumped 5 percent in a single day, so I grabbed while the grabbing was good and closed out my position. Just last week the investing firms were all warning that PMI had peaked and was headed for a correction ;) glad I waited!

I used the funds from the sale of the PMI to open positions in NTDOY and SSL. I just wish I could’ve gotten in on Nintendo earlier… 100% growth in under a year. But after playing Wii with my residents on Friday, I’m convinced Nintendo still has a lot of room to grow, because Wii is just way too cool. I still won’t be buying one anytime soon, though :( I just can’t justify the purchase of a game system when there are so many more important things to spend money on.

Stalking done right

Although I had turned off the Where’s Seth? for the winter break, I neglected to turn it back on again for the first couple weeks of classes. The reason was that I was using a rather… kludgy method of parsing calendar data, to say the least. The calendar was stored on my computer in iCal format. I used KOrganizer to edit it and add my classes / schedule, and then used rsync to keep it up-to-date on the server. PHPiCalendar then parsed the iCal and generated RSS. I then used XML_RSS from PEAR to parse the RSS and yoink only the current event. That’s a lot of work to pick out the current item from my schedule!

I had been lazy for a couple weeks about sitting down and inputting my new classes. So today, I fired up Google Calendar and input my schedule items just for fun. It features XML and iCal export, so I thought I could hack up an equivalent version of the Where’s Seth? script using that.

I first tried just pulling the XML data and parsing that with my script. However, it wasn’t RSS, but Atom. I didn’t feel like rewriting everything to handle Atom XML, so I then investigated the iCal format. Googling “PHP iCal parser” got nothing decent to turn up (I refuse to register at crappy sites to download questionable libraries), but searching for “parse iCal” showed a JavaScript solution. That still wasn’t ideal, but I read the comments of that blog entry to find that there was a WordPress iCal parser! It was easily to grab and install, but it only showed events that had already passed. So I hacked it up a little bit to accept feeds from multiple iCals and to only show an event if one was currently in progress; it only took about an hour from start to finish. And now I have a slick Google Calendar that I’ll be a lot more likely to keep updated than I did the silly local iCal :D

This, my friends, is Stalking Done Right™.

Watching OU-Texas. Deciding who should be awarded the Academy Award for Best Actor When Not Actually Fouled.

My Linkblog