carltucker.com

Where I write whatever the hell I want.

Well, that sounded easy

It should have been a simple thing. Choose a photo out of my recently ‘liked’ list on MlkShk and put it on my About Me page. Well, I did it. It only took a bit more than two days. Check it out, then come back ‘cause theres…

more inside!

Well, so yeah. That turned into one of those projects that just keeps getting harder and harder as I go.

Idea: At first, I had in mind something like the Twitter favorites list. That’s automatically updated in real time. Every time I star something on Twitter it shows up when the page here is viewed.

Obstacle: Twitter has a handy plugin that you just slap on the page. MlkShk doesn’t. But MlkShk DOES have an API sooo… guess I have to learn how to use it.

Obstacle: To use the MlkShk API, the viewer needs to be logged into MlkShk. That means that every page load, I would have to ask the viewer to log into MlkShk via a handy popup login screen. Not what I wanted. OR, I could just hard-code my login data into the javascript on the page so that every viewer ended up logged into MlkShk as me. REALLY not what I wanted.

Idea: I’ll just have my site compiler scrape my actual ‘likes’ page at MlkShk. It won’t run every time someone views the page, but at least it will be automatic and update every time I update the site for something else.

Obstacle: Scraping a web page looking for a certain thing is a serious pain in the ass. Bright side: lots of string manipulation practice.

Idea: I can’t be the first person to want to do this. There must be a handy tool already written that can parse web pages and extract the elements. I’ll just install that.

Obstacle: Nokogiri requires the latest Ruby version. I have an old one.

Obstacle: Upgrading ruby is a notorious hair-pulling exercise UNLESS you have rvm

Obstacle: RVM requires something called macports

Obstacle: macports needs to be compiled, and to do that you need Apple’s developer tools installed. Finding a version for an old mac is not as simple as it sounds.

Obstacle: all this requires disk space and I just ran out in the middle of compiling mactools. Bright side: I cleared out 45GB of useless crap I didn’t realize I had.

Obstacle: I should really switch from the lame Time Machine program Apple provides to a smarter backup strategy. Squirrel! But it really is clever that way.

Result: Obstacles overcome! XML Parser learned! Ruby templates written! A single image placed on a web page!

So there. Enjoy. How was YOUR vacation?