Archive

Archive for March, 2008

I Want MY Music: The History and Future of Music, Downloads and Mixtapes

March 26th, 2008

I want MY music. I want it fast, organized, high-quality and now. This is not too much to ask, and I, a consumer, have been begging for it for years.

Before BitTorrent, Napster or CDs, there was the mixtape. I would spend hours listening to the radio and when a song I liked came on, I recorded it. It was MY music. I choose to keep the notes, the voice, the rhythms with me for all time. I would mix and match songs according to my mood and the occasion. I would swap tapes with friends with similar tastes. And if they were lucky, they might have received one as a gift. Of course being a kid, I didn’t have a lot of money. But nothing says I care more than a well crafted mixtape (and no, I’m not ripping off Nick Hornby).

Then came the CD with its shiny new cover and it’s obvious similarity to the venerable vinyl record. But this was the 90’s. A new time, a new era, full of ones and zeros. Anything digital was all the rage. So I paid $20 a pop for a piece of plastic that did sound better than a tape, but was still inferior to a vinyl record. Granted, the CD came with a small booklet full of useful information: more pictures, sometimes lyrics, and even the name of the sound engineer from that song I never listened to. With a mixture of mass marketing and an era of economic prosperity, YOU, the labels, reaped record profits and I was left with piles of CDs containing just a few songs of enjoyable music.

In the end, I was left unfulfilled. I returned to the trusty mixtape to create the album I really wanted. Sure it was lesser quality and I couldn’t magically skip to the next song, but I at least had the songs I wanted in the order I wanted. It was my music my way. At the end of the 90’s, the party was over. The floodgates were open and a sea of unlimited free music was unleashed upon us. But this wasn’t a revolution. People didn’t storm the castle or burn down the walls. It’s the same evolutionary process that brought about the transistors, computers and the internet.

As the technology advanced with cheaper disk space and faster web connections, I wanted more. First there was Usenet, full of silly chatter and annoying trolls, but I could download free music. Then there was IRC with better file downloading but added viruses. Each successive iteration provided faster downloads and more content. The tide of progress couldn’t be stopped so technology finally reached a tipping point where the will, getting the music I want, found a way, Napster.

In truth, Napster changed everything for internet users. Before, advanced internet users had to download from large, clunky servers that might not have the data you wanted, or use a command-line interface to connect directly to files you wanted. What Napster did correctly was provide an adequate interface to content that was searchable and downloadable. What Napster neglected to do was filter out all the junk that people tossed in the system. Despite their drawbacks, what made Napster and other P2P networks even more worthwhile was recordable CDs. Now you had the best of both worlds: the crisp, clean digital sound of a CD along with the malleable, personal nature of a mixtape.

During this era of free music, a connection was broken. I was no longer a customer. I became a common theif and had to be dealt with immediately. You tried suing me and that did not work. You tried suing my little siblings and grandmother and you lost my respect. You did not ask me what I wanted or what it would take to change my ways. You could have created a new and better system with higher quality files and organized information. You could have created a faster system with special content like videos or live concerts. You could have done a lot of things, but you chose to ignore me. That was your decision, but now I have made mine: I WILL have my music.

There is Bittorrent which lets me download massive amount of music with a click of a button. There are decentralized P2P networks which let me find the exact song I want without being sued. There are social music sites where random strangers and I can share our individual tastes with each other and the world. There are programs out there that let me organize, tag and correct the gigabytes of music I have on my hard drive, and portable music players that can carry my entire library and fit in my pocket. I do this because I still love music and listen to it everyday. Now I download music and create playlists instead of buying CDs and burning mixed CDs. I do this because you drove me away and made me an outcast. Now a new era is upon us and you have to decide what your next step will be.

It’s starting out with a trickle: Radiohead, Trent Reznor and Barenaked Ladies. But that’s only the beginning of your troubles. When I finally build a system that let’s me listen to my music when, where and how I want it, I will need you less. When I can easily share and broadcast my music with friends or the world, you will see my influence. When I can discover the music I like or find music I never knew I would like, I will be empowered. And when I can finally pay the people directly who create, perform and produce the music I love, you will be nothing.

There are some who claim that they can do these things already. That they can provide a solution to my problems. I will be the judge of that. In the meantime, I refuse to wait for a solution because I am the solution. I choose to build the very system I pleaded for you to build. I have built Wikipedia, Flickr, Digg, Last.fm and Grooveshark. These are just the beginning and more is coming ahead. You can be part of this future if you really want. Just remember, I will have my music, but will YOU be part of the system?

life, music , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Smarty: A Great PHP Template Engine

March 24th, 2008

Working with any website, using the Model-view-controller (MVC) design pattern is a must. One way to achieve this is by using templates. Within PHP, there is a large divide on whether using a formal template system is necessary. Most proponents will claim that PHP itself is a template system (see Wordpress and its countless themes). Lately I have come to really like Smarty, a php template engine.

Over at Grooveshark, we’ve been making A LOT of changes. Basically, the brains of Grooveshark is improving with a different database design and backend code while the face of the site stays the same. This is where Smarty has made my life so much easier. All I do is make sure that the same variables are assigned with the same information and Smarty handles the rest.

Smarty has other handy features like caching to compensate for the extra overhead of processing the templates. For really dynamic sites, Smarty provides really fine control of the cache so nothing is ever stale. Smarty is really adaptable so that you can use it to produce your feeds (interchange XML for HTML and you are done). As of right now, I’m really liking Smarty.

internet, misc, programming , , , , , , , , , , ,

Ode to Firefox… for real this time

March 22nd, 2008

Firefox is the best browser out there. That’s one argument nobody will ever convince me otherwise. Sure Opera uses less memory, Safari renders pages faster and IE isn’t even in the conversation. In the end, Firefox provides the best experience for the less technically inclined to the most advanced users.

Being a web developer, Firefox has some of the best tools out there for testing forms, debugging Javascript and interactive HTML/CSS editing. If you are a web developer and haven’t heard of Firebug, then you really aren’t a web developer. Other great tools include the Web Developer’s Toolbox and FasterFox.

Recently, Jay mentioned Firefox 3 Beta 4’s release and I really wanted to try it out. I had to keep Firefox 2 for testing purposes so I did a google search and discovered this post showing how to run both versions without them clashing (they can’t run at the same time) on linux. Now I’m running a much improved Firefox with better memory management (not THAT much better), faster page rendering and the best developer plugins possible. Talk about having your cake and eating it too (that saying makes no sense).

internet, technology , , , , , , , , , , ,

March Madness On Demand and Akamai

March 20th, 2008

March Madness is the best tournament on earth. For 3 weeks during the end of March and beginning of April, 65 college football teams square off in an orgy of upsets and thrillers. This year, CBS expanded its online on demand live streaming. Working all day, the only time I have to watch games are at night. By streaming the videos, it gives me a chance to at least listen to the games while I work. This way everyone wins: I get to keep track of my favorite games and CBS gets to serve me more ads.

Being a geek, I really wanted to see how the March Madness on demand service will handle the bandwidth of serving the video. I found this InformationWeek article that points out that Akamai is used to stream their videos. This makes sense because Akamai has always been a huge player in the contend delivery market. From their site, Akamai claims it “handles 20% of the world’s total Web traffic.” Now those are big numbers. Even with Akamai’s large content delivery network, “CBSSports.com monitors and throttles its system based on usage and historical data patterns” so that it won’t overload their system. The fact that CBS has to restrict the amount of people using this service shows how far the US has to go if it wants to be completely digital.

For really cool visualization of global web traffic, check out this Akamai flash app.

sports, technology, video , , , , , , , , , , , , , ,

Music Information Retrieval

March 18th, 2008

Over the weekend, I really got into music information retrieval (MIR). Its basically grabbing meta-information of an audio file by analyzing its waveform. This type of information is really valuable, especially for a music company (ie: Grooveshark). If I ever have time, this would be a really fun side project. A really good source of information about this topic is this bibiography page (too bad it hasn’t been updated since August, 2007). A list of up and running MIR systems can be found here.

What makes MIR systems so important is that for music sites, they can generate a lot of useful data without anyone having to enter it by hand. For iTunes, this is not a problem because labels give them all the information they need, but for sites where song files can come from anywhere and anyone, there’s no way you can handle the variability in data quality and availability. By having a system that could automatically fetch the required info, within certain bounds of error, you create a vast collection of information that you can use to generate recommendations, provide more accurate searches, and create better categorization of all that music.

The problem with MIR systems is that they require large amounts of storage space and processing power. The cost of both storage and processing are dropping everyday which is great for the future of MIR systems. Processing power is the largest inhibiting factor, especially when you try to analyze millions of songs. The only companies that could probably do a project like this on a large scale would be Google, Amazon and their ilk. Currently, I’m very hopeful that a startup with the right mix of programmers, hardware, and music can compete with the big boys ;)

Grooveshark, music, programming , , , , , , , , ,

Javascript Tip: getElementsByID

March 17th, 2008

Browsers do a lousy job of providing an interface to the HTML document. The DOM is supposed to be that interface but it is horribly slow, and clunky. Traversing the DOM tree extensively is one of the sure-fire way to slow down your site. In an effort to help out Javascript coders, the DOM does have functions like getElementsByTagName, getElementsByClassName and getElementsByName, but they do not all work across all browsers. This why you should create a function called getElementsByID:

var groupCache = {};
function getElementsById(id){
  if(!groupCache[id]){
    groupCache[id] = [];
  }
  var nodes = groupCache[id];
  for(var x=0; x<nodes .length; x++){
    if(nodes[x].id != ""){
      nodes.splice(x, 1);
      x--;
    }
  }
  var tmpNode = document.getElementById(id);
  while(tmpNode){
    nodes.push(tmpNode);
    tmpNode.id = "";
    tmpNode = document.getElementById(id);
  }
  return nodes;
}

Now whenever you want a collection of DOM objects, just give all of them the same id and call this function to grab an array of the objects you want. This is not the most ideal way and its actually a pretty big hack. But sometimes, speed is more important than form.

programming , , , , , , , , , , ,

Customer Service

March 16th, 2008

The key to web2.0 is customer service. Look at all of the major websites created after the bubble and the one thing they have in common is their community. Flickr is the best example: They actually started out as an online game but evolved into an image service from constant communication with their user base.

As a developer, it’s especially important that we constantly use the site and interact with our users. Not only do we get a feel for what the users are dealing with, it also gives us a firsthand account on what the users are thinking. I recently had an eye opening encounter with a user that really gave me a new perspective on Grooveshark.

The user just downloaded Sharkbyte, the Grooveshark helper application, and when he went on the site, he didn’t immediately see all of his songs. Of course the user would think something is broken. What they don’t realize is that we are constantly getting new files added to the system so it takes some time processing all of that data. After sending a couple of messages back and forth between the user and me, the user became frustrated and actually said, “Now Im lost maybe I should just go back to youtube…”

Now that is a scary moment when someone would rather listen to music on a low quality video site instead of a site specifically made for music. After explaining the situation and giving him a $5 dollar gift code (tactic I got from Jay). Now that user has been listening, rating and buying songs. It’s a really big turnaround from going back to Youtube to listen to music, to using Grooveshark and all of its features.

Grooveshark, music , , , , , ,

OpenLaszlo

March 15th, 2008

I just discovered this really cool application called OpenLaszlo. They are an “open-source platform for the development and delivery of rich Internet applications on the World Wide Web.” One of their claims is “write once, run anywhere” (I think we’ve heard this before – Java).

To me, their syntax and coding style is very similar to Flex. What’s most impressive is that when you “compile” your page/site, you have the option of compiling to flash or DHTML. Working with HTML/CSS all day, they must have a pretty impressive algorithm to ensure browser compatibility, especially on the CSS side.

OpenLaszlo has a lot of promise and is really neat technology. If they really take off and become popular, they will effectively put me out of a job. In the end, they automated the entire process of building a Web2.0 AJAX-powered website and provides another way to produce flash applications in a way that makes sense to traditional web developers.

internet, programming , , , , , , , , ,

Music is Life

March 13th, 2008

For most people, music is just something they listen to. Sure they enjoy it, and some even develop an attachment to certain songs and artists. In my case, music and life are eternally intertwined. Music is not a series of notes, rhythms and melodies. When I listen to a song, I hear memories and emotions conjured from the depths of the artist’s imagination.

Music has always been a big part of my life. My mom made me take piano lessons when I was a kid. She was tired of me doing nothing after-school except break windows and cause trouble. In the long run, she probably saved money. Learning how to play an instrument really helped me appreciate all types of music. I was lucky to have a teacher who didn’t just focus on the technical aspects of music but taught me the history of most musical genres and how to appreciate what the artist is trying to do. Most of all, she taught me how to listen.

Listening to music occurs on a multitude of levels. There is the immediate sounds you hear, which is how most people listen to music. Then there is concentrating on each instrument and they notes they play. If you know how to read music, this is really easy, especially if you have absolute pitch. Next is following the tempo, melodies and transitions of a song. This is how an artist tells a story (songs with lyrics are another story).

The iPod absolutely changed the way I listen to music. One of my favorite things between classes is listening to my library on shuffle and noticing how the music I’m listening to follow what’s going on in the outside world. Of course this is all by chance, but its those magical moments when Radiohead’s “Creep” starts playing as you walk out of the Engineering building, followed by, “Milkshake” by Kelis just as you are passing the food court and ice cream shop and it ends with “Momma, I’m Coming Home” by Black Sabbath as I dump my backpack on the floor of my dorm room (Disclaimer: I did skip some songs along the way). At this point, music is not just some accessory you enjoy, it is a colorful fabric in the tapestry of life.

Grooveshark, music , ,

Extendable And Adaptable Code That Will Stand The Test Of Time

March 6th, 2008

All coders have heard the saying that the best code is highly cohesive and loosely coupled. It’s something so fundamental that all of us sometimes loose sight of this. Everybody has had a moment when you are refactoring old code and you just want to pull out a gun and ask your self, “Why?!? Why did you write it like that.” Along with laziness, its simply impossible to make external problems like time constraints, lack of personnel or dealing with users go away. But even in a perfect world, most of the code that you produce will be rewritten.

“If all code will be rewritten, then why write code at all?” you might ask. One answer is that you might get fired, but a more appropriate response is that for any program that you produce, it is also a lesson for producing the next iteration (if there is not another iteration, then you seriously did something wrong). What sucks about this view is that everything you do is merely practice for your next version or project. Of course this isn’t always valid when the code cannot be updated: embedded applications or software installed in an unreachable device (NASA – silly metric system). These cases are very rare and for most people, making changes is a server update or a patch away.

The reason I started thinking about writing long-term code is that working at Grooveshark, the underlying server code is being overhauled. But after the last couple of days, I started noticing that almost every other development group is also rewriting/refactoring a major portion of their code. Whether its Javascript, Java, PHP or SQL (maybe HTML/CSS?), the underlying principles are pretty much the same.

This problem has been discussed and worked on by acedemics and hackers much smarter than me so I really don’t have anything to add at the moment. Just go out there, make some mistakes and do better next time.

misc