{"id":3826,"date":"2016-04-03T20:34:55","date_gmt":"2016-04-04T01:34:55","guid":{"rendered":"https:\/\/zingman.com\/blog\/?p=3456"},"modified":"2016-04-03T20:34:55","modified_gmt":"2016-04-04T01:34:55","slug":"global-jukebox-update-2-2","status":"publish","type":"post","link":"https:\/\/www.zingman.com\/blog\/2016\/04\/03\/global-jukebox-update-2-2\/","title":{"rendered":"Global Jukebox Update"},"content":{"rendered":"<p>I\u2019ve been doing tons of work on the Global Jukebox recently, adding new features like Journeys and Learnings, and continuing fix up and modularize the codebase, trying to get things tight for a deadline to give a demo.  We had an unexpected monkey wrench last week when the Smithsonian Institution reneged on an agreement they had to let us use a bunch of Alan Lomax\u2019s own recordings to which they hold the copyright.  They wanted to charge the project hundreds of dollars per song, for around 1000 songs.  Doesn\u2019t really seem in keeping with the public spirit of an institution supported by our tax dollars.<\/p>\n<p>As a workaround someone suggested we embed a spotify player, since the songs in question are available for free on spotify.  I did some research and it turns out Spotify has an API that allows you to do such a thing, so I made a little proof of concept where their player appears in our app.  One downside is the user needs a spotify account the hear the music.  If they don\u2019t they\u2019ll be prompted to create and account, which is free, so that\u2019s not too bad.  The other downside is that spotify is not aware of our song coding system, so for every song one of the graduate assistants needs to find the song in spotify, get the embed code and enter into our database to associate it with the correct song.  Then I need to write some code check if that embed code is there when I load song data and bring up the spotify player with the correct code.  I sure hope spotify  doesn\u2019t change their API once we get this up and running.<\/p>\n<p>I got the news from Anna that the demo was today and it went very well.  Hopefully this will lead to more visibility and funding for the project.  Meanwhile I\u2019m at a point where there are alot of loose ends to finish off ASAP and a bunch of new stuff on the horizon.<\/p>\n<p>As I\u2019ve been refactoring the old code and trying to keep things from breaking as I go, I\u2019ve been giving alot of thought to Javascript as a language and the web application as an environment.  I started programming in Javascript in the 90\u2019s when it was still in its infancy, and working in JS was a mess to generally be avoided.  Well Javascript has grown up alot, and while it still has some pretty deep flaws, I\u2019ve come to feel it\u2019s time to come to get to know it on it\u2019s own terms and stop thinking of it as a broken version of Java.  For example, maybe it\u2019s not bad that there aren\u2019t any classes or strong typing, and maybe it\u2019s good that everything is just an object.<\/p>\n<p>I bought a whole bunch of books recently and have read the first few.  It turns out I already reinvented a few best-practice JS design patterns on my own, including self-executing functions with closures to model class-like objects with private and public methods.  One author compares JS to the so called \u201cclassical\u201d languages, and speaks of classically-trained programmers. I had this aha moment in jazz, playing a Gm7 chord without a G voiced anywhere, and realizing that\u2019s something a classically-trained musician wouldn\u2019t do.  Unfortunately no one in the group is into programming languages, so I couldn\u2019t really share my epiphany.<\/p>\n<p>In any event it\u2019s time to unlearn.  I\u2019m trying to reevaluate JS from a functional programming perspective.  I\u2019ve had some exposure to Lisp and Smalltalk and more recently Scala (which ironically compiles to the JVM), so I\u2019m trying to step back and see things from a broader, more fundamental perspective.  Which of course is not that easy when you\u2019re trying fix up someone else\u2019s mess so you can build new features on top of it to meet a deadline, but that\u2019s the life of a software engineer.  Hopefully I\u2019ll have thought things thru enough to have something to share in a near-future post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve been doing tons of work on the Global Jukebox recently, adding new features like Journeys and Learnings, and continuing fix up and modularize the codebase, trying to get things tight for a deadline to give a demo. We had an unexpected monkey wrench last week when the Smithsonian Institution reneged on an agreement they &hellip; <a href=\"https:\/\/www.zingman.com\/blog\/2016\/04\/03\/global-jukebox-update-2-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Global Jukebox Update&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-3826","post","type-post","status-publish","format-standard","hentry","category-software"],"_links":{"self":[{"href":"https:\/\/www.zingman.com\/blog\/wp-json\/wp\/v2\/posts\/3826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zingman.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zingman.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zingman.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zingman.com\/blog\/wp-json\/wp\/v2\/comments?post=3826"}],"version-history":[{"count":0,"href":"https:\/\/www.zingman.com\/blog\/wp-json\/wp\/v2\/posts\/3826\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zingman.com\/blog\/wp-json\/wp\/v2\/media?parent=3826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zingman.com\/blog\/wp-json\/wp\/v2\/categories?post=3826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zingman.com\/blog\/wp-json\/wp\/v2\/tags?post=3826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}