Ch-ch-ch-ch-changes! v2.0

Well, almost a year to the day. Pretty bad…

BUT, at least I have a decent excuse. My wife and I had a beautiful baby girl, Haven, on Christmas Day. Shortly after I got the new job we found out about the pregnancy, and then it was doctor visits galore. For the past 5 months now it has been “Daddy time”, so, yeah.

A funny thing about this post and the last – they both have to do with changes. While there are the obvious ones (fatherhood), I mean career changes. You see, I have been on my contract this past year with Walt Disney Parks and Resorts Digital (WDPRD) and I have been kicking some ass (if I may say so myself). I have been working hard to gain FTE their, and it has always been a bit like a carrot on a stick – just out of reach. Well, now I am coming up on my final day tomorrow.

A couple weeks back the axe fell and all contractors were cut. We lost some really good guys in Argentina, and now those of us in Seattle are gone too. Like the last time this happened, I have some options, so I am not too worried, but the whole “Daddy” thing is my priority, and I have been lucky enough to WFH 4 days a week, so I need to look for something matching that. Goo luck to me…

As far as code goes, I don’t have a bunch new. The most recent stuff I did was just some JS sandbox stuff to play around. Here are some links:

JS “Hydra” – an interview test:
https://jsbin.com/wujaxob

Apple basket – add and eat apples from your “basket”:
https://jsbin.com/piruqa

Simple inheritance demo:
https://jsbin.com/vagoyu

Another simple inheritance demo:
https://jsbin.com/rubunu

Sandbox play-around:
https://jsbin.com/yejari

I have a couple of code tests from a recent interview that I will hopefully share soon. Or maybe next year. 🙂

scroblr

I used to listen to my Last.fm station a lot, but lately I have been stream my local radio station (107.7 The End, Seattle). I like the variety and even some of the DJ banter while I work. I work from home and it makes it seem a little less like I am sitting at home in my office by myself.

The one downside was no scrobbling. I had another Chrome plugin but it did not work with Abacast (the platform 107.7 uses to stream their broadcast). I looked into making the plugin work with Abacast, but to be honest the docs were kinda poor and the API was a little “scattered”. I looked at more open-source plugins and found scroblr. It isn’t anything fancy, but the API made it a snap to create a new plugin for Abacast. I forked the code, whipped up a plugin, tested and submitted a pull request in under an hour. Now I am happily scrobbling from the 107.7 stream.

Azure table to json with jQuery

I have been working with Azure quite a bit lately. We are looking to move all our hosted servers “into the cloud” – wherever that may be… Anyway, I have been working on a simple asset management system and I just started to implement the Azure Search API. I wanted to seed the index with existing data about the assets but I couldn’t see any easy way to export a list of the files in the container. Google to the rescue!

My search found a great post by Dave Ward on extracting data from an HTML table using jQuery. It is a pretty simple little snippet but it works quite well:

var data = $('#__fx-grid3 tbody tr').map(function() {
  // $(this) is used more than once; cache it for performance.
  var $row = $(this);

  return {
    name: $row.find('td:nth-child(1)').text(),
    url: $row.find('td:nth-child(2) .fxs-copybutton-value').text(),
    creationTime: $row.find('td:nth-child(3)').text(),
    size: $row.find('td:nth-child(4)').text(),
  };
}).get();

Use the snippet in the container details page and it will pull the name, url, etc. from the table. Now you’ve got the table data stored nicely in a local variable named data – but how to easily get at it? A little more googling found another simple little trick:

copy(data);

This will copy the data variable value to the clipboard. Now it is a simple paste into whatever text editor you favor. The above may be Chrome-specific, but if you are a web dev then you are likely using Chrome anyway – or at least have it at your disposal…

Wijmo

I just found out about Wijmo. Wijmo is a javascript widget library that utilizes jQuery, jQuery UI and knockoutjs. Using jQuery UI allows the widgets to be themed easily with any of Wijmo’s premium themes, the canned jQuery UI themes, or rolling your own with theme roller.

Wijmo costs if you want to use it in a commercial application, but they do have an open source option that allows for use in GPLv3 projects.