Archive for September 28, 2017

Thursday, September 28, 2017

Measuring Swift Compile Times in Xcode 9

Jesse Squires:

As mentioned, after you add these flags you will start getting warnings. Keep in mind that if the threshold is too low, for example 10ms, then you will get a ton of warnings that cannot be fixed. Experiment with these threshold values and adjust as needed. I suggesting starting at 200 and tuning from there. If your code base is large, it might make more sense to use a higher value for your project (say 500) and try to decrease it over time. Otherwise, you’ll be spending a lot of time trying to get all functions and expressions to compile in under 200ms. Also, I recommend setting these flags only for DEBUG build configurations.

There are two common scenarios where Xcode will start emitting warnings with these flags: (1) very complex expressions or functions, and (2) expressions that omit explicit types and rely on type inference. To silence the warnings — and thus improve compile times — try breaking up expressions into smaller steps with intermediate variables, and adding explicit types to variable declarations and closure parameters.

Previously: Guarding Against Long Swift Compiles.

Update (2018-04-29): See also: Marcin Krzyzanowski.

Time Machine vs.

Rob Griffiths:

In a nutshell, Apple recommends that if you’ve moved the System Photo Library to an external drive—as nearly anyone who takes lots of pictures will have done, given space-limited solid-state internal drives—you do not use Time Machine on that drive. Not just “don’t back up the Photos Library folder with Time Machine,” but “don’t back up the entire drive with Time Machine.” Yikes!


I know Apple’s answer to the second question is “You shouldn’t be storing photos locally, they should all be in the cloud.” But if you have a huge collection of photos and videos, and/or if you’ve got slow or limited internet, this is not a realistic option.

It’s also not a very reliable one. Aside from not really being a backup, iCloud Photo Library doesn’t even sync reliably. My mother has four devices that are supposedly syncing, but some of the photos don’t make it to some of the devices. Each device gets most of each batch of new photos, so at a glance it looks like it worked, but upon closer inspection some of the photos are missing. No errors are reported.

Alan Kay on the iPhone

Alan Kay:

If people could understand what computing was about, the iPhone would not be a bad thing. But because people don’t understand what computing is about, they think they have it in the iPhone, and that illusion is as bad as the illusion that Guitar Hero is the same as a real guitar. That’s the simple long and the short of it.

What’s interesting is, the computational ability of an iPhone is far beyond what we need to do good computing. What you wind up with is something that has enough stuff on it and is connected to enough stuff, so it seems like the entire thing.


So, I talked to Steve on the phone [about adding a standard pen and penholder]. I said, “Look Steve. You know, you’ve made something that is perfect for 2-year-olds and perfect for 92-year-olds. But everybody in-between learns to use tools.”


Well, a saying I made up at PARC was, “Simple things should be simple, complex things should be possible.” They’ve got simple things being simple and they have complex things being impossible, so that’s wrong.

Update (2017-09-28): Alan Kay (via Gok):

Let me try to help this community regarding this article by providing some context. First, you need to realize that in the more than 50 years of my career I have always waited to be asked: Every paper, talk, and interview has been invited, never solicited. But there is a body of results from these that do put forward my opinions.

This article was a surprise, because the interview was a few years ago for a book the interviewer was writing. It’s worth noting that nowhere in the actual interview did I advocate going back and doing a Dynabook. My comments are mostly about media and why it’s important to understand and design well any medium that will be spread and used en-mass.

If you looked closely, then you would have noticed the big difference between the interview and the front matter. For example, I’m not still waiting for my dream to come true. You need to be sophisticated enough to see that this is a headline written to attract. It has nothing to do with what I said.

And, if you looked closely, you might note a non seq right in the beginning, from “you want to see old media?” to no followup. This is because that section was taken from the chapter of the book but then edited by others.

The first version of the article said I was fired from Apple, but it was Steve who was fired, and some editor misunderstood.

EFF Resigns From W3C

Cory Doctorow (Hacker News):

In July, the Director of the World Wide Web Consortium overruled dozens of members’ objections to publishing a DRM standard without a compromise to protect accessibility, security research, archiving, and competition.

EFF appealed the decision, the first-ever appeal in W3C history, which concluded last week with a deeply divided membership. 58.4% of the group voted to go on with publication, and the W3C did so today, an unprecedented move in a body that has always operated on consensus and compromise. In their public statements about the standard, the W3C executive repeatedly said that they didn’t think the DRM advocates would be willing to compromise, and in the absence of such willingness, the exec have given them everything they demanded.


EFF no longer believes that the W3C process is suited to defending the open web. We have resigned from the Consortium, effective today.

John Gruber:

I’m no fan of DRM. Who is? But I am a fan of practicality, and there are practical reasons why web browsers should be able to play DRM-protected content without using proprietary plugins.


I’ll leave the original post as-is, because I think it expresses well my thoughts on why the W3C should support DRM, but this DMCA issue is important, and now I’m uncertain how to feel about the EFF’s decision to leave. The DMCA is an odious — and I think unconstitutional — law. DRM should be protected by its encryption and longstanding copyright law. Anything that’s “fair use” under copyright law should be “fair use” with DRM content if the DRM can be circumvented.

Previously: Encrypted Media Extensions (EME).