Archive for August 21, 2015

Friday, August 21, 2015 [Tweets] [Favorites]

How Streaming Music Royalties Are Calculated

Sharky Laguana (via Marco Arment):

The reality is only some of your money is paid to the artists you listen to. The rest of your money (and it’s probably most of your money) goes somewhere else. That “somewhere else” is decided by a small group of subscribers who have gained control over your money thanks to a mathematical flaw in how artist royalties are calculated. This flaw cheats real artists with real fans, rewards fake artists with no fans, and perhaps worst of all communicates to most streaming music subscribers a simple, awful, message: Your choices don’t count, and you don’t matter.

[…]

The problem lies in the fact that this “Big Pool method” only cares about one thing, and one thing only: the overall number of streams. It does not care even a tiny little bit about how many subscribers generated those streams.

[…]

Click fraud is rarely discussed in the context of streaming music, but it’s fairly simple for a fraudster to generate more in royalties than they pay in subscription fees.

[…]

It’s worth noting that many (if not most) of these heavy-usage “subscribers” are probably not individuals at all. They are actually offices, restaurants, gyms, hair salons, etc. Businesses like these can stream up to 24 hours a day — far more you as an individual could ever hope to do. And they probably don’t share your taste in music either. But they pay the same $10 you do, so why do they get to decide where your money goes?

Swift Pattern Matching in Detail

Benedikt Terhechte (via Chris Lattner):

The main feature of switch is of course pattern matching, the ability to destructure values and match different switch cases based on correct match of the values to the cases.

[…]

So, how do you best implement this new restriction? You could just have an if / else switch for buy and for sell, but that would lead to nested code which quickly lacks clarity - and who knows maybe these Wall Street guys come up with further complications. So you define it instead as additional requirements on the pattern matches[…]

[…]

By default, and unlike C/C++/Objective-C, switch cases do not fall through into the next case which is why in Swift, you don’t need to write break for every case. You can opt into traditional fallthrough behaviour with the fallthrough keyword.

[…]

The case keyword can be used in for loops just like in switch cases.

case can also be used with guard, although only wildcard and identifier patterns work with for and guard.

Sandboxing Impression

Steven Vandeweghe:

Had to sandbox Impression (Mac) to release an update with 1 tiny bug fix. Result: it now seems to have tons of bugs that I can’t reproduce.

It doesn’t look like the sort of app that would be operating near the edge.

Cross-Platform UI in GitHub Desktop

Rob Rix:

Although the overall flow and architecture are shared, the implementations are often quite different. For example, although both platforms use WebKit, the bridging APIs are very different.

On OS X, the JavaScriptCore APIs allow us to pass arbitrary objects, functions, and arrays between Objective-C/Swift and JavaScript. Native code can call methods on JavaScript objects, and JavaScript code can call methods on native objects, without any special handling. We can also define protocols to specify which properties of our objects should be bridged.

CefSharp, on the other hand, does not bridge arrays or functions. JavaScript objects can call methods on native objects, but not on the properties of native objects. Native objects cannot call methods on JavaScript objects; you ask the ChromiumWebBrowser to evaluate a string of JavaScript source instead. Since the comparison graph is largely asynchronous, requiring both callbacks and arrays, this motivates a set of JavaScript shims baked into the comparison graph at build time.

GitUp 1.0 Is Open Source

GitUp (tweet):

GitUp is a bet to invent a new Git interaction model that lets engineers work quickly, safely, and without headaches. It’s unlike any other Git client out there from the way it’s built (it interacts directly with the Git database on disk), to the way it works (you manipulate the repository graph instead of manipulating commits).

[…]

GitUp is built as a thin layer on top of a reusable generic Git toolkit called “GitUpKit”. This means that you can use that same GitUpKit framework to build your very own Git UI!

Previously: GitUp 0.7.