DerekMartin.ca web development, spirituality, UFOs & the occult

22Nov/081

LifePipe

omg
i just made a frickin' sweet pipe!
i call it my "lifepipe"
it shows you my digital life in from most recent to oldest...
my facebook statuses
my twitter tweets
my flickr uploads
my last.fm scrobbles
my personal blog posts
my geek/coding blog posts
and my recently favourited youtube videos
subscribe to my life by clicking here

http://pipes.yahoo.com/pipes/pipe.run?_id=_LI6Afm43RGj03lRPxJ3AQ&_render=rss

20Nov/080

I’m Smokin’ Pipes

Have you played with yahoo pipes yet?
I kept meaning to, but never did... until tonight.
Pipes. Are. Awesome.

My first ever pipe took me an hour to build (learning curve included)
This is what it does...

  • aggregate 35 English language feeds
  • aggregate a few Russian feeds AND translate them into English
  • create a super-feed out of the union of the English and (previously) Russian feeds
  • filter out all the feed items that don't match my 'wanted' keywords (having to do with UFO sightings, the paranormal, etc)
  • filter out all the feed items that DO match my 'unwanted' keywords (such as 'illegal alien', and 'hoax')
  • sort the feed items by publication date descending
  • remove duplicates based on the item's link URL
  • extract keywords from each item's description, and append them to each item as an extra "keywords" attribute
  • extract location information from each item's content (mentions of cities, etc), translate it into latitudes & longitudes, and append them to each item as an extra "location" attribute
  • publish it as a native-PHP array, for easy consumption by file_get_contents($url)
  • Note: My pipe is automatically also available as RSS, JSON, & KML

I'm not even kidding.
One Hour.
It's insane.

There's one little bug in it somewhere, having to do with ATOM feeds not having an item.description, but it still works. In fact, you can see it working here:

Let me know what you think in the comments on this blog post!

20Aug/081

Reusability and the DOM

I consider my PHP to be well-written and at least somewhat re-useable (as much as any code can be), but my javascript? Not so much.

Is it because I haven't chosen sides in the framework wars? (dojo, jquery, prototype, yui...) Is it because javascript has evolved beyond it's display-logic roots into a "full-service language", without also having it's documentation mature? Is it because so many 'designers' don't know how or why the id & name of form fields can be different?

Maybe it is due to the hooks provided by the DOM? Each page can have hundreds of unique hooks, and you need to go into the project with a sense of structure & organization, otherwise you'll be including 20 javascript libs on each pageload.

And what about decoupling? I see people selecting elements based on their classes all the time. I think that's ok if the class is structural in nature, but is it right to select on presentational classes?

Maybe it's about standardizing the mapping between the database, the HTML, the CSS, and javascript, so that there's consistency, predictability,reliability, and the potential for a whole lot of process streamlining via frameworks & integrated development environments.

Or does something like this already exist? Have I missed the boat?