The portfolio, resume, and blog of Nathan Chase
9 Apr 2009
Since FriendFeed’s launch of a new still-in-beta redesign, there’s been much debate over some of the features and style changes – both on blogs, and within the service itself. While any change is sometimes met with reluctance and skepticism, as Facebook has realized with their latest changes, there’s a number of reasons why the aesthetic and functional revamps of FriendFeed are helpful for both its users, and for the proliferation of real-time data on the web. Here’s a breakdown of why I believe FriendFeed has made a lot of correct choices in their transition from data aggregation, to a broad conversational hub for the web.
27 Apr 2008
credit: CATR
Twitter is now all the rage. Your friends are doing it. Your mom is doing it. Even educated fleas are doing it. Microblogging is here to stay, and it’s caught on in a big way. According to Wikipedia, there are over 111 different ways to let everyone know what you had for breakfast online! Now the question is – how do we update them all at the same time?
28 Aug 2005
Well I dove headfirst into some Flash programming this weekend and came out with a success. Now I know this is probably not the most efficient way, correct way, or best way to do this, but it got my XML parsing chops up, and I learned how to tap into the Amazon API while creating it. I’m stoked at the result.
What it’s doing is it’s taking my last played song’s Album Title and Artist Name (thanks to Audioscrobbler/last.fm) and sending it along to Amazon as a keyword search. Amazon then gives back an XML file with the results, and then my Flash app parses the XML and finds the node with the CD cover that matches the keyword’s search results. So if you look over there in the sidebar, you’ll see that the cover appears as it would show on Amazon. Pretty neat huh?
And here’s the code, if any Flash junkies want to see what I was working on. If you have any questions about it, email me or hit me up on IM. I still have to add something if there is no image available, and maybe try another service (Google, AllMusic) if Amazon comes up short.
// Allow this Flash app to show the loaded images consistently from the remote server, images.amazon.comSystem.security.allowDomain("http://images.amazon.com");////var audioscrobblerURL = "http://ws.audioscrobbler.com/rdf/history/[YOURPROFILENAMEHERE]";var audioscrobblerReply_xml:XML = new XML();audioscrobblerReply_xml.ignoreWhite = true;audioscrobblerReply_xml.onLoad = function(success) { if (success) { // trace(audioscrobblerReply_xml); processAudioScrobblerXML(audioscrobblerReply_xml); } else { trace("error loading"); }};audioscrobblerReply_xml.load(audioscrobblerURL);function processAudioScrobblerXML(audioscrobbler_xml) { audioscrobblerArtistTitle = audioscrobbler_xml.firstChild.firstChild.nextSibling.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.firstChild.firstChild.firstChild; trace(audioscrobblerArtistTitle); audioscrobblerAlbumTitle = audioscrobbler_xml.firstChild.firstChild.nextSibling.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.firstChild.firstChild.firstChild; trace(audioscrobblerAlbumTitle); // set the standard Amazon URL var amazonURL = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&SubscriptionId=[YOURDEVIDHERE]&Operation=ItemSearch&Keywords="; var urlEnd = "&SearchIndex=Music&ResponseGroup=Images"; var keyword = audioscrobblerAlbumTitle+" "+audioscrobblerArtistTitle; // create new XML var amazonReply_xml:XML = new XML(); // ignore the whitespace amazonReply_xml.ignoreWhite = true; // trace the returned XML and process it amazonReply_xml.onLoad = function(success) { // trace(amazonReply_xml); if (success) { processXML(amazonReply_xml); } error = "error loading"; }; // send off the URL to pull back the new XML data from Amazon (note variable "keyword" comes from textfield on stage) amazonReply_xml.load(amazonURL+keyword+urlEnd); // create the function of processing the returned XML function processXML(amazon_xml) { // amazon_xml is now a reference to the XML // object where information is stored // trace(amazon_xml.firstChild.firstChild.nextSibling.firstChild.nextSibling.nextSibling.nextSibling.firstChild.nextSibling.nextSibling.nextSibling.firstChild.firstChild); albumCoverURL = amazon_xml.firstChild.firstChild.nextSibling.firstChild.nextSibling.nextSibling.nextSibling.firstChild.nextSibling.nextSibling.firstChild.firstChild; //load CD Cover image into movieclip on stage imageHolder.loadMovie(albumCoverURL); }}