~/devreads

25 Oct 2011

1 min read

Not long ago we released a sharing kit for Android. Today, we’re equally excited to announce a similar sharing kit for iOS. With the sharing kit, you can add SoundCloud sharing to your iPhone and iPad apps with only a few lines of code. We provide everything you need to let your users share their sounds to SoundCloud, including authentication,…

18 Oct 2011

1 min read

After my recent RubyConf talk and follow up post addressing the Ruby & Python’s Global Interpreter Lock (aka GVL/Global VM Lock). a lot of people asked me to explain what I meant by “data safety”. While my point isn’t to defend one approach or the other, I spent a lot of time explaining why C Ruby and C Python use…

14 Oct 2011

12 Oct 2011

0xADADA 1 min read

From comic book stores to Facebook to message boards, it seems that the “Keep Calm and Carry On” poster is living a new life as pop-culture cool while people remix its’ message with both quirky or banal messages. This attempt tries to speak most directly to its underlying message of consumerism, amidst the current climate of the Occupy Movement.

notesgraphic-designoccupy-wallstreet

11 Oct 2011

1 min read

I decided to save myself a session to the shrink and instead just write down my reflection on management. Who knows, some of you might help me and/or challenge my thought process. I recently read a great management book called the five dysfunctions of a team by Patrick Lencioni . Instead of telling you what to do, the author highlights…

8 Oct 2011

1 min read

Preamble: This proof is not particularly elegant or insightful. However, it belongs in this gallery for two reasons. First, it is an example of the goal of most mathematics: to classify things. In the same way that all natural numbers can be built up from primes, every group can be built up from simple groups. So if we want to…

3 Oct 2011

1 min read

During RubyConf 2011, concurrency was a really hot topic. This is not a new issue, and the JRuby team has been talking about true concurrency for quite a while . The Global Interpreter Lock has also been in a subject alot of discussions in the Python community and it’s not surprising that the Ruby community experiences the same debates since…

2 Oct 2011

1 min read

or, How I Learned to Love Functional Programming We recognize that not every reader has an appreciation for functional programming. Yet here on this blog, we’ve done most of our work in languages teeming with functional paradigms. It’s time for us to take a stand and shout from the digital mountaintops, “I love functional programming!” In fact, functional programming was…

1 min read

Problem: Determine an arithmetic expression for $ \binom{n}{2}$. Solution: The following picture describes a bijection between the set of yellow dots and the set of pairs of purple dots: In particular, selecting any yellow dots and travelling downward along diagonals gives a unique pair of blue dots. Conversely, picking any pair of blue dots gives a unique yellow dot which…

1 Oct 2011

Schakko 1 min read

Am Wochende ist mal wieder Netzwerkparty gewesen und wie jedes Mal gab es Probleme mit dem Zugriff auf die Netzwerkfreigaben. Diesmal hatten wir das Problem, das beim Zugriff von Windows 7 auf andere Windows 7 Netzwerkfreigaben der Fehler “Der Benutzer besitzt nicht den benötigten Anmeldetyp auf diesem Computer” erschien. Die […] The post “Der Benutzer besitzt nicht den benötigten Anmeldetyp…

windowsfehlernetzwerkfreigabewindows 7

1 min read

During RubyConf 2011 in New Orleans, LA Matt Aimonetti gave a talk entitled Complex Ruby concepts simplified. ##Description of the talk: Programming languages, such as Ruby, are natural and elegant. But to achieve this elegance, things have to happen under the hood. Garbage Collection, concurrency, Global Interpreter Lock, metaprogramming, C extensions are just some of the things happening with or…

30 Sept 2011

27 Sept 2011

26 Sept 2011

24 Sept 2011

Brendan Eich 5 min read

I took time away from the Mozilla all-hands last week to help out on-stage at the Intel Developer Forum with the introduction of RiverTrail, Intel’s technology demonstrator for Parallel JS — JavaScript utilizing multicore (CPU) and ultimately graphics (GPU) parallel processing power, without shared memory threads (which suck). Then over the weekend, I spoke at … Continue reading "CapitolJS, RiverTrail"

mozillauncategorized

18 Sept 2011

16 Sept 2011

15 Sept 2011

Joel Spolsky 9 min read

Should you launch at Launch? (Or TechCrunch Disrupt? Or Demo? They’re all pretty similar). This year I launched two major new products at conferences: Careers 2.0 and Trello,… Read more "Should you launch at a conference?"

news

14 Sept 2011

1 min read

In some cases, you might have a bunch of apps running on different domains/subdomains and/or ports and you would like to make ajax requests between these services. The problem is that browsers wouldn’t let you make such requests because of the Same Origin Policy which only allowed them to make request to resources within the same domain. However, most browsers…

13 Sept 2011

Joel Spolsky 2 min read

Around the time of Fog Creek Software’s ten year anniversary, I started thinking that if we want to keep our employees excited and motivated for another ten… Read more "Announcing Trello"

news

12 Sept 2011

7 min read

When we started the Mobile project early 2011, unit testing JavaScript was one of the goals to tackle on the technical side. The history of…

7 Sept 2011

5 Sept 2011

1 min read

Recently I wrote a small DSL that allows the user to define some code that then gets executed later on and in different contexts. Imagine something like Sinatra where each route action is defined in a block and then executed in context of an incoming request. The challenge is that blocks come with their context and you can’t execute a…

4 Sept 2011

1 min read

Warning: this proof requires a bit of familiarity with the terminology of propositional logic and graph theory. Problem: Let $ G$ be an infinite graph. Show that $ G$ is $ n$-colorable if and only if every finite subgraph $ G_0 \subset G$ is $ n$-colorable. Solution: One of the many equivalent versions of the Compactness Theorem for the propositional…

2 Sept 2011

1 min read

Berlin is playing host to the oh-so-sold-out JSConf.eu conference happening October 1-2. Some members of the SoundCloud engineering crew…

30 Aug 2011

1 min read

Recently I had to build a new app as part of my research & development job at LivingSocial. My goal was to get the app up and running in just a few weeks, solid application architecture and graphic design included. When you need to build an app quickly and you want it to have some solid foundations, Rails is quite…

28 Aug 2011

1 min read

A quick virtual heads-up for developers, hackers and coding enthusiasts in the Berlin-area: SoundCloud is very happy to support the upcoming…

25 Aug 2011

Brendan Eich 3 min read

TXJS 2011 A6 – Brendan Eich – Ecma TC39: The Good, The Bad, and The Ugly. [Main slides] [Paren-free] I spoke at TXJS, a really excellent regional JS conference, in June. Thanks to @SlexAxton, rmurphey, and everyone else involved. My talk was concerned with the good, bad, and ugly of Ecma TC39 (and I mean … Continue reading "My TXJS…

mozillauncategorized

24 Aug 2011

9 min read

The recent outage of SoundCloud was the result of everybody doing the right thing. This totally jives with John Allspaw’s message that…

22 Aug 2011

5 min read

The Problem The mobile version of SoundCloud is a consumer of our own API dog food. That decision was made with the intention to deploy a…

17 Aug 2011

1 min read

I want to thank all my readers for visiting Math ∩ Programming as often as you do, and doubly thank those who are kind enough to leave a comment. Unfortunately over the next few weeks I may not have time to do work as much on this blog as I have in the past two months. After driving 3,000 miles…

14 Aug 2011

1 min read

Problem: Show that $ \sqrt{2}$ is an irrational number (can’t be expressed as a fraction of integers). Solution: Suppose to the contrary that $ \sqrt{2} = a/b$ for integers $ a,b$, and that this representation is fully reduced, so that $ \textup{gcd}(a,b) = 1$. Consider the isosceles right triangle with side length $ b$ and hypotenuse length $ a$, as…

11 Aug 2011

1 min read

This post assumes some basic familiarity with Euclidean geometry and linear algebra. Though we do not assume so much knowledge as is contained in our primer on inner product spaces, we will be working with the real Euclidean inner product. For the purpose of this post, it suffices to know about the “dot product” of two vectors. The General Problem…

10 Aug 2011

1 min read

We will orient our dash of Python around the first and simplest problem from ProjectEuler.net. Installing Python To get Python on your computer, go to python’s website and follow the instructions for downloading and installing the interpreter. Most Window’s users can simply click here to download an installer, Mac OS 10.6 – 10.7 users can click here to get their…

8 Aug 2011

1 min read

I’ve posted the final slides from my talk this year at DEFCON and Black Hat, on breaking out of the KVM Kernel Virtual Machine on Linux. Virtunoid: Breaking out of KVM from Nelson Elhage [Edited 2011-08-11] The code is now available. It should be fairly well-commented, and include links to everything you’ll need to get the exploit up and running…

6 Aug 2011

1 min read

So far on this blog we’ve assumed familiarity with the programming languages used (at the time of this writing, this is Mathematica and Java). This is unfair for the mathematicians who have little to no programming experience, and we admit that some readers tend to skim those technical sections with source code. As our work on this blog progresses, we…

3 Aug 2011

2 Aug 2011

30 Jul 2011

1 min read

This primer exists for the background necessary to read our post on RSA encryption, but it also serves as a general primer to number theory. Oh, Numbers, Numbers, Numbers We start with some easy definitions. Definition: The set of integers, denoted $ \mathbb{Z}$, is the set $ \left \{ \dots -2, -1, 0, 1, 2, \dots \right \}$. Definition: Let…

29 Jul 2011

1 min read

This post assumes working knowledge of elementary number theory. Luckily for the non-mathematicians, we cover all required knowledge and notation in our number theory primer. So Three Thousand Years of Number Theory Wasn’t Pointless It’s often tough to come up with concrete applications of pure mathematics. In fact, before computers came along mathematics was used mostly for navigation, astronomy, and…

Schakko 3 min read

Für ein aktuelles Projekt entwickeln wir mit .NET Framework 3.5 und ASP.NET MVC 2. Um von der fest-codierten Instanzierung von Objekten Abstand zu nehmen (u.a. für das Mocking) und die Applikation frei konfigurierbar zu machen, habe ich mir mal Unity 2.0 angeschaut. Leider beziehen sich die meisten Tutorials und Blog-Posts […] The post Unity 2.0 in eine ASP.NET MVC 2…

application servermicrosoft2.0asp.netdependency injection

28 Jul 2011

1 min read

Problem: Show that every natural number can be unambiguously described in fewer than twenty words. “Solution”: Suppose to the contrary that not every natural number can be so described. Let $ S$ be the set of all natural numbers which are describable in fewer than twenty words. Consider $ R = \mathbb{N}-S$, the set of all words which cannot be…

27 Jul 2011

Steve Yegge 5 min read

I woke up this morning...ish... to discover that Hacker News had finally had enough of me being at Google, so they forced me into early retirement. On Monday I was honored to be able to deliver a keynote talk at OSCON Data. In the talk, I announce at the end that I am quitting a project that I had very…

1 min read

This post assumes familiarity with the terminology and notation of linear algebra, particularly inner product spaces. Fortunately, we have both a beginner’s primer on linear algebra and a follow-up primer on inner products. The Quest We are on a quest to write a program which recognizes images of faces. The general algorithm should be as follows. Get a bunch of…

26 Jul 2011

Schakko 1 min read

Für ein aktuelles Projekt wollte ich gestern mal wieder Visual Studio 2008 benutzen, da ich in C# eine Funktionalität implementieren musste. Ich startete also Visual Studio öffnete die Projektmappe und bekam den Fehler “Der Projekttyp wird von dieser Installation nicht unterstützt”. Das Projekt nutzte das ASP.NET MVC -Framework und so […] The post Visual Studio 2008: "Der Projekttyp wird von…

microsoftasp.netmvcnicht untersttztprojekttyp

1 min read

It is now possible to share all public tracks and playlists to the connections of the authenticated user. So if a user is already connected e.g. with Facebook on SoundCloud, this connection can be used from your app to share a track.

25 Jul 2011

1 min read

Vector spaces alone are not enough to do a lot of the interesting things we’d like them to do. Since a vector space is a generalization of Euclidean space, it is natural for us to investigate more specific types of vector spaces which are more akin to Euclidean space. In particular, we want to include the notion of a dot…

1 min read

UPDATE: We made some changes to how we manage the App Gallery. Read about them here: The Next App Gallery Update So you’ve built a fantastic app that you would like to get showcased in the SoundCloud App Gallery? Here’s what you can do to improve your chances of getting your app featured and increase the likelihood of SoundCloud users…

23 Jul 2011

1 min read

We present a video on Möbius transformations and the geometry of the sphere. Anyone who has taken or will take complex analysis (that means you engineers!) should watch this. It shows not only the beautiful correspondence between the two, but it reveals the intuition behind a lot of complex analysis, when more often than not a student is left in…

22 Jul 2011

Steve Yegge 2 min read

San Jose, CA (Reuters) — Online auctions cartel eBay (NASDAQ: EBAY) and its collections and incarceration arm PayPal announced that on July 21, 2011, the two companies had jointly been awarded United States Patent No. 105960411 for their innovative 10-click “Buy it Now” purchasing pipeline. The newly-patented buying system guides users through an intuitive, step-by-step process of clicking “Buy It…

1 min read

Today we announce new activities available over the API. As a reminder: Activites are the items on your Dashboard.

20 Jul 2011

1 min read

“Tonight’s the Night” A large volume of research goes into the psychological and behavioral analysis of criminals. In particular, serial criminals hold a special place in the imagination and nightmares of the general public (at least, American public). Those criminals with the opportunity to become serial criminals are logical, cool-tempered, methodical, and, of course, dangerous. They walk among us in…

Junior Grossi 2 min read

Hello everybody! Usually I have direct access (shell) in all the servers that host my Zend Framework applications, but, some clients already have a shared host, so I have to deploy the application there too. I was thinking how can I never thought this before! There are a lot of ways to deploy a Zend … Continue reading Deploying Zend…

hostingphpzend frameworkzf

1 min read

Today we announce a better way to share sounds in SoundCloud via the API. The new interface resembles the way sharing happens on the website. You can retrieve, create, update and delete sharings to other users on SoundCloud based on user_id or email address for your tracks and playlists.

19 Jul 2011

1 min read

It seems that false proofs are quickly becoming some of the most popular posts on Math ∩ Programming. I have been preparing exciting posts on applications of graph coloring, deck stacking, and serial killers. Unfortunately, each requires resources which exist solely on my home desktop, which is currently dismantled in California while I am on vacation in Costa Rica. Until…

17 Jul 2011

Dominic Steinitz 1 min read

Doob’s Inequality for Right (Left) Continuous Martingales In all the proofs I have seen, some of the details are elided; here is my proof with all the details. Proof: Let be an increasing set of finite sets whose union is dense in and note that by right (left) continuity, we have: Thus: By monotone convergence … Continue reading Doob’s Inequality…

probability

16 Jul 2011

1 min read

Problem: Show that all horses are of the same color. “Solution”: We will show, by induction, that for any set of $ n$ horses, every horse in that set has the same color. Suppose $ n=1$, this is obviously true. Now suppose for all sets of $ n$ horses, every horse in the set has the same color. Consider any…

15 Jul 2011

Junior Grossi 2 min read

Hi every one! I just read a small but very interesting post in BrownPHP website with a comparison between Zend Framework and CakePHP Framework. The post is below and the original article is here. The Zend Framework, developed by Zend Technologies is an open-source, object oriented web-application framework implemented in PHP 5. It is widely … Continue reading Zend Framework…

cakephpphpzend frameworkzf

14 Jul 2011

1 min read

How many colors are required to color the provinces of Costa Rica? A common visual aid for maps is to color the regions of the map differently, so that no two regions which share a border also share a color. For example, to the right is a map of the provinces of Costa Rica (where the author is presently spending…

13 Jul 2011

Junior Grossi 6 min read

Hi everyone, Here I am again. Yesterday a friend asked me how to create the basics CRUD (Create, Release, Update, Delete) operations using Zend Framework. As everybody now, a basic CRUD it’s a good way to understand some framework’s resources to a new ZF developer. As he is a newbie with Zend Framework, the example … Continue reading Basic CRUD…

crudphpzend frameworkzf

1 min read

Problem: Suppose their are three circles in the plane of distinct radii. For any two of these circles, we may find their center of dilation as the intersection point of their common tangents. For example, in the following picture we mark the three centers of dilation for each pair of circles: We notice that the three centers of dilation are…

11 Jul 2011

1 min read

A Puzzle is Born Sitting around a poolside table, in the cool air and soft light of a June evening, a few of my old friends and I played a game of Texas Hold ‘Em. While we played we chatted about our times in high school, of our old teachers, friends, and, of course, our times playing poker. We even…

Junior Grossi 1 min read

Hi all, Sometimes a big part of an application uses AJAX to get content. When getting new content we get new events, already declared in the webapp. For example: $(function(){ $('a.class1').bind('click', function(){ // code here }); }); If the new content (via AJAX) has a link with class1 class, it won’t call this javascript code, … Continue reading Using live…

javascriptjquery

1 min read

Today my friend Patrick Crowley and I were talking about scaling his website: https://cinematreasures.org since an article covering his work will soon be published in a very popular newspaper. Patrick’s site is hosted on Heroku which comes by default with Varnish caching enabled. The challenge is that a lot of people using the Rails framework are used to doing page…

10 Jul 2011

Junior Grossi 1 min read

Boa tarde, pessoal. Me perguntaram por que comecei a blogar em Inglês e não em Português? Temos vários motivos pra isso. O primeiro deles é o fato de saber que tenho MUITO que melhorar no inglês, e sei ainda que o contato diário com a língua é fundamental pra isso. Portanto, blogar em inglês me … Continue reading Inglês? Por…

general

9 Jul 2011

1 min read

It’s often that a student’s first exposure to rigorous mathematics is through set theory, as originally studied by Georg Cantor. This means we will not treat set theory axiomatically (as in ZF set theory), but rather we will take the definition of a set for granted, and allow any operation to be performed on a set. This will be clear…

Stephen Blum 1 min read

You have always wanted to send CSS updates to your website or HTML5 mobile app in real time. How do you do this?

7 Jul 2011

1 min read

Problem: Show 31.5 = 32.5. “Solution”: Explanation: It appears that by shifting around the pieces of one triangle, we have constructed a second figure which covers less area! Since the first triangle has base length 13 and height 5, its area is 32.5. Clearly, the second figure has the same area minus a square of area 1, giving the second…

5 Jul 2011

1 min read

Problem: Show there are finitely many primes. “Solution”: Suppose to the contrary there are infinitely many primes. Let $ P$ be the set of primes, and $ S$ the set of square-free natural numbers (numbers whose prime factorization has no repeated factors). To each square-free number $ n \in S$ there corresponds a subset of primes, specifically the primes which…

1 min read

This is the first in a series of “false proofs.” Despite their falsity, they will be part of the Proof Gallery. The reason for putting them there is that often times a false proof gives insight into the nature of the problem domain. We will be careful to choose problems which do so. Problem: Show 1 = 2. “Solution”: Let…

1 min read

Problem: $ \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \dots = 1$ Solution: Problem: $ \frac{1}{3} + \frac{1}{9} + \frac{1}{27} + \dots = \frac{1}{2}$ Solution: Problem: $ \frac{1}{4} + \frac{1}{16} + \frac{1}{64} + \dots = \frac{1}{3}$ Solution: Problem: $ 1 + r + r^2 + \dots = \frac{1}{1-r}$ if $ r < 1$. Solution: This last one follows from similarity of…

4 Jul 2011

1 min read

We assume the reader is familiar with the concepts of determinism and finite automata, or has read the corresponding primer on this blog. The Mother of All Computers Last time we saw some models for computation, and saw in turn how limited they were. Now, we open Pandrora’s hard drive: Definition: A Turing machine is a tuple $ (S, \Gamma,…

3 Jul 2011

Dominic Steinitz 1 min read

Doob’s Inequality Let be a (discrete) non-negative sub-martingale, bounded in i.e. with for some fixed . Define by , and . Then . Further, . Proof: Fix and define the stopping time . Then which is -measurable and thus by The Stopping Time Lemma since Also by Fubini Using both of these facts and Fubini … Continue reading Doob’s Inequality

probability

2 Jul 2011

1 min read

The first step in studying the sorts of possible computations (and more interestingly, those things which cannot be computed) is to define exactly what we mean by a “computation.” At a high level, this is easy: a computation is simply a function. Given some input, produce the appropriate output. Unfortunately this is much too general. For instance, we could define…

1 Jul 2011

1 min read

Problem: Prove that for all $ n,k \in \mathbb{N}, k > 1$, we have $$\sum \limits_{i=0}^{n} k^i = \frac{k^{n+1}-1}{k-1}$$ Solution: Representing the numbers in base $ k$, we have that each term of the sum is all 0’s except for a 1 in the $ i$th place. Hence, the sum of all terms is the $ n$-digit number comprised of…

30 Jun 2011

1 min read

Additional Patterns Last time we left the reader with the assertion that Conway’s game of life does not always stabilize. Specifically, there exist patterns which result in unbounded cell population growth. Although John Conway’s original conjecture was that all patterns eventually stabilize (and offered $50 to anyone who could provide a proof or counterexample), he was proven wrong. Here we…

29 Jun 2011

1 min read

Cellular Automata There is a long history of mathematical models for computation. One very important one is the Turing Machine, which is the foundation of our implementations of actual computers today. On the other end of the spectrum, one of the simpler models of computation (often simply called a system) is a cellular automaton. Surprisingly enough, there are deep connections…

27 Jun 2011

Joel Spolsky 2 min read

[UPDATE – September 6th – Regrettably, DevDays had to be cancelled. See the announcement on the Stack Exchange Blog for details.] Stack Overflow DevDays, the universe’s best… Read more "Stack Overflow DevDays is Back!"

news

1 min read

Note: This was one of my first blog posts on Go and well, I won’t make any excuses, it’s pretty terrible. It’s a good example of what not to do, that is, trying to force the concepts of a different language (in this case Ruby) to Go. I almost never use reflection and the following code is the kind of…

26 Jun 2011

1 min read

Problem: Take a chessboard and cut off two opposite corners. Is it possible to completely tile the remaining board with 2-by-1 dominoes? Solution: Notice that every domino covers exactly one white tile and one black tile. Counting up the colors, we have 32 white and 30 black. Hence, any tiling by 2-by-1 dominoes will leave two extra white squares unaccounted…

1 min read

Community Service Mathematics is supposed to be a process of discovery. Definitions, propositions, and methods of proof don’t come from nowhere, although after the fact (when presented in a textbook) they often seem to. As opposed to a textbook, real maths is highly non-linear. It took mathematicians quite a lot of fuss to come up with the quadratic formula, and…

24 Jun 2011

1 min read

Problem: What is the area of the triangle within the rectangle? Solution: In a moment of inspiration, we draw the following additional line: Now the answer is obvious. Once we split the rectangle into two smaller rectangles, the sides of the triangle become diagonals of their respective rectangles. The diagonals obviously split each of the two smaller rectangles into halves,…

1 min read

Problem: Find the sum of the first 1000 natural numbers. Solution: Write the numbers twice as follows: $ \begin{matrix} 1 & + & 2 & + & \dots & + & 999 & + & 1000 \\\ 1000 & + & 999 & + & \dots & + & 2 & + & 1 \end{matrix}$ Summing the numbers in each…

23 Jun 2011

1 min read

Problem: At any party of 1000 people, must there always exist two people at the party who have the same number of friends at the party? For the sake of this problem, one cannot be friends with oneself, and friendship is bidirectional. Solution: This must always happen. Suppose to the contrary, that every person at the party has a different…

1 min read

Problem: 1000 players compete in a tournament. In each round, players are matched with opponents, and the winner proceeds to the next round. If there are an odd number of players in a round, one player chosen at random sits out of that round. What is the total number of games are played in the tournament? Solution: 999. Each player…

22 Jun 2011

Brendan Eich 7 min read

As you may know, I wrote JavaScript in ten days. JS was born under the shadow of Java, and in spite of support by marca and Bill Joy, JS in 1995 was essentially a one-man show. I had a bit of help, even at the start, that I’d like to acknowledge again. Ken Smith, a … Continue reading "New JavaScript…

mozillauncategorized

21 Jun 2011

1 min read

A Bully By Any Other Name From the New York Times: “Shopping online in late July, Clarabelle Rodriguez typed the name of her favorite eyeglass brand into Google’s search bar. In moments, she found the perfect frames — made by a French company called Lafont — on a Web site that looked snazzy and stood at the top of the…