~/devreads

27 Jul 2012

25 Jul 2012

1 min read

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

3 min read

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

1 min read

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

2 min read

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

Joel Spolsky 7 min read

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"

newsprogram manager

8 Jul 2012

6 Jul 2012

1 min read

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

Matt Cutts 1 min read

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 […]

30 days

2 Jul 2012

1 Jul 2012

29 Jun 2012

3 min read

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…

2 min read

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

1 min read

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

26 Jun 2012

4 min read

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

24 Jun 2012

23 Jun 2012

1 min read

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

Brendan Eich 4 min read

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:…

mozillauncategorized

18 Jun 2012

17 Jun 2012

16 Jun 2012

1 min read

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

1 min read

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…

12 min read

This article is also available in: Serbo-Croatian: Pravljenje novog SoundCloud Armenian: SoundCloud (ձայնամպ) ծրագրավորողների համար The…

13 Jun 2012

1 min read

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

1 min read

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

Junior Grossi 1 min read

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 –…

railsrorrubyruby on rails

6 Jun 2012

1 min read

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

Henrik Warne 2 min read

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 →

programmingcodingcreativitylove

Craig Gilchrist 2 min read

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 […]

conversations apirelease notes

1 Jun 2012

4 min read

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

27 May 2012

1 min read

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

19 May 2012

1 min read

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

7 May 2012

Dominic Steinitz 3 min read

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…

probability

5 May 2012

1 min read

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

RC Johnson 1 min read

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 […]

talksmysql

1 min read

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

1 min read

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

Matt Cutts 2 min read

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 […]

google seo

26 Apr 2012

25 Apr 2012

1 min read

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…

1 min read

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

Dominic Steinitz 4 min read

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…

category theoryhaskellpartial differential equations

21 Apr 2012

1 min read

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

1 min read

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

Michael Norman 5 min read

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 […]

uncategorized

17 Apr 2012

Joel Spolsky 1 min read

The folks over at UserVoice are using Trello quite extensively throughout their development process. Founder Richard White describes it all in detail.

news

2 min read

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

Brendan Eich 4 min read

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…

mozillauncategorized

12 Apr 2012

Alex Sexton 13 min read

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. […]

uncategorized

11 Apr 2012

1 min read

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

1 min read

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

1 min read

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…

7 Apr 2012

6 Apr 2012

Brendan Eich 3 min read

[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…

opinionuncategorized

5 Apr 2012

Dustin Mihalik 1 min read

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 […]

conversations api

2 min read

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

1 min read

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…

1 min read

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

Dominic Steinitz 3 min read

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…

category theoryhaskellprobability

30 Mar 2012

28 Mar 2012

27 Mar 2012

Craig Gilchrist 1 min read

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. […]

conversations api

Joel Spolsky 1 min read

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"

news

23 Mar 2012

26 min read

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

Junior Grossi 1 min read

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…

general

1 min read

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…

1 min read

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…

Michael Norman 14 min read

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 […]

uncategorized

2 min read

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

Brendan Eich 8 min read

[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,…

mozillauncategorized

2 min read

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

1 min read

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

Dominic Steinitz 2 min read

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…

probability

15 Mar 2012

Matt Cutts 4 min read

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 […]

30 days