KEXP Archive in IE9 Launch and Mellow Johnny's at SxSW

March 21 2011

KEXP Archive is a very cool HTML5 application that uses the KEXP dataset to show off a cool visualization. The KEXP data set represents nearly 10 years of radio playlists and includes over 700,000 tracks with album art, the date and time each song was played, and DJ names. The result, created by Stimulant, can be seen at Pretty rad.

This application was featured in the IE9 launch at SxSW -- watch it demonstrated in a video here.  Also, it was shown while KEXP broadcasted live from SxSW at Mellow Johnny's, Lance Armstrong's bike shop. Here's some pics of the KEXP IE9 kiosk in the bike shop:




Ze Frank and Star.Me at IE9 Launch

March 17 2011

Check out Ze Frank’s presentation at the IE9 launch event at SxSW:


Bruce Sterling at SxSW Interactive March 15 2011

March 16 2011

Was looking forward to hearing Bruce and he didn’t disappoint. He was cogent and pithy as ever.  Ultimately he wove together a theme about political agency in an era that has neutered it.

Here’s my notes:

  • Started out saying this was the best SxSW ever. Anti-nostalgia, no backlash on corporate sponsorship at the show, ultimately recognizing the core is intact and the gathering is solid
  • Talked about “design fiction”
  • Then switched to politics. Called out that political language has been decimated at present, reduced to “polarizing brand management.”
  • Called for “passionate virtuosity” – something artists have, can we strive for that across the board
  • First political topic was Synthetic Biology and J. Craig Venter.  Sterling was at presidential council of bio-ethics, not impressed with DC bureaucrats’ ability to parse the gravity of the technology.  Called out change in cultural discussion from genetic engineering debates of 70s and current lack of discussion about the technology. Exxon Mobil funding Venter. Sterling’s point was not anti-synthetic biology per se, but rather why are the corporations controlling the outcome instead of the people? No difference between industry and government in this day and age.
  • Switched to Italian politics and Italian Prime Minister Silvio Berlusconi’s involvement in sex scandal. A moral discussion.  And he brought it back to the states ultimately – Washington DC “a Walmart of a brothel.”  Kept using the term “calamitous.”
  • Concluded with “Who are the victims of a decaying status quo? The young people.”  Ripped on boomers for awhile – “get out of the way boomers” and called for “millenials” to start global youth movement.  Called for an end to the “era of organized deception.”  Instead of poem, quoted Girabelli’s call to battle, also “Women – do not embrace a coward.”
  • Final line: “Another world is inevitable; the future is unwritten.”

Curiosities in Microsoft.Web.Helpers: Video.Flash and Analytics.GetGoogleHtml

February 3 2011

Been digging into some of the classes in Microsoft.Web.Helpers. Lots of interesting things there, the basics being classes that inject scripts and HTML into your website for lots of popular activities and services out there. Many that you would expect (Bing, XBox gamer tag, File Upload)   A few surprises as well -- classes for Google Analytics, Recaptcha (a Google service) and a  Flash video player. Some screenshots: 


Kinda trippy but kinda great too. 

JSON Deserialization Made Simple With System.Web.Helpers and List<dynamic>

February 3 2011

Been playing with WebMatrix and have come across some crazy and beautiful code that I really liked in the FourSquare helper on CodePlex. Check this method out, which returns a graph of friends from the fourquare api

/// Returns a list of friends
    /// </summary>
    /// <param name="accessToken">The access token of the authenticating user.</param>
    /// <param name="userId">The Id of the person for whom to pull a friend graph. if not specified, the authenticating user's list of friends will be returned.</param>
    public static IList<dynamic> GetFriends(string accessToken, int userId = 0) {
        var url = "{0}/friends?oauth_token={1}";

        var client = new WebClient();
        var jsonResult = client.DownloadString(string.Format(url, userId == 0 ? "self" : userId.ToString(), accessToken));
        var result = Json.Decode(jsonResult);
        return new List<dynamic>(result.response.friends.items);

Notice how tight this code is. And note the crazy dynamic typing that C#4 provides in combination with the Json.Decode method. If you are wondering where that JSON.Decode method came from, it is from System.Web.Helpers -- you can use this dll anywhere, doesn't have to be with WebMatrix or Razor. Here's a link to the docs on System.Web.Helpers.Json: 

 Serialization and JSON have long been painful in .NET because of .NET's strong typing.  This got better with the C# dynamic keyword (see this post and this post) but nothing is as elegant as the code above.

Check this example out, which returns a user's FourSquare badges:

/// <summary>
    /// Returns badges for a given user.
    /// </summary>
    /// <param name="accessToken">The access token of the authenticating user</param>
    /// <param name="userId">The Id of the user</param>
    public static IList<dynamic> GetBadges(string accessToken, int userId = 0) {
        var url = "{0}/badges?oauth_token={1}";
        var client = new WebClient();
        var jsonResult = client.DownloadString(string.Format(url, userId == 0 ? "self" : userId.ToString(), accessToken));
        var result = Json.Decode(jsonResult);
        var badges = new List<dynamic>();
var groups = new List<dynamic>(result.response.sets.groups); var allBadgesGroup = groups.FirstOrDefault(g => g.type == "all"); if (allBadgesGroup != null) { foreach(var badgeId in allBadgesGroup.items) { badges.Add(result.response.badges[badgeId]); } } return badges; }

Notice how the two dynamic lists get created which are then manipulated with a LINQ lambda query.  Nice! Having dealt so often with either manually mapping JSON to CLR objects and/or dealing with arrays nested in arrays nested in arrays, I'm absolutely loving this.


YouTube Flips Switch On IFrame as Default Embed Code

February 2 2011
Interesting to see that YouTube has made their embed code default to an iFrame instead of using an <object> tag to insert a Flash player. This capability was introduced this summer, but it was more experimental then and only became the default experience last week.
The main motivation for the switch?  So that if you are on an HTML5 browser, you won't be sent Flash, but rather your browser will use the <video> tag and serve up either WebM or H.264.  Read more here.
What's interesting is that HTML5 on YouTube's site was an experiment, but with making their embed code an IFrame by default, it means HTML5 video becomes much more prevalent.The average Joe user who wants to embed a video on his blog will now be serving up HTML5 whether he realizes it or not.

BinPress Programming Contest: $40,000 in prizes

January 25 2011

I have the honor of being a judge in the recently announced BinPress Contest. As they say on their site:

Have you been developing custom solutions for the web? pick your best feature, module or UI component that can be packaged and re-used and publish it on Binpress. Binpress is a marketplace for source-code, where developers can sell and buy source code from each other.

If you've been writing reusable components or libraries, consider submitting. What have you got to lose?

Mobile Breathalyzer - Another Free Windows Phone App

January 19 2011

Got another (free) Windows Phone App in the marketplace:

 The Mobile Breathalyzer

Using revolutionary technology in Windows Phone 7, the Mobile Breathalyzer allows you to determine your blood alcohol content using your phone. Um, yeah, right. Download this joke app and then have your drunk friends try it. Watch them blow into the phone, expecting a result. Good times!

Give it a try! Thanks to @systim for doing the design. Good old designer/developer workflow on this one -- Blend/VS did the trick.


Using The Nonlinear Navigation Service To Solve Back Button Problems With Window Phone 7 Apps

January 10 2011

Started using the NonlinearNavigationService to solve some issues in my app where the back button threw my app into a loop and the user could never back out of the app to close it. Which made the app fail certification incidentally. (Because you manually can't prune the navigation history, this is really the best workaround to avoid this type of loop.) This service works great -- just add the dll and you are good to go -- except it doesn't work with the Page Transition Service from the Silverlight Toolkit.  That's too bad, but hopefully someone out there will address that! If anyone does, let me know...

Music Buzz - A Free Windows Phone 7 Application For Discovering Music and News About Your Favorite Bands

January 7 2011

I've taken Buzz off the Marketplace and replaced it with Music Buzz, which is the same thing, but free!  The ecomonics of the app store are worth noting: Buzz, priced at 99 cents, received 5 downloads in two months. Music Buzz has already been downloaded 1000 times in the last two weeks! 

Here's a description of the app:

Find music, news and more about the bands you love. You'll be amazed at the latest buzz and music (remixes, bootlegs and more) that the Music Buzz application will discover.  Please give it a try!

Here's a screenshot: