27 Jul 2012
25 Jul 2012
Problem: Write a program that compares two sequences of differing lengths for similarity. Solution: (In Python) import math def dynamicTimeWarp(seqA, seqB, d = lambda x,y: abs(x-y)): # create the cost matrix numRows, numCols = len(seqA), len(seqB) cost = [[0 for _ in range(numCols)] for _ in range(numRows)] # initialize the first row and column cost[0][0] = d(seqA[0], seqB[0]) for i…
24 Jul 2012
SoundCloud is a polyglot company, and while we’ve always operated with Ruby on Rails at the top of our stack, we’ve got quite a wide variety…
18 Jul 2012
It’s often said that the Age of Information began on August 17, 1964 with the publication of Cooley and Tukey’s paper, “An Algorithm for the Machine Calculation of Complex Fourier Series.” They published a landmark algorithm which has since been called the Fast Fourier Transform algorithm, and has spawned countless variations. Specifically, it improved the best known computational bound on…
12 Jul 2012
A few weeks ago, I attended News Hack Day in San Francisco. News Hack Days are events that bring together journalists, developers and designers for multi day creative coding and brainstorming sessions. I really like the idea of hack days that bring together people from different backgrounds. After chatting with a few journalists, it became obvious to me that recording…
9 Jul 2012
Imagine, for a moment, that you came upon a bread factory for the first time. At first it just looks like a jumble of incomprehensible machinery with… Read more "Software Inventory"
8 Jul 2012
WebSockets is a relatively new API supported by some of the latest browsers that attempt to offer a one-size-fits-all solution for ...
6 Jul 2012
There are many approaches to building libraries that wrap HTTP APIs. For many of our officially supported SDKs we chose to build light wrappers around HTTP client libraries with a few added features to make it easier to work with the SoundCloud API. This approach has a few benefits. It guarantees a certain consistency and is relatively easy to maintain.…
3 Jul 2012
Last month (June 2012), my 30 day challenge was to try to eat mindfully (eat more slowly, don’t eat while distracted by TV or web browsing, chew more, stop eating when I’m full, etc.). It turns out that eating mindfully is hard. I’m the sort of person that eats whatever is on my plate, so […]
2 Jul 2012
Available immediately, all PubNub client libraries will allow the encryption of your PubNub messages using AES symmetric key encryption.
1 Jul 2012
29 Jun 2012
Every month, WebKit, Firefox and Opera are shipping incredible features; IE10 is also going to settle up and even out those HTML5 Test scores (plus some features they may debut, like Grid Layout!). But while these features are becoming available in some browsers, most of us can’t use them because we have a sizable audience who have been left behind…
SoundCloud loves hack days. Our latest hack day adventure brought us to Music Hack Day in Barcelona and we thought we’d share a bit of the great experience we had there. Photo by Thomas Bonte
28 Jun 2012
Problem: Reduce the dimension of a data set, translating each data point into a representation that captures the “most important” features. Solution: in Python import numpy def principalComponents(matrix): # Columns of matrix correspond to data points, rows to dimensions. deviationMatrix = (matrix.T - numpy.mean(matrix, axis=1)).T covarianceMatrix = numpy.cov(deviationMatrix) eigenvalues, principalComponents = numpy.linalg.eig(covarianceMatrix) # sort the principal components in decreasing order
27 Jun 2012
First of all, if you haven’t done it yet, read Getting started with GWT-Bootstrap.
26 Jun 2012
GWT-Bootstrap is a project that aims to provide all the Twitter Bootstrap styles and widgets to GWT applications.
Waveforms I’ve worked at SoundCloud for over two years now, and if there’s one thing I do a lot, it’s color waveforms. Tons of them. And, I’ve done it several different ways. Today, Johannes and I are pumped to announce a new JavaScript library called Waveform.js that will assist you in your coloring efforts. But first, let’s take some time…
25 Jun 2012
Hi everybody!
24 Jun 2012
Hello everyone :)
23 Jun 2012
So here we are. We have finally made it to a place where we can transition with confidence from the classical continuous Fourier transform to the discrete version, which is the foundation for applications of Fourier analysis to programming. Indeed, we are quite close to unfurling the might of the Fast Fourier Transform algorithm, which efficiently computes the discrete Fourier…
19 Jun 2012
I gave two talks recently, first at O’Reilly Media’s go-big-with-JavaScript FluentConf, and then at my favorite regional JS conference, the delightful TXJS (gorgeous site design), curated and stage-managed by Alex Sexton, Rebecca Murphey, and other usual suspects. My Fluent video was up in record time, one achievement that the O’Reilly folks can brag about: There … Continue reading "Recent talks:…
18 Jun 2012
Premiere 1.5 Smashing Pumpkins are using a BETA of the next version of Premiere to debut their new record “Oceania.” Here’s what’s new about the app.
17 Jun 2012
For seven years I coded in C++ using Emacs. Four years ago, when I changed jobs, I switched to Java development using IntelliJ IDEA. Without a doubt, I am much more productive writing code in IntelliJ IDEA compared to using … Continue reading →
16 Jun 2012
If you’re a frequent flyer (like i’ve oddly enough become recently) you probably have status with your airline that gives you lounge access for when you’re flying. Also, if you’re a frequent flyer, you probably also really enjoy drinking and paying as little as possible for it. So here’s a way that you (and sometimes also your entire family) can…
15 Jun 2012
14 Jun 2012
Problem: Compute a reasonable approximation to a “streaming median” of a potentially infinite sequence of integers. Solution: (in Python) def streamingMedian(seq): seq = iter(seq) m = 0 for nextElt in seq: if m > nextElt: m -= 1 elif m < nextElt: m += 1 yield m Discussion: Before we discuss the details of the Python implementation above, we should…
This article is also available in: Serbo-Croatian: Pravljenje novog SoundCloud Armenian: SoundCloud (ձայնամպ) ծրագրավորողների համար The…
13 Jun 2012
While it’s true that there are still a lot of places where software isn’t leveraged and many places where software needs to evolve, software is nearly everywhere!. The type of software we write today needs to interact with other software via some sort of network. Any web developer out there is used to that, (s)he writes software that runs on…
12 Jun 2012
After a year of writing this blog, what have I learned about the nature of the relationship between computer programs and mathematics? Here are a few notes that sum up my thoughts, roughly in order of how strongly I agree with them. I’d love to hear your thoughts in the comments. Programming is absolutely great for exploring questions and automating…
8 Jun 2012
Hello people! I am now finishing my Post-graduate course in Web Development at PUCMG and I had the RubyOnRails discipline to do. The final work was develop a simple Social Network app using RubyOnRails. I love that framework and think the Ruby language is amazing. So, the final result is shared in GitHub at https://github.com/juniorgrossi/social_network_dsw7 … Continue reading MySocial –…
Sencha Touch 2 is a new framework for building super slick mobile applications. I decided to put on my mobile dev hat on and experience it for myself. And o
6 Jun 2012
Last time we investigated the naive (which I’ll henceforth call “classical”) notion of the Fourier transform and its inverse. While the development wasn’t quite rigorous, we nevertheless discovered elegant formulas and interesting properties that proved useful in at least solving differential equations. Of course, we wouldn’t be following this trail of mathematics if it didn’t result in some worthwhile applications…
2 Jun 2012
I love coding. Ever since I bought my first computer (a VIC-20), I’ve been fascinated by computer programming. For many years I never thought of why I enjoyed it so much – I just knew I did. But that changed when … Continue reading →
We are pleased to announce that the following functionality has been developed for version 5.2: Helpfulness and inappropriate content feedback submission enabled ContentLocale no longer filtered implicitly by default Product and category attributes populated as a map Hosted video submission and display updated Inline ratings data exposed for product-based review statistics More detailed information on […]
1 Jun 2012
Jacob Thornton has an inspiring slide deck on accessibility that brings to fore some of the concerns that web developers have with implementing features around accessibility. For a very long time, developers have been told about making websites ‘accessible’. Like it is a faucet that should be turned on or off. Till Victor Tsaran’s demonstration of using a screenreader (which…
31 May 2012
Demystifying Unicode and UTF-8: A byte-sized guide to character encoding.
27 May 2012
In our last primer we saw the Fourier series, which flushed out the notion that a periodic function can be represented as an infinite series of sines and cosines. While this is fine and dandy, and quite a powerful tool, it does not suffice for the real world. In the real world, very little is truly periodic, especially since human…
26 May 2012
Unveiling Go: Where Practicality Meets Innovation
19 May 2012
Problem: Derive the double angle identities $$\sin(2\theta) = 2\sin(\theta)\cos(\theta)\\\ \cos(2\theta) = \cos^2(\theta) – \sin^2(\theta)$$ Solution: Recall from linear algebra how one rotates a point in the plane. The matrix of rotation (derived by seeing where $ (1,0)$ and $ (0,1)$ go under a rotation by $ \theta$, and writing those coordinates in the columns) is $$A = \begin{pmatrix} \cos(\theta) &…
8 May 2012
I recently finnished the Coursera course Design and Analysis of Algorithms I, given by Professor Tim Roughgarden of Stanford. This was my second on-line course from Coursera (last fall I took Introduction to Databases, which I wrote about here), and … Continue reading →
7 May 2012
A few weeks ago, two of my colleagues and I had a birthday in the same week. What are the odds of that? There’s about 25 people in the department in which I work. We consider every outcome where pairs of people share birthdays but no 3 or more people share birthdays. Then we can … Continue reading A Triple…
5 May 2012
Problem: Prove that $ 2 = 4$. Solution: Consider the value of the following infinitely iterated exponent: $$\displaystyle \sqrt{2}^{\sqrt{2}^{\sqrt{2}^{\cdot^{\cdot^{\cdot}}}}}$$ Let $ a_n = \sqrt{2} \uparrow \uparrow n$, that is, the above power tower where we stop at the $ n$-th term. Then $ a_n$ is clearly an increasing sequence, and moreover $ a_n \leq 4$ by a trivial induction argument:…
4 May 2012
We recently delivered this presentation titled “How to Scale Big on MySQL? Break a Few Rules!” as part of Database Week here in New York City. The presentation is a lighthearted, and informative take on how Bazaarvoice Engineering has been able to take MySQL to billions of requests per month. The slides and video are […]
Yesterday, RubyMotion was released and let’s be honest, it is one the best alternatives to Objective-C out there (if not the best). RubyMotion is a commercial, proprietary fork of MacRuby that targets iOS. This is not a small achievement, MacRuby relies on Objective C’s Garbage Collector (libauto) which is not available on iOS. Static compilation and new memory management solution…
1 May 2012
One of the things I recognize at Google is how productive developers surround themselves with powerful tools for iterative development and debugging. For us front-end developers, the ecosystem of tools has exploded in the past two years, as we have a lot more software and libraries beyond Firebug and jQuery to help us build webapps. In the talk below I…
27 Apr 2012
Beyond clear-cut blackhat webspam, the second-biggest category of spam that Google deals with is hacked sites. The most common reaction we hear from webmasters is “The problem is with the Google search. There is nothing wrong with our website.” That’s a real quote from an email one site owner recently sent us. Sadly, it turns […]
26 Apr 2012
In the music world, the hippest of hip music is usually first discovered and promoted by bloggers.
25 Apr 2012
Overview In this primer we’ll get a first taste of the mathematics that goes into the analysis of sound and images. In the next few primers, we’ll be building the foundation for a number of projects in this domain: extracting features of music for classification, constructing so-called hybrid images, and other image manipulations for machine vision problems (for instance, for…
mruby is the latest Ruby implementation in an already quite long list: MRI REE JRuby Rubinius MacRuby Maglev IronRuby And many other less known implementations. This time, the main man behind the project is the Ruby creator himself: Yukihiro ‘Matz’ Matsumoto. I already covered the announcement, you can read more about it there. Why mruby? Following my previous article on…
23 Apr 2012
22 Apr 2012
We can solve our differential equation using the Implicit Euler method which is unconditionally stable. We can also take this opportunity to use the Vector Package rather than Arrays as it has a richer set of combinators and to tidy up the code to make the payoff explicit (thanks to suggestions by Ben Moseley). First … Continue reading The Implicit…
PubNub is applying a TimeToken enhancement to our web-messaging infrastructure.
21 Apr 2012
The Complexity of Things Previously on this blog (quite a while ago), we’ve investigated some simple ideas of using randomness in artistic design (psychedelic art, and earlier randomized css designs). Here we intend to give a more thorough and rigorous introduction to the study of the complexity of strings. This naturally falls into the realm of computability theory and complexity…
20 Apr 2012
Today, two big Ruby news came directly from Japan: The Open Source release of Matz' mruby on GitHub. The announce of MobiRuby, an upcoming solution to develop iOS and Android applications using Ruby. Probably due to my involvement with the MacRuby project, people have been asking me what I thought of these news. mruby mruby is far from being a…
19 Apr 2012
Over time, even technologies that are tried and true begin to show their age. This is especially true for data stores as the shear amount of data explodes and site traffic increases. Because of this, we are continually working with new technologies to determine whether they have a place in our primary stack. To that […]
17 Apr 2012
The folks over at UserVoice are using Trello quite extensively throughout their development process. Founder Richard White describes it all in detail.
On Saturday, I joined over a hundred other hackers at HackTO. This has become a regular event in the Toronto tech scene, thanks to excellent organizing by Leila Boujnane and Corey Reid. SoundCloud joined several other API providers, including Atomic Reach, Context.IO, FreshBooks, Shopify, TinEye, Twilio, Trendspottr, WordPress and YellowAPI. The idea behind the event is simple: find a team…
15 Apr 2012
Most of the comments in this semicolons in JS exchange make me sad. The code in question: clearMenus() !isActive && $parent.toggleClass('open') relies on Automatic Semicolon Insertion (ASI) and so cannot be minified except by parsing fully (including ASI), observing the significance of the newline after clearMenus(), and inserting a semicolon when stripping that newline. Some … Continue reading "The infernal…
12 Apr 2012
Bazaarvoice is a third-party application provider. We have a growing number of applications running on our own domain, but our core business is providing user-generated content applications and widgets that are hosted by us, but run on our clients’ webpages. Scaling an application platform of our size certainly has its challenges at the data layer. […]
11 Apr 2012
In the last weeks we got pretty excited about the idea of using timed comments to create and script rich media experiences. Imagine being able to trigger all kinds of visualizations & interactions for a timed comment while playing a track. Timed Comments with Media
10 Apr 2012
Last week we announced a new integration with Ableton Live 8, that lets you easily share your sounds from within Ableton Live to SoundCloud. Today we’re making the technology behind that integration available to everyone through our new Desktop Sharing Kits. Mac Desktop Sharing Kit
9 Apr 2012
Main Theorem: There exist optimal stackings for standard two-player Texas Hold ‘Em. A Puzzle is Solved (and then some!) It’s been quite a while since we first formulated the idea of an optimal stacking. In the mean time, we’ve gotten distracted with graduate school, preliminary exams, and the host of other interesting projects that have been going on here at…
"Wise words from a programming legend: Embrace agile, keep learning, and code on!"
7 Apr 2012
6 Apr 2012
[I hope that it’s obvious from what follows that this is a statement of personal opinion, not an official Mozilla document.] Summary Mitchell Baker recently wrote: If we start to try to make “Mozilla” mean “those people who share not only the Mozilla mission but also my general political / social / religious / environmental … Continue reading "Community and…
5 Apr 2012
We recently released our new Bazaarvoice Platform API. This is a new RESTful API that allows access to much more data and provides responses in XML and JSON. We are really excited to see the types of applications our clients will be building on the API. For a quick introduction to the API, we created […]
One of the SoundCloud API’s most powerful features is the timed comment. At its core it seems simple enough: a piece of text associated with a point in time for a particular track. But where you see timed opinions, I see a light-weight game scripting engine. So when Johannes Wagener told me he was adding an event to our JS…
4 Apr 2012
Most modern web applications start as a monolithic code base and, as complexity increases, the once small app gets split apart into many “modules”. In other cases, engineers opt for a SOA design approach from the beginning. One way or another, we start running multiple separate applications that need to interact seamlessly. My goal will be to describe some of…
SoundCloud is teaming up with Acapela Group for our first Developer Contest. Acapela Group offers amazing text to speech solutions and have a variety of SDKs so you can write apps that create sound files using one of their voices (including hip-hop and country!). Take a listen to some sample voices. We’re calling on our developer community to mashup SoundCloud…
1 Apr 2012
Suppose we want to find the price of a European call option. Then we need to solve the Black-Scholes equation: Although this particular equation can be solved explicitly, under more realistic assumptions we have to rely on numerical methods. We can approximate the partial differential equation by a difference equation (the minus sign on the … Continue reading Solving a…
30 Mar 2012
28 Mar 2012
27 Mar 2012
Clients like the Home Depot are using ideas from our Inspiration Gallery to find innovative ways to show off their user-generated content (UGC) and demonstrate the importance of listening to their customers. The following image is taken from a Home Depot Store Managers meeting which had all store managers as well as suppliers in attendance. […]
My friend Noam Wasserman at Harvard Business School has spent years researching startups. His work is great, because he actually does real, quantitative research on the kinds… Read more "The Founder’s Dilemmas"
23 Mar 2012
This is an archive of the Jonathan Shapiro's "Retrospective Thoughts on BitC" that seems to have disappeared from the internet; at the time, BitC was aimed at the same niche as Rust Jonathan S. Shapiro shap at eros-os.org Fri Mar 23 15:06:41 PDT 2012 By now it will be obvious to everyone that I have stopped work on BitC. An…
22 Mar 2012
Hello! Here I am again. Today I will talk about a LESS CSS App for Linux OS. I use both Mac and Linux machines. Using Mac we have the excellent app http://incident57.com/less/. For Linux, we have a executable file (SH commands) that wait for file update and run the lessc command to compile the less … Continue reading LESS CSS…
Problem: Prove that generalized versions of Mario Brothers, Metroid, Donkey Kong, Pokemon, and Legend of Zelda are NP-hard. Solution: http://arxiv.org/abs/1203.1895v1 Discussion: Three researchers (including Erik Demaine, a computer science professor at MIT famous for his work with the mathematics of origami) recently finished a paper giving the complexity of a number of classic Nintendo games (the ones I loved to…
Problem: Remember results of a function call which requires a lot of computation. Solution: (in Python) def memoize(f): cache = {} def memoizedFunction(*args): if args not in cache: cache[args] = f(*args) return cache[args] memoizedFunction.cache = cache return memoizedFunction @memoize def f(): ... Discussion: You might not use monoids or eigenvectors on a daily basis, but you use caching far more…
Update: It looks like there was a conflict with the name Amber with another JavaScript project, so the SproutCore folks have graciously decided to change their name to Ember.js so as not to be in conflict. Check out the details at Yehuda’s blog. The following is the original blog post: Yehuda Katz has just officially […]
Daniel Marcotte is one of the top developers on our latest product offering, Customer Intelligence (CI). He spent quite a bit of time evaluating SproutCore 2.0 for the complex user interface requirements of CI, helping to work out some of the kinks in the product as it moved toward beta. Daniel has recently moved to […]
Today we’re officially announcing our JavaScript API for the new HTML5 SoundCloud Widget. To use it, just insert the script tag on a page…
21 Mar 2012
19 Mar 2012
[Also posted at hacks.mozilla.org.] I wrote The Open Web and Its Adversaries just over five years ago, based on the first SXSW Browser Wars panel (we just had our fifth, it was great — thanks to all who came). Some history The little slideshow I presented is in part quaint. WPF/E and Adobe Apollo, remember … Continue reading "Video, Mobile,…
Over 3 months ago we started the “Hacker Time” initiative (see here) and now it is time for a recap what’s happened so far. From the outset…
18 Mar 2012
Problem: Write a program that shuffles a list. Do so without using more than a constant amount of extra space and linear time in the size of the list. Solution: (in Python) import random random.seed() def shuffle(myList): n = len(myList) for i in xrange(0, n): j = random.randint(i, n-1) # randint is inclusive myList[i], myList[j] = myList[j], myList[i] Discussion: Using…
17 Mar 2012
Protter(Protter 2004) notes that if some assumptions are made on how fast the mesh (see below for a definition) converges then the calculation of the almost sure value of the quadratic variation of Brownian Motion can be done using Chebyshev’s Inequality and the Borel-Cantelli Lemma. Williams and Rogers(Rogers and Williams 2000) also set this as … Continue reading The Quadratic…
15 Mar 2012
"Boost your Django test coverage with ease: A practical guide"
I haven’t given an update on my 30 day challenges in, like, forever. So here goes: – In 2011, I paused my 30 day challenges to do a “six month challenge”: training to run a marathon. I ended up running the San Francisco marathon (while tweeting!) and a couple half-marathons. Pro tip: ramp up slowly […]