Archive for March 2017

Friday, March 31, 2017

APFS to Add Case-Insensitive Variant for Mac

Apple has updated its APFS Guide (via Thomas Zoechling):

APFS has case-sensitive and case-insensitive variants. The case-insensitive variant of APFS is normalization-preserving, but not normalization-sensitive. The case-sensitive variant of APFS is both normalization-preserving and normalization-sensitive. Filenames in APFS are encoded in UTF-8 and aren’t normalized.

HFS+, by comparison, is not normalization-preserving. Filenames in HFS+ are normalized according to Unicode 3.2 Normalization Form D, excluding substituting characters in the ranges U+2000–U+2FFF, U+F900–U+FAFF, and U+2F800–U+2FAFF.

The first developer preview of APFS, made available in macOS Sierra in June 2016, offered only the case-sensitive variant. In macOS 10.12.4, the APFS developer preview was updated to also include a case-insensitive variant. In iOS 10.3, the case-sensitive variant of APFS is used.

[…]

Directory hard links are not supported by Apple File System. All directory hard links are converted to symbolic links or aliases when you convert from HFS+ to APFS volume formats on macOS.

[…]

Apple plans to document and publish the APFS volume format specification when Apple File System is released for macOS in 2017.

Regarding the normalization issues that I raised last week:

Developers should be aware of behavior differences between normalization sensitivity and insensitivity which may arise when an iOS device upgrades to iOS 10.3 and migrates the filesystem from HFS+ to APFS. For example, attempting to create a file using one normalization behavior and opening that file using another normalization behavior may result in ENOENT, or “File Not Found” errors. Additionally, storing filenames externally, such as in the defaults database, CoreData, or iCloud storage may cause problems if the normalization scheme of the filename being stored is different from what exists on-disk.

But Apple doesn’t describe any solutions.

It’s also not documented how long APFS filenames can be. It would be nice to have an API for this.

Update (2017-03-31): I think “normalization-preserving, but not normalization-sensitive” means that (like HFS+ on the Mac, unlike APFS on iOS) you cannot have multiple files whose names differ only in normalization. And you can look up a file using the “wrong” normalization and still find it. Additionally, beyond what HFS+ offers, if you create a file and then read the directory contents, you’ll see the filename listed using the same normalization that you used.

Update (2017-04-02): Here’s a thread with someone confused because Apple’s guide said that using NSURL would handle the normalization issues, but it didn’t.

Update (2017-04-07): Howard Oakley:

The TL;DR is that both variants of APFS will cause problems – they are just different problems requiring different solutions. Either way, many current apps, tools, and scripts will perform strangely when run on APFS, and many will therefore need to be revised and updated to cope with it.

Update (2017-04-14): DropDMG 3.4.6 adds support for creating blank case-insensitive APFS disk images to help developers test their Mac apps with the new file system.

Update (2017-06-19): See also WWDC 2017 session 715.

Some Swift Types Are More Equatable Than Others

Vincent Esche:

Now what If I told you that none of these hold true for Set<Float>, Set<Double>, and consequently Set<V>?

How can this be, given that both, Float and Double conform to Hashable (and therefor also Equatable), one of the (quite literally) key-requirements of Set<Float> and Set<Double>.

[…]

Yep, there’s indeed more than one NaN: a total of 8388606 of them in Float alone, to be specific. And even more of them are to be found in Double.

Update (2017-03-31): Joe Groff:

There’s WIP to make floats Equatable and Comparable using level 2 comparison (so NaN == NaN, NaN < number, -0 != 0)

That way you get sound behavior when floats end up in generic containers, but the expected level-1 semantics working concretely with floats.

Photo Editing as One with Luminar

Jeff Carlson:

Luminar is a bold bet intended to compete against Photoshop — still the biggest gorilla in the jungle for professionals and enthusiasts — while also beckoning those who haven’t yet moved on from Apple’s long-discontinued Aperture. Luminar is also trying to appeal to casual photographers who want more image editing capabilities than Apple’s Photos. Plus, with its $69 price, Luminar hopes to appeal to the folks who don’t want to pay Adobe’s monthly or yearly subscription fee to use Photoshop.

[…]

One of the things I like about Luminar is that it’s relentlessly non-destructive. When editing photos, you don’t want to actually change the pixels in the original image, something older software did and many of Photoshop’s legacy controls still do. Non-destructive editing not only makes it easy to revert to the original and start over, but also change different aspects of what you’ve edited to that point.

[…]

It’s worth calling out the fact that Luminar does not attempt to manage your photo library. I normally wouldn’t even bring that up, since Luminar is an editing application, but Macphun has said that a future update will add library management, too. If you’re accustomed to managing, opening, and editing photos in Lightroom or Photos, it feels almost archaic to edit image files in another app.

Indeed.

Twitter Lengthens Replies, Drops Eggs

Twitter (tweet):

Now, when you reply to someone or a group, those @usernames won’t count toward your Tweet’s 140 characters.

[…]

Who you are replying to will appear above the Tweet text rather than within the Tweet text itself, so you have more characters to have conversations.

[…]

When reading a conversation, you’ll actually see what people are saying, rather than seeing lots of @usernames at the start of a Tweet.

OnLeaks:

Cool but this put a stop to the .@username trick... 😕 How to display replies to all our followers in our timeline now?...

Twitter (via MacRumors):

For the past seven years, everyone who has created an account on Twitter starts out with their default profile photo as an egg. This was a playful way to reference how eggs hatch into birds that send all the Tweets you see on Twitter! But now it’s time for something new – something that encourages people to upload their own photos for more personal expression. So today, we’re introducing a new default profile photo.

Flickr Reaction GIFs

Flickr:

In lieu of text comments, reactions also eliminate the need for translations. Now members from all over the world can come together through reactions to each others’ photos. The introduction of Reaction GIFs in the comment section will be the first step towards an image-only version of Flickr, because words simply aren’t enough anymore.

[…]

When the popup window comes up, a 5-second countdown will begin. Hurry up! Get ready! You will have 3 seconds to react while a video records. Once the video records, it will automatically process and post a GIF comment, saving the photo privately to your Camera Roll.

Thursday, March 30, 2017

The Deck Shuts Down

Jim Coudal:

Things change. In 2014, display advertisers started concentrating on large, walled, social networks. The indie “blogosphere” was disappearing. Mobile impressions, which produce significantly fewer clicks and engagements, began to really dominate the market. Invasive user tracking (which we refused to do) and all that came with that became pervasive, and once again The Deck was back to being a pretty good business. By 2015, it was an OK business and, by the second half of 2016, the network was beginning to struggle again.

John Gruber:

Here are just a few of the things that make me proud to have been part of The Deck:

  • We never allowed animated ads. (Remember when that was the main problem with online ads?)
  • We never allowed user tracking or JavaScript payloads. The Deck respected your privacy (and your bandwidth).
  • We had great sponsors who made great products and services (and designed great looking ads).

Perhaps most importantly, we never showed more than one ad per page. […] Exclusivity has tremendous value, and most web publishers still haven’t gotten that. And on the web, an ad doesn’t have to be big to be exclusive and to occupy valuable real estate.

Nick Heer:

Having a Deck ad on a site was a subtle indicator that it was trustworthy and that it had a good reputation. That’s something that almost nothing else — let alone an advertising network — has yet been able to achieve to the same degree.

Jonathan Poritsky:

The Deck going away is a loss made all the more frustrating by the fact that there isn’t really an alternative to it. Writers will always find a way to write, though. My hope is that the next generation of writers will find a way to put their words on the web on their own terms. Social doesn’t offer that. Blogging always has, and always will.

Jason Snell:

I will replace The Deck, at least in the short term, with an ad network with a similar look and feel, while I assess what the long-term plan should be.

New Web Features in Safari 10.1

Jon Davis:

Fetch is a modern replacement for XMLHttpRequest. It provides a simpler approach to request resources asynchronously over the network. It also makes use of Promises from ECMAScript 2015 (ES6) for convenient, chain-able response handling.

[…]

WebKit’s IndexedDB implementation has significant improvements in this release. It’s now faster, standards compliant, and supports new IndexedDB 2.0 features. IndexedDB 2.0 adds support for binary data types as index keys, so you’ll no longer need to serialize them into strings or array objects.

[…]

The download attribute for anchor elements is now available in Safari 10.1 on macOS. It indicates the link target is a download link that should download a file instead of navigating to the linked resource. It also enables developers to create a link that downloads blob data as files entirely from JavaScript. Clicking a link with a download attribute causes the target resource to be downloaded as a file. The optional value of the download attribute can be used to provide a suggested name for the file.

Dropbox Secures $600M Credit Line

Dina Bass and Alex Barinka (Hacker News):

Dropbox has said it’s not in a hurry to go public and that the business is nearing profitability. The company is cash-flow positive, with annualized revenue of more than $1 billion, Chief Executive Officer Drew Houston said last summer. Dropbox could tap debt if it wants to expand more aggressively or make acquisitions, said one of the people. It never touched a smaller credit facility, which was expiring, the person said.

After opening up in 2007, Dropbox gained a loyal following from people looking to store photos and other files in the cloud, making them available from any computer or mobile device. It rode this wave to a $10 billion valuation in early 2014, vaulting it to become one of Silicon Valley’s most valuable unicorn startups.

[…]

Dropbox has shifted to focus on selling its cloud service to larger businesses, which has helped boost revenue. It has also cut costs, partly by building data centers instead of relying on Amazon.com Inc.’s cloud storage.

[…]

For the banks involved, taking on the risk of lending to an unprofitable private company can help them win a role underwriting an eventual IPO.

TAForObvReasons:

A company with a modest valuation can survive by doing one thing and doing it well.

A company with a very large valuation needs either very large sales figures OR large growth potential. Dropbox is squarely in the second category, which is why they need to keep expanding.

David Heinemeier Hansson:

Dropbox is an interesting case where entire market window for the service could close before they ever had a chance to make real money.

RSS on the Desktop, 15 Years Later

Dave Winer:

In early 2002, my company, UserLand Software, shipped a product called Radio UserLand. It was a combination blogging tool and RSS reader. It was basically an open precursor to Twitter. No 140-char limit. And anyone could produce an RSS feed, and anyone could consume them.

His new app, Electric River, uses Electron to run Node.js on the Mac.

Wednesday, March 29, 2017

For Sale: Your Private Browsing History

Jon Brodkin:

The US House of Representatives voted Tuesday to eliminate ISP privacy rules, following the Senate vote to take the same action last week. The legislation to kill the rules now heads to President Donald Trump for his signature or veto.

[…]

The rules issued by the FCC last year would have required home Internet and mobile broadband providers to get consumers’ opt-in consent before selling or sharing Web browsing history, app usage history, and other private information with advertisers and other companies. But lawmakers used their authority under the Congressional Review Act (CRA) to pass a joint resolution ensuring that the rules “shall have no force or effect” and that the FCC cannot issue similar regulations in the future.

[…]

ISPs can track customers’ Web browsing even when they enable their browser’s “private mode,” which does not encrypt Internet traffic. Google, for example, says that Chrome’s incognito mode prevents the Chrome browser itself from saving the sites that you visit, but does not stop ISPs and websites from seeing which websites you’ve visited.

Mitchel Broussard:

Those in support of the original FCC protections argued that ISPs require strict regulations because they represent a much broader scope of access to user data, unlike search engines which only access a snapshot of a user’s browsing data. If a user is unhappy with a site’s data access they can decide to stop using it, the FCC supporters argued, but switching ISPs because of potentially intrusive data mining “is far more difficult.”

David Sparks:

Virtual Private Network services allow you to get on the Internet without the ISP seeing where you are actually going. The VPN company will know but, assuming you use a reputable one, they won’t sell your data. I’ve been using VPNs for years. They’re particularly helpful if you spend a lot of time on the road using WiFi that you don’t control.

Jeff Johnson notes that the privacy rules that are being eliminated had not yet gone into effect. ISPs apparently already have the right to sell our histories. I don’t know whether any have been doing so.

This blog is now available via SSL, and any http links should redirect to https. So this should keep private which posts you are reading. You would need a VPN to keep private that you are accessing this site at all or to keep your IP address out of my server logs. Unfortunately, VPNs slow everything down.

Update (2017-03-29): Karl Bode:

Many people seem to think a VPN provides total, magical protection of your privacy. It doesn’t.

Mike Masnick:

But here’s the real problem: you can’t buy Congress’ internet data. You can’t buy my internet data. You can’t buy your internet data. That’s not how this works. It’s a common misconception. We even saw this in Congress four years ago, where Rep. Louis Gohmert went on a smug but totally ignorant rant, asking why Google won’t sell the government all the data it has on people. As we explained at the time, that’s not how it works*. Advertisers aren’t buying your browsing data, and ISPs and other internet companies aren’t selling your data in a neat little package. It doesn’t help anyone to blatantly misrepresent what’s going on.

When ISPs or online services have your data and “sell” it, it doesn’t mean that you can go to, say, AT&T and offer to buy “all of Louis Gohmert’s browsing history.” Instead, what happens is that these companies collect that data for themselves and then sell targeting.

Russell Brandom:

The Telecommunications Act explicitly prohibits the sharing of “individually identifiable” customer information except under very specific circumstances. It’s much more permissive when it comes to “aggregate” customer information, which is where things get squishier and the FCC rules become more important. We could argue all day about whether a targeted ad is individually identifiable or not, but if you’re paying Verizon to find out which sites Paul Ryan visited last month, that’s pretty clearly individual information, and pretty clearly illegal to sell. If you want to get really clever, the Wiretap Act also makes it illegal to divulge the contents of electronic communications without the parties’ consent, which arguably includes browsing history.

See also: Hacker News.

Update (2017-03-31): See also: Bruce Schneier.

Update (2017-04-04): Juli Clover:

United States President Donald Trump today signed into law a bill that reverses Obama-era broadband privacy rules preventing Internet Service Providers from selling a subscriber's web browsing history and other personal information without permission.

The Facebook Model of Innovation

Nick Heer:

The speedy proliferation of Snapchat Story clones across Facebook’s apps is, I think, one of the most fascinating recent case studies of a feature going from invention to ubiquity. Facebook has four of the most popular apps on any ecosystem — as of writing, Instagram, Messenger, and the Facebook app are all in the top ten most popular free apps in the iOS App Store, with Whatsapp just missing the list at number eleven. And, as of today, all four of those apps have a variation of the Snapchat “Stories” feature shoehorned onto their main screens.

[…]

This power has provided Facebook with the luxury of allowing other companies to take the risk of trying new things, and then either embracing the company via an acquisition, or extinguishing them by duplicating their most unique component.

Custom Fonts on iOS

Curtis Clifton:

There’s just one more configuration step before we can start using our custom fonts. We have to tell iOS about the fonts by editing the app’s Info.plist.

Add the UIAppFonts key with an array of strings as the value. Each string should be the relative path to a custom font file in your app bundle.

[…]

The name of the font is not necessarily the font’s file name. Instead, it’s the font’s PostScript name. You can find the PostScript name by double clicking the font file to install it on your Mac. Then launch the FontBook app, find the font, and look at its info pane as shown below.

Update (2017-03-29): FontBlaster (via Arthur A. Sabintsev):

Say goodbye to importing custom fonts via property lists as FontBlaster automatically imports and loads all fonts in your app’s NSBundles with one line of code.

Previously: Installing Fonts on iOS.

Update (2017-04-05): Curt Clifton:

With this in place, you can delete the UIAppFonts key and value from your Info.plist. Now whenever you want to change the fonts embedded in your app, it’s as simple as changing the files in the Fonts group of your Xcode project and recompiling.

Update (2020-01-10): Quentin Zervaas:

[It] looks like Xcode now auto-populates the UIAppFonts if you use a custom font in your storyboards. Not sure when this started.

Coding Today vs. the 80s

Andrew Wulf:

Unlike back then when we had little to work with, today we have an embarrassment of riches available for free. The problem is now there is too much information, much of it is of variable quality, often out of date, wrong, or poorly described. First you have to figure out what to ask for, often your Google searches are very indirect as describing your problem in a way that includes the right words is often hit or miss. Then you get 500,000 results; now you have to filter through what you find, trying to answer your question or find an algorithm or idea, and then the fun begins of evaluation. Is this what I need? Is this up to date? Does this make any sense to me, can I understand it? Is it possible to integrate into what I already have? Is this library trustworthy, will it be supported?

[…]

Going into work and knowing virtually everything I would be doing that day would be a fun adventure in programming is something I no longer see. Some days at work I get almost no coding done due to all the other stuff (despite coding being what I am supposed to do given that we have way too few people) and I do really miss that “primitive” time.

Review of the Apple TV 2, 7 Years Later

Sam Mallery:

I paid 99 bucks for this thing the year it came out. I just looked at what they sell for today, and people are paying around $40 for for them on eBay. Considering this is an inexpensive video streaming device, it has rather impressive value retention. $40? Maybe I’ll kick this thing out of my house soon. :)

[…]

Apple wasn’t shy about trying to push people away from the Apple TV 2 when they abruptly removed the YouTube app from the device in May of 2015. Google had changed their API which broke the app, but, instead of fixing it and sending out an update, Apple just killed the YouTube app on the Apple TV 2. The nearly identical Apple TV 3 got an update and kept the YouTube app. Apple TV 2 owners were left in the lurch.

Tuesday, March 28, 2017

Replying to App Store Reviews

Apple:

Customer ratings and reviews are available in iTunes Connect for you to view and reply to. All iTunes Connect users who have access to an app in My Apps can see ratings and reviews in iTunes Connect, but only users with the Legal, Admin, App Manager, or Marketer role may reply to and edit responses to customer reviews on your App Store product page. You can reply to feedback on current and previous versions of your app.

[…]

Your response will remain publicly visible regardless of edits made by the customer to their own review, unless you choose to edit or delete your response in iTunes Connect. You can edit your response at any time and only one response per review will display on your App Store product page.

Oliver Drobnik:

Users get email if developer responds to review. And an option to update the review!

Matthias Gansrigler:

Ah, replying to #MAc @AppStore comments is so, so satisfying. Thank you, @Apple!

Panic:

🤗 Confirmed: you can use emoji in your iTunes Review developer responses! What a time to be alive!!!

Paul Haddad:

The App Store, where anyone can leave a ★☆☆☆☆ but developer replies have to be manually screened by Apple.

Curtis Herbert (tweet):

I’m even reconsidering how I point users to my existing FAQ since links don’t work -- might be best to copy/paste the content.

[…]

In the end I think this new ability be a win for us, and I’m aggressively all-in on ’em. Developer replies stand out when scrolling through reviews on iOS. People will notice our efforts, and it is one of the few ways we can really stand out in the App Store.

Previously: App Store Review Replies and Prompting API.

Update (2017-03-29): Ryan Christoffel:

Following yesterday’s release of iOS 10.3, which introduced the ability for developers to respond to App Store reviews, Apple has released official guidelines for how developer’s can best craft responses.

Pages 6.1 Adds Basic LaTeX Support

Apple (via Jeff Nadeau, Hacker News):

You can use LaTeX commands or MathML elements to include mathematical expressions and equations into your Pages document.

It also works with iBooks Author:

Pages and iBooks Author support all LaTeX commands that can be converted to MathML with blahtex. Additional supported LaTeX extensions are listed below.

Update (2017-03-28): See also: Michael E. Cohen.

Update (2017-03-29): Eddie Smith:

As an added bonus, even though Keynote does not have the same direct LaTeX support as Pages, I found that you can copy the equation in Pages as an image and simply paste it into Keynote. The image appears to be a vector graphic because it scales perfectly without any resolution loss.

Update (2017-03-30): Nick Heer:

Meanwhile, the Mac version of Pages still lacks features that were present in “old” Pages. It may have gained LaTeX support, but it’s still missing some contextual menu options that are available in other Mac apps, and I find basic text editing bugs every time I use it. I’m not sure how much of this, if any, is tied to components shared between the three platforms each app is available on, but I didn’t notice the same kinds of bugs when the Mac and iOS versions were more-or-less discrete apps.

Swift 3.1

Apple:

Swift 3.1 is a minor release that contains improvements and refinements to the Standard Library. Thanks to efforts by IBM and other members of the community, it also includes many updates to the Linux implementation of Swift. There are also a number of updates to Swift Package Manager. In addition, the Swift 3.1 compiler now automatically precompiles Objective-C bridging headers, which can speed up debug configuration builds of mixed-source projects.

This was a smooth update for me.

Update (2017-03-28): Károly Lőrentey:

Favorite Swift 3.1 feature not mentioned in the release notes: you can now define extensions for specific generic arguments 🌱

How to Reinstall macOS

Apple:

macOS Recovery installs different versions of macOS depending on the key combination you press while starting up. Hold down one of these combinations immediately after pressing the power button to turn on your Mac. Release when you see the Apple logo or a spinning globe.

This seems to be new in macOS 10.12.4, and it came in handy for me today. As with the last several updates, the 10.12.4 update completed on my main Mac but then the Mac got stuck near the end of the boot process. (I had recently done a clean install in the hope that it would clear out whatever was causing the update problems, but alas it did not.) Unlike prior updates, rebooting and safe booting didn’t help. The Mac just wouldn’t boot into my main account or even a guest account. It looked like I’d need a fresh macOS install.

The new Option-Command-R keyboard shortcut lets you do an Internet recovery of latest macOS that is compatible with your Mac. So, rather than boot from a slow hard drive, wrangle the Mac App Store, download the installer, and then launch it, I just held down the keys and let it download and install all at once. The time estimate was way off (under), but other than that it worked smoothly and got my Mac booting again.

I’ve now got a folder at /.PKInstallSandboxManager-SystemSoftware, presumably left behind by the incremental update. sudo rm doesn’t seem to be able to delete it. It looks like I would need to turn off System Integrity Protection to do that.

Update (2017-03-30): Thomas Brand:

Internet Recovery is now a convenient time-saver, skipping the unpatched versions of system software and restoring the latest Mac OS. I am a fan just as long restoring older versions of Mac OS are still an option. One of my least favorite aspects of iOS is that you cannot install the version of system software that originally shipped with your device.

macOS 10.12.4 Adds Night Shift

Apple (Hacker News, MacRumors):

Night Shift requires macOS Sierra 10.12.4 and one of these Mac computers, using the built-in display or the displays listed[…]

The only third-party displays listed are the LG UltraFine 5K and 4K. Night Shift seems to work fine on my Dell U3014, though.

Stephen Hackett:

One of my favorite features of f.lux is the ability to disable it based on what application is in the foreground. For example, I have Adobe Photoshop marked as an exception. as f.lux changing the color temperature of my display could cause me problems while editing photographs.

Apple’s Night Shift has no concept of exceptions. If the screen is warmer, it’s warmer for all applications.

[…]

F.lux can be disabled for an hour or longer from its menu bar app, while Night Shift can be toggled on and off via Notification Center.

I found that the Notification Center toggle only appears when Night Shift is on, so it can only be used to turn it off. [Update (2017-03-28): The toggle is available when Night Shift is off, but it’s scrolled off the top of the screen, with no visual indication that it’s there. It’s the same with Do Not Disturb, which I’ve known about for years, but I keep forgetting.]

Michel Fortin:

The good new is that, unlike Flux, Night Shift works well with Black Light.

The mechanism used by Night Shift is different. It does not rely on the gamma curve, which is good as it’s not fighting with Black Light.

Previously: Night Shift in iOS 9.3.

Update (2017-03-29): Michael Herf (via Hacker News):

Night Shift’s defaults are pretty gentle, and for most people they won’t reduce the impact of a screen by very much.

[…]

To use an example that explains why I’m pretty convinced they’re not doing enough, consider that the warmest Night Shift setting makes an iMac show more light at night than the iPad that Harvard studied back in 2012.

[…]

So starting there, f.lux removes 4-5x as much by default as Night Shift does, and yet it seems like most people will continue to think the two are similar, when they aren’t in the same range.

Friday, March 24, 2017

APFS’s “Bag of Bytes” Filenames

David Reed (via Alastair Houghton):

I received a polite reply from my bug stating:

“iOS HFS Normalized UNICODE names, APFS now treats all files as a bag of bytes on iOS. We are requesting that Applications developers call the correct Normalization routines to make sure the file name contains the correct representation.”

This is not that surprising, technically, because HFS+ was a file system outlier, having Unicode normalization built in. Things are much easier for the file system if it can just treat names as bags of bytes.

However, Apple failed to tell developers that it was making this change when it announced AFPS at WWDC 2016. And, as far as I can tell, it’s not mentioned anywhere in the APFS guide. iOS 10.3 is scheduled to ship in a matter of weeks or months, and it will convert existing volumes to APFS. It’s not trivial to make an app that was accustomed to working with a normalized file system work without one. And since there was no announcement, I doubt most developers have even thought about this. So this is bound to cause lots of bugs.

Here are some thoughts that come to mind:

  1. Depending on what an app does, it may not care about this at all. But some apps will require major changes. Think of any code that reads a filename from within a file, or from the network, or from NSUserDefaults, or from the user’s typing, or from a URL handler, and then looks for that file by name. Or code that reads the contents of a folder and compares the filenames with ones it has seen before. Also think of any code that compares a filename with a string, or puts filenames in a dictionary or set, or creates checksums or secure hashes of filenames. Even if code is just reading a filename from disk, so that it starts out with the right byte sequence, you have to be careful of any code that processes it changing the normalization.

  2. If normalization is not handled by the file system, it becomes the responsibility of each app. Apple could update Cocoa to make the common cases easier, but it sounds like this has not been done, and it wouldn’t handle everything, anyway. Not all file system access goes through Cocoa. And, in truth, even with a file system that does Unicode normalization, some code needs to care about this.

  3. The Apple engineer’s reply is not very helpful because it’s not clear what the “correct Normalization routines” are. If APFS is not normalized, then there really is no canonical form that you can expect to find on disk. Your code has to pick one and use it consistently. Cocoa has four different methods for normalizing strings. None of these normalize the same way that HFS+ did. It uses a variant of Form D.

  4. It’s not clear what normalization the APFS to HFS+ converter uses. It doesn’t really matter, though, since apps need to be able to handle all the cases, anyway.

  5. Even if an app creates a file, I’m not sure it’s safe for it to rely on being able to find it again with the same name. The file may reside on a disk whose file system is migrated. Or the file could be restored from backup, cloud synced, or transferred in some other manner that might change its name.

  6. As far as I know, there is no API to tell, given a path, whether its file system uses normalization.

  7. As far as I know, if you have a path there is no easy way and efficient way to look for it on disk if the normalizations may differ. If you get unlucky, you would have to start at the top and read the contents of each folder until you find the file or folder that, when normalized, matches that component of your path. And there is ambiguity here because, with a bag-of-bytes file system, there could be multiple items at each level that match the path component.

  8. More generally, once APFS is deployed users can legitimately end up with multiple files in the same folder whose names only differ in normalization. So it’s not simply a matter of having all application code convert all filenames to a canonical normalization. Apps need to be able to support files like this that coexist as well as the case where there’s only one file and the name in the file system doesn’t exactly match the name that the app stored or calculated.

Update (2017-03-25): See also: Hacker News.

I should also mention that, Unicode issues aside, APFS also allows multiple files in the same folder whose names differ only in case. HFS+ traditionally (on the Mac) does not and is case-insensitive. Applications will need to handle files that sync or transfer back and forth between these systems. Some folder structures created on APFS cannot exist on HFS+. And file references that rely on case-insensitivity to work on HFS+ will not work on APFS. Cocoa does have an API to detect how the file system handles case, and apps should already have been using it, but there will probably be more people running into these issues once the iOS/Mac worlds are no longer standardized on HFS+.

Update (2017-03-27): iOS 10.3 has shipped with APFS.

Pierre Lebeaupin:

I hope at least that the file name, even if not normalized, is guaranteed to be valid UTF-8, right?

[…]

However, when performing manipulations with NSString/NSURL/Swift String, do those preserve composition enough that developers can rely on them for that?

Previously: The Case Against Insensitivity.

Drew Thaler:

The way OSX does it is pretty reasonable: the userspace functions like fileSystemRepresentation return NFD UTF8, and inside the kernel each filesystem renormalizes on its own to its desired format using a set of shared utf8 conversion routines. The people who made this the official kernel filesystem policy at Apple were the same ones who spent years working on the Unicode standard.

Update (2017-03-28): Pierre Lebeaupin:

Nevertheless, this shows Apple themselves sometimes get it wrong and normalize strings in a way that causes issues because the underlying namespace has a dumb byte string for key. So if they can get it wrong, then third-party developers will need all the help they can get to get it right.

Update (2017-04-06): See also: Howard Oakley.

Update (2017-07-17): Howard Oakley:

The most obvious problems arose with iOS users who transferred files from Windows (which prefers a different normalisation form to HFS+) which were named using Korean and other character sets, although this even included European languages with accented characters like ñ and é. There’s a chilling series of messages on the Apple Developer Forums in which an iOS app developer details how users running iOS 10.3 were transferring files using iTunes for Windows, but could not access those files once they were on an iOS device.

KevinE:

NSString implicitly normalized paths whenever it interacts with them, which is what’s causing the core behavior you’re seeing.  NSURL does NOT share this behavior and can be used.  All of the NSURL NSFileManager APIs should work fine, none of the path/NSString APIs should be used.

Seperately, some APIs that take NSURL arguments actually end up extracting the path and then using NSString.  So, for example, while dataWithContentsOfFile doesn’t work for the reason above, dataWithContentsOfURL also fails because it’s not really using NSURL under the hood.  On the other handle, NSFileHandle fileHandleForReadingFromURL (and variants) all work fine.

Thursday, March 23, 2017

Apple Acquires Workflow

Matthew Panzarino (tweet, MacRumors, Hacker News):

Apple has finalized a deal to acquire Workflow today — a tool that lets you hook together apps and functions within apps in strings of commands to automate tasks.

[…]

Workflow the app is being acquired, along with the team of Weinstein, Conrad Kramer, Ayaka Nonaka and Nick Frey. In a somewhat uncommon move for Apple, the app will continue to be made available on the App Store and will be made free later today.

[…]

Apple confirmed the deal, and has said the following about Workflow:

“The Workflow app was selected for an Apple Design Award in 2015 because of its outstanding use of iOS accessibility features, in particular an outstanding implementation for VoiceOver with clearly labeled items, thoughtful hints, and drag/drop announcements, making the app usable and quickly accessible to those who are blind or low-vision.”

It sounds like Apple was more keen on the accessibility than the automation.

Federico Viticci (tweet):

Workflow doesn’t need an introduction on this website. I’ve been covering the app since its debut in 2014, and have been following every update until the last major version, which brought the fantastic addition of Magic Variables. You can catch up on over two years of Workflow reporting and tutorials here, and access even more advanced workflows in our dedicated section on the Club MacStories newsletter.

At this stage, it’s not clear what Apple’s plans for Workflow in the long term might be. I have a few theories, but this isn’t the time to speculate. I’ll say this, though: Workflow has been the driving force behind my decision to embrace the iPad as my primary computer. Workflow is a shining example of the power of automation combined with user creativity and its underlying mission has always been clear: to allow anyone to improve how iOS can get things done for them in a better, faster, more flexible way. Workflow is the modern bicycle for the mind. There’s nothing else like it.

John Gruber:

This certainly provides ammunition against the argument that Apple no longer cares about power users. For me this is Apple’s most intriguing and exciting acquisition in years.

[…]

Doing things the iOS way via Workflow looks cool, but whenever it comes down to it, it always feels easier to me to just wait until I’m at a Mac and create it there.

The other way of looking at this is that perhaps it’s a sign that (a) Apple’s internal efforts are not as far along as we’d hope, and (b) that their plans for automation are more like Automator than supporting a language with inter-process communication. They may want to replace AppleScript on the Mac with something more limited, which would be unfortunate.

Stephen Hackett:

I have a million questions, many hopes and quite a few fears about this.

Michael:

The small, abused optimist in my brain hopes this will turn out as successful as Siri or TestFlight, but the pragmatist is afraid my most productive app on iOS is dead.

David Sparks:

There was another innovative application on the iPhone years ago that Apple purchased called Siri. Once they bought it, the pace of innovation slowed down and while it’s great that the Siri got incorporated into the operating system, there’s a lot of us that still miss the old version that had some crazy new innovative feature with each update. I think there’s a legitimate concern that Apple will do the same with Workflow.

[…]

If, however, Apple absorbs Workflow into the operating system with the intention of bringing real power user tools to iPhone and iPad users, I believe they could go even further than the current third-party version of Workflow. Imagine if Apple created APIs that allowed any app to tap into Workflow’s automation tools. Imagine if we could string together automation steps that allow users to press one button and have five different applications lend a hand to getting work done.

Khoi Vinh:

Unlike many Apple acquisitions, this one was not just a deal for the Workflow team but for the app itself too, which signals that Apple sees value in the product.

[…]

It now seems apparent that Apple intends to make iOS itself more open to Workflow-style automation, not less, and that’s a good thing. The kind of customization that Workflow allows is critical for the iPad, particularly, if it’s to become a true productivity platform.

[…]

When you look at competitors like Amazon’s Alexa platform, Google Assistant, Cortana, etc., they all lack a truly elegant, easy-to-master entryway for casual users who want to customize their experiences—and that’s exactly what Workflow gives Apple. (Though don’t be surprised if these other players acquire Zapier or IFTTT soon as well.)

Guy English:

This is terrific! Congratulations all! We interviewed the Workflow cats a while ago. You can listen to it here.

Gabe Weatherhead:

That doesn’t sound like a company that’s [aggressively] pursuing automation on iOS. [Accessibility] is still a wonderful, and arguably much more important, goal for Apple, but I don’t think it’s a positive move for the people that love the app. Unlike [Panzarino], I think this is bad news for anyone that relies on Workflow to make iOS useful. If all your eggs are in that one basket then you better hurry up and build a new basket. I’d love to be wrong on this front, but I don’t think automation is a priority for Apple or for iOS. The URL support isn’t just languishing on iOS, Apple has actively killed access to some [features] in launcher apps.

Nick Lockwood:

I see Apple’s acquisition of Workflow as further reinforcement of their message that 3rd party extensions of the platform are not welcome.

Most devs who try to build tools to expand the capabilities of iOS get shut down. The ones that don’t get acquired so Apple can control them.

Dr. Drang:

The big question: to incorporate it or to kill it?

Jason Snell:

I’m going to be positive and say that this is Apple acknowledging that this sort of functionality should be core to iOS, and that Workflow (or a successor) could be vastly more powerful if it’s given more power and control than any third-party app ever could. You could, in fact, argue that Workflow is the iOS app that Apple should’ve built itself, but didn’t.

Matt Birchler:

Can you imagine what Workflow could do if it had full access to the OS? I have high hopes for this move 🤞

Ole Zorn:

I hope the @WorkflowHQ acquisition leads to better automation infrastructure on iOS, and not just one privileged app, controlled by Apple.

Michael Rockwell:

I’m not worried about @WorkflowHQ going away, but I am worried about some of their actions that integrate with third-parties disappearing.

Rui Carmo:

Update: and the first post-acquisition update is already out, axing support for Pocket and Google Maps (two of the things I used with it), among others.

One can only hope that Apple has better plans for it than subsuming it and watering it down – at least they’re making it free, but I would very much like to see it evolve into something even more powerful under Apple stewardship, rather than languishing into obscurity…

Trevor Kay:

Lol didn’t take Apple long.

Ryan Burnett:

“Workflow Gallery submissions are no longer supported” 🙁

Marco Arment:

Don’t blame Workflow or Apple for removing Google, etc. actions in last night’s Workflow update.

It was lawyers, not strategy.

A few weeks ago, Workflow asked all supported apps to sign a simple 1-page contract confirming permission to call our URL schemes.

People sue Apple over ANYTHING, ALL THE TIME, so it makes sense for their lawyers to be overly cautious like this in an acquisition.

Steve Mops:

You still can provide honest release notes when you remove functionality.

Previously: Thank You, Sal.

Update (2017-03-24): See also: Accidental Tech Podcast.

Update (2017-03-28): Josh Centers:

One big question about an automation scheme based on app extensions and a Workflow front end is just how powerful it could be. Could it compare to what can be achieved with Automator and AppleScript on the Mac, or would it be closer to Workflow’s current limits?

Update (2017-03-30): Federico Viticci:

Below, you'll find two possible scenarios for Workflow as an Apple app, as well as some considerations on how Apple could evolve Workflow into a native feature of iOS devices and a new developer platform.

Update (2017-04-04): David Sparks:

I agree with Craig Federighi that automation and scripting is “super important” but I’d also remind him that if that is the case, we need more than words right now. WWDC is just a few months away and it sure would be nice to see that Apple is moving the ball forward for automation and scripting.

Update (2017-04-12): Accidental Tech Podcast reports that Workflow Support is telling customers that there will be no further updates to the app.

Update (2017-04-14): Benjamin Mayo:

In the email reply iGeneration shared with 9to5Mac, the Workflow representative left little room for ambiguity. No new features are coming to the app (including no new updates to the gallery of pre-built workflows to choose from).

Wednesday, March 22, 2017

Kindle iOS App Adds “Send to Kindle” Feature

Tim Hardwick:

Amazon has added a long-awaited Pocket-style read-it-later feature to its Kindle iOS app that allows users browsing the web to send articles to their Kindle device for offline reading.

Amazon has offered desktop Chrome and Firefox browser extensions to feed into its Send to Kindle feature for some time, but the company had not offered a Safari-compatible iOS solution until now.

This is a good feature to have, even though I already use Instapaper, because sometimes I want to send one particular article right now. Plus, it’s easier for people who don’t already use a reading service. It also works in other apps besides Safari, and you can set it not to save the document in the cloud (so you don’t have to clear it out later).

It’s shocking that this took so long, but Amazon doesn’t seem to care that much about its iOS or Mac apps. Despite the more advanced iOS platform, the iOS Kindle app has fewer features and views than an actual Kindle. Collections-related features are particularly lacking and buggy, whereas they work perfectly from Amazon’s hardware.

Sellers Printing Counterfeit Books and Selling Under Amazon’s Brand

Bill Pollock (via Hacker News):

Images of counterfeit copies of Python for Kids being sold on Amazon. Legit copies are thicker, color, layflat binding, nicer paper.

Unfortunately, these counterfeits come directly from Amazon’s inventory. Not from a third-party seller.

Previously: Amazon Selling Fake Apple Chargers and Cables, Amazon’s Chinese Counterfeit Problem Is Getting Worse.

XCTest Closure Based Expectations

Giovanni Lodi:

XCTest provides a method to generate an expectation that will fulfil based on the result of an NSPredicate, expectation(for:, evaluatedWith:, handler:).

Add to that the fact that NSPredicate can be initialized with a closure to evaluate, and now you have a recipe for a closure based expectation.

Seriously, Google, Can You Just Make Exact Match Exact?

Daniel Gilbert:

A few years ago (2014), Google eliminated advertisers’ ability to exclude close variants as part of “exact match,” and they got away with it. People were angry. The industry suffered a blow. But people gradually moved on.

Now they’re messing with exact match again, but this time they’ve gone too far.

In the new exact match universe, an “exact match” can include close variants of the keywords and can also include the same words, but in an entirely different order. Google is denying the importance of syntax, at the expense of the industry and, ultimately, itself.

The article is about AdWords, but the general Google Web search seems to also find matches that don’t actually contain the quoted words in sequence.

Why Large Companies Acquire Small Companies

Jason Cohen:

Large acquirers don’t care about small-company financials because mathematically those won’t affect the growth or value of the acquirer.

[…]

Rather, buyer behavior is rooted in their strategy — a combination of product thesis, their theory of their market’s evolution, how they need to position for customers and against competitors, their long-term brand development, geographic expansion plans, and so on.

[…]

Pundits couldn’t agree how to analyze the sale of Instagram to Facebook. It was said that Facebook drastically overpaid (a billion dollars for a company with fanatical users but zero revenue) but also that that Instagram was stupid to sell so early (because after more “inevitable” growth it would be worth much more, and would “inevitably” be bought or go public at that larger valuation).

Monday, March 20, 2017

Parallels Desktop Lite

Rich Trouton notes that Parallels Desktop Lite is now available in the Mac App Store. This is possible because it uses the Hypervisor framework instead of kernel extensions. So it runs in the sandbox, and you get these weird little alerts—which don’t look official, but I guess they must be—that it wants access to various parts of your system, such as “EFI”.

It’s free to run Mac and Linux VMs, and there’s a $60 In-App Purchase to run Windows.

None of the limitations compared with the Standard Edition seem to affect me. It was easy to install both macOS 10.12 and Mac OS X 10.11 by dragging and dropping the installer app—no need to create a bootable installer volume. After installing the Parallels Tools, I could copy and paste back and forth with the host OS.

It feels a bit slower than VMware to me.

Previously: VMware Fusion, Parallels Desktop 9 and Parallels Access, Turning Off Ads in Parallels.

Apple’s Next Big Thing: Augmented Reality

Mark Gurman (Hacker News):

Tim Cook has talked up a lot of technologies since becoming Apple Inc.’s chief executive in 2011. Driverless cars. Artificial intelligence. Streaming television. But no technology has fired up Cook quite like augmented reality, which overlays images, video and games on the real world. Cook has likened AR’s game-changing potential to that of the smartphone. At some point, he said last year, we will all “have AR experiences every day, almost like eating three meals a day. It will become that much a part of you.”

The technology is cool, but I just don’t see AR glasses being useful to most people most of the time.

People with knowledge of the company’s plans say Apple has embarked on an ambitious bid to bring the technology to the masses—an effort Cook and his team see as the best way for the company to dominate the next generation of gadgetry and keep people wedded to its ecosystem.

Too bad there’s no bloody ROI in an ambitious bid to fix their bug-ridden software.

But Apple really has no choice, says Gene Munster, a founding partner at Loup Ventures who covered the company for many years as an analyst. Over time, Munster says, AR devices will replace the iPhone. “It’s something they need to do to continue to grow,” he says, “and defend against the shift in how people use hardware.”

I don’t believe that.

HyperCardPreview

Pierre Lorenzi (via Stephen Hackett):

HyperCardPreview is an Mac OS X application that can display HyperCard stacks, with an look very faithful to the original. It makes the stack files alive again in the Finder with their real icons, so they don’t appear as “binaries”, and provides a QuickLook plug-in.

It can only visualize the stacks: it can’t modify them, and it can’t execute them. But it lets the user inspect the stacks, backgrounds, cards, buttons and fields, see theirs scripts and get their text contents.

It’s written in Swift, without using any deprecated APIs.

Building a Hackintosh Pro

Dan Counsell (tweet, Hacker News):

If Apple made a mini tower that was upgradable and could take a full sized graphics card (or two), I’d have purchased it in a heartbeat. However, they don’t. There’s no doubt that Apple has a refresh for the desktop market in the works, I just don’t know if it’s going to be enough to satisfy the creative market who seem to be slowly migrating to Windows.

[…]

Building a Hackintosh is not for everybody. It’s not a simple process, there is an overwhelming number of parts to choose from, and on top of this you need to pick the ones that are compatible. When you’ve built the machine you need to get macOS running on it, it’s not a quick process. If you want to do it, do your research and take your time. I’d probably say this build took me around 8 hours from unboxing the components to getting macOS installed.

I’ve been running this machine for a couple of weeks now and I couldn’t be happier. It’s super fast and I can easily switch between Mac and Windows. I’ve switched off auto-updates in Sierra. While system updates should work just fine, I prefer to hold off until the community over at tonymacx86 have confirmed there are no issues. This is probably one of the major drawbacks to running a Hackintosh.

Michael Rockwell:

The performance this machine was able to achieve, at the price he paid, is staggering. On single-core tasks, it’s faster than any Mac Apple currently sells and, if you forgo all the bells and whistles, it can be built for about $1,800.

Previously: Video Pros Moving From Mac to Windows for High-End GPUs, Building My $1,200 Hackintosh.

Update (2017-03-20): See also: Stephen Hackett, Kirk McElhearn.

Update (2017-03-22): Dave Mark:

Have your heart set on a speedy new Mac Pro? Given that nothing appears to be on the horizon from Apple, your best bet is to build your own Hackintosh.

[…]

I’d also make your way through both of the Dan case studies above just to get a sense of the process and, most importantly, to understand the caveats that come with building a Hackintosh.

Update (2017-05-06): Joshua Nozzi:

I was considering a desktop. I didn’t want to wait (and pay premium prices) for Apple’s promised “sometime in a year or so” modular Mac Pro. I also didn’t want to spend a shit-ton of money on a still-highly-valued used Mac Pro from 2013 with specs easily outdone by a modern PC for half the price. So I “innovated” (by copying instructions read by more enterprising individuals.

Update (2018-08-16): Martin Hering (via Aaron Pressman):

After Apple showed us the future of professional hardware with the iMac Pro, I was fed up with the situation and I started to investigate the possibility of building my own Hackintosh. Putting all the hardware together was the easy part, making macOS work was tough, but I did it.

Looking back on 7 months working with, it I don’t regret it at all. I was able to put 2 extra SSDs and 2 extra big hard disks into it (imagine how fast Time Machine is), added a beefy graphics card and recently installed a Blackmagic DeckLink SDI 4K PCIe card. And all that internally in an unobtrusive tower case that sits under my desk and hides the bulk of cables inside it. PCIe… I can’t really understand, why Apple really has NO hardware in its line up that supports adding PCIe cards. There is so much great hardware available on the market that is inaccessable to Macintosh customers. Boggles my mind.

Complexity and Strategy in Microsoft Office

Terry Crowley (via Simon Willison):

Unfortunately, [FrontPage’s] Preview view ended up being a gift that kept on giving. The complexity it introduced had nothing to do with any failure in the initial programming of the feature. The challenges were that as we added new functionality, Preview required special consideration — additional specification — about how it should behave and interact with these new features.

[…]

When the Word team went to estimate the cost of these features, they came back with estimates that were many times larger than PowerPoint’s estimates. Some of this cost was because the PowerPoint code architecture was better structured to add these types of visual features. But the bulk of the growth in estimates was because Word’s feature set interacted in ways that made the specification (and hence the implementation) more complex and more costly.

[…]

What I found is that advocates for these new technologies tended to confuse the productivity benefits of working on a small code base (small N essential complexity due to fewer feature interactions and small N cost for features that scale with size of codebase) with the benefits of the new technology itself — efforts using a new technology inherently start small so the benefits get conflated.

[…]

The framework typically fails to evolve along the path required by the product — which leads to the general advice “you ship it, you own it”. This means that you eventually pay for all that code that lifted your initial productivity. So “free code” tends to be “free as in puppy” rather than “free as in beer”.

[…]

In fact, it was clear that [Google Docs was] using an asymmetric technical attack of leveraging their simplicity to deliver sharing and co-editing features. These features were clearly differentiated and would be immensely hard to deliver on top of the existing highly functional (large N) Office apps. As we started building the web apps, we needed to decide whether we were going to “walk away” from our own complexity like we had when we developed OneNote or embrace the existing complexity, with the costs and constraints that that would imply for future development.

Friday, March 17, 2017

Rotate to Pixel Zoom

Keir Thomas:

Now repeat all the above, but this time rotate the image back to the way it was (that is, you’ll need to tap the rotate button three times). Tap Done.

Main feature illustration You will now be able to zoom into the image via the pinch-expand gesture, and will be able to keep going all the way down to pixel detail – although the pixels will be blurred because of the way iOS handles zoom.

Google Home Now Testing Audio Ads

Katyanna Quach (via John Gruber):

Promos for Disney’s new Beauty and the Beast flick, released in American cinemas today, are being mixed into Google Home’s responses to questions. In a test with a Home owned by a Reg writer, the chatbot device started touting the kids movie in between telling the time and news headlines. This is with the default configuration: no opt-ins or opt-outs.

[…]

Google’s official response to this is absolutely pants-on-head mad:

This isn’t an ad; the beauty in the Assistant is that it invites our partners to be our guest and share their tales.

Nick Heer:

I don’t care how much storytelling tinsel an advertisement happens to be wrapped in — an ad is an ad.

I looked through Google’s support documentation for Home and even downloaded the app looking for anything that would specifically state that the device could be used for advertising. Nothing on the Google Home website implies that ads would start running on the device.

Update (2017-03-20): Nick Heer:

Disney may not have paid Google to tell Home users about their new movie, but that’s what it felt like to a lot of people.

Netflix to Replace Star Ratings With Thumbs Up/Down

Tim Hardwick (via Luc Vandal, Hacker News):

Previous star ratings given by users will be used to personalize their Netflix profiles, but the ability to rate a TV series or movie by awarding stars is set to disappear altogether, according to Variety.

[…]

According to Netflix, at one point subscribers had awarded over 10 billion 5-star ratings and more than half of all members had rated more than 50 titles. However, the company eventually concluded that star ratings had become less relevant, with some users giving documentaries 5 stars and silly movies just 3 stars, even though they would watch the silly movies more often than the highly rated documentaries.

Janko Roettgers:

“We are addicted to the methodology of A/B testing,” Yellin said. The result was that thumbs got 200% more ratings than the traditional star-rating feature.

I don’t think people agree on what a rating is supposed to mean, anyway. Secondly, the thumbs aren’t really a binary system because you can choose not to rate at all. So it seems to me that they’re effectively just getting rid of the 2- and 4-star options.

Update (2017-03-19): Jeff Johnson:

I think movies should be rated by how many times you’d watch them. 0 if you regret watching, 1 for a decent movie, and going up to infinity.

Update (2017-03-20): John Gruber:

For a personally curated collection, 5-star ratings can be meaningful. But for a recommendation service that averages ratings among all users, they are not. It’s the difference between designing for the ideal case of how people should behave versus designing for the practical case of how people actually behave.

Kirk McElhearn:

Binary ratings make a lot more sense in certain contexts, and with YouTube, it’s a natural fit. You don’t rate a movie on YouTube; you generally rate a cat video, a TED Talk, or something short.

I disagree that this type of rating will work on Netflix.

Update (2017-04-27): Jason Snell:

So in an act of defiance against the old order, the web ended up embracing one of the old order’s failings—the arbitrary five- or ten-point scale for rating things. Now you, too, can invent your own personal code for the films you see or the products you buy. The problem is that there’s no one right way to make a ratings system. At Macworld, we had a rubric for reviewers to follow that instructed them what all the ratings levels meant, because we wanted our ratings to be consistent. I could gauge the sentiment of a review by reading it, and equate that to a number.

[…]

Siskel and Ebert had it right. The two critics were forced to provide star ratings for their newspapers, but when they created their own TV movie-reviews show, they famously boiled the whole thing down to thumbs up and thumbs down. And they were critics who reviewed hundreds of films a year! If it was good enough for them, it’s good enough for the rest of us—and for the algorithms fed by our sentiment.

Making an External Display a Monitor, Not a TV

Erica Sadun:

What I didn’t expect was how awful the text looked on it. I hooked up the monitor to the MBP using my Apple TV HDMI cable. The text was unreadable. I use similar TV-style monitors for my main system and they display text just fine. However, I’m using normal display ports and cables for my mini. This is the first time I’ve gone HDMI direct.

[…]

All the searches lead to this ruby script. The script builds a display override file containing a vendor and product ID with 4:4:4 RGB color support. The trick lies in getting macOS to install, read, and use it properly. That’s because you can’t install the file directly to /System/Library/Displays/Contents/Resources/Overrides/ in modern macOS. Instead, you have to disable “rootless”.

System Level Breakpoints in Swift

Daniel Jalkut (tweet):

So, as a rule, Swift programmers who want to be advanced debuggers on iOS or Mac platforms, also need to develop an ability for mapping Swift method names back to their Objective-C equivalents. For a method like UIView.layoutSubviews, it’s a pretty direct mapping back to “-[UIView layoutSubviews]”, but for many methods it’s nowhere near as simple.

[…]

If the API has been rewritten using one of these rules, it’s almost certain that the Swift name of the function is a subset of the ObjC method name. You can probably leverage the regex matching ability of lldb to zero in on the method you want to set a breakpoint on[…]

Thursday, March 16, 2017

Foundation Swift Archival & Serialization Proposal

Itai Ferber et al. (via Swift Evolution):

Foundation’s current archival and serialization APIs (NSCoding, NSJSONSerialization, NSPropertyListSerialization, etc.), while fitting for the dynamism of Objective-C, do not always map optimally into Swift. This document lays out the design of an updated API that improves the developer experience of performing archival and serialization in Swift.

Specifically:

  • It aims to provide a solution for the archival of Swift struct and enum types
  • It aims to provide a more type-safe solution for serializing to external formats, such as JSON and plist

Dell Precision 5520

Daniel Rubino (via Steve Lubitz):

The Precision 5520 was supplied by Dell for this review. It features a 4K IGZO display, 32GB of RAM, Intel Xeon processor, NVIDIA Quadro graphics and 512GB of Class 50 solid-state drive (SSD).

The starting price for the Precision 5520 is $1,399. The unit we evaluated in this review retails for $2,867.

It also has room for a second hard drive or SSD, real function keys, a T arrow key arrangement, and a trackpad that clicks. It is about the same weight as the 2012 Retina MacBook Pro and gets the same battery life (7 hours).

The most similar Mac is a $3,099 MacBook Pro with a lower resolution display, 16 GB of RAM (max), a 2.9 GHz i7, and a Radeon Pro 460.

Previously: The Curious State of Apple Product Pricing, New MacBook Pros and the State of the Mac.

Swift Compiler Not Optimized for Lots of Cores

Jacek Suliga (via Peter Steinberger):

When LinkedIn embraced Swift and rebuilt its flagship iOS app using (mostly) Swift, I spent a good amount of time profiling the new compiler characteristics. At that time (mid 2015), it was clear that the compiler was CPU-bound (I/O and memory had no visible impact on build speed). However, the build times were determined primarily by the number of cores and threads available to the compiler, more so than by the CPU clock speed.

Based on this analysis, we decided to use 12-core MacPros for core development, and we saw a significant (2-3 times) speedup of our builds compared with quad-core laptops.

But now:

As you can see, 12-core MacPro is indeed the slowest machine to build our code with Swift, and going from the default 24 jobs setting down to only 5 threads improves compilation time by 23%. Due to this, even a 2-core MacMini ($1,399.00) builds faster than the 12-cores MacPro ($6,999.00).

[…]

For machines with more than 4 cores consider reducing number of concurrent jobs allowed for Xcode - until the concurrency issue described above has been resolved.

Marc Knaup:

Be careful with disabling Spotlight indexing for ~/Library/Developer as it will also exclude dSYM symbol files of builds and archives.

Xcode uses Spotlight to search for matching dSYM files when symbolicating crash reports. Turning off Spotlight indexing for them might break crash symbolication completely.

Update (2017-03-16): Joe Groff:

This smells like a hardware or kernel issue.

Blaming any particular component is premature. “There Is A Bug Exposed By Swift 3 Running on Sierra” is all we know.

Core count doesn’t seem to matter either, we observed the same issue on 4-core Xeon setups. Seems to be Xeon-specific.

The bug report is here.

See also: Colin Cornaby.

Update (2017-12-13): Joe Groff:

The bug is fixed. Radar for closed but Jira wasn’t updated to match.

Guetzli: A New Open Source JPEG Encoder

Robert Obryk and Jyrki Alakuijala:

Guetzli [guɛtsli] — cookie in Swiss German — is a JPEG encoder for digital images and web graphics that can enable faster online experiences by producing smaller JPEG files while still maintaining compatibility with existing browsers, image processing applications and the JPEG standard. From the practical viewpoint this is very similar to our Zopfli algorithm, which produces smaller PNG and gzip files without needing to introduce a new format; and different than the techniques used in RNN-based image compression, RAISR, and WebP, which all need client and ecosystem changes for compression gains at internet scale.

[…]

Guetzli specifically targets the quantization stage in which the more visual quality loss is introduced, the smaller the resulting file. Guetzli strikes a balance between minimal loss and file size by employing a search algorithm that tries to overcome the difference between the psychovisual modeling of JPEG's format, and Guetzli’s psychovisual model, which approximates color perception and visual masking in a more thorough and detailed way than what is achievable by simpler color transforms and the discrete cosine transform.

Previously: Brotli, Zopfli, JPEG Image Compression, Lepton Image Compression.

Update (2017-03-22): John Gruber:

There is, of course, a catch. Image processing is really slow. It takes about 8 minutes for Guetzli to process a single iPhone camera image on my 5K iMac.

Wednesday, March 15, 2017

The Curious State of Apple Product Pricing

Neil Cybart:

Given the preceding list, a strong case could have been made for Apple to price its new wireless headphones at $249, or even $299. The fact that Samsung priced its Gear IconX at $199 seemed to suggest a sub-$200 retail price for AirPods was unlikely. Instead, Apple sent shockwaves pulsing through the market by pricing AirPods at only $159. The action instantly removed all available oxygen from the wireless headphone space. The idea of Apple coming out with a new product that would underprice nearly every other competitor was unimaginable ten years ago.

[…]

At $269, Apple Watch Series 1 is one of lowest-priced smartwatches worth buying in the marketplace. Attractive pricing was one key factor driving record Apple Watch sales this past holiday quarter. In fact, even the Apple Watch Series 2, at $349, is one of the lowest-priced smartwatches in its class[…]

However, it seems like most Mac models are not as competitively priced right now, Apple is focusing on the high end of the tablet market, and it sounds like iPhone prices will be expanding up rather than down.

Update (2017-03-17): See also: MacRumors.

John Gruber:

AirPods are still showing a delivery estimate of “6 weeks”. Either demand remains unexpectedly strong or production remains unexpectedly difficult (or some combination of both).

That One Optional Property

Soroush Khanlou:

Other code in the view controller switched on the message’s existence to determine which views to allocate, how to lay them out, and so on. The optionality of the property represents more than existence of a simple string. It had implications in the rest of the view controller and the rest of the view layer.

The more essential point here is that the string now no longer represents a string that might be there or might not — it now represents the presentation style or mode that the view controller is in. Was it created in the context of a push notification or through normal browsing? The answer is in this barely related property!

His solution is to replace it with an enum or a promise, both of which have other benefits besides clarity.

Allo Can Reveal What You’ve Searched For

Tess Townsend:

A unique feature of Allo is that you can use Assistant while in the middle of a conversation with a friend. You could, for example, ask Assistant to search for restaurants in a certain area, while you’re talking to a friend about where to eat.

But Assistant isn’t perfect, and sometimes it responds with answers unrelated to questions at hand, or it will respond with an answer to an earlier question — and it’s then that it can inadvertently reveal a previous search query.

[…]

Google responded to our story: “We were notified about the Assistant in group chats not working as intended. We’ve fixed the issue and appreciate the report.”

Previously: Google Reneges on Allo Privacy Feature.

Looking at Model-View-Controller in Cocoa

Matt Gallagher:

When Cocoa says Model-View-Controller it’s mostly trying to evoke the notion of Separated Presentation and Content in application design (the idea that the model and view should have a decoupled design and be loosely linked at construction). To be fair, it’s not just Cocoa that uses Model-View-Controller in this way: most modern uses of the term are really intended to convey Separated Presentation rather than the original Smalltalk-80 definition.

[…]

The important point to note is that the controller is the center of the object graph with most communication passing via the controller – distinct from the Smalltalk-80 version where the model was the center of the graph.

[…]

In my opinion, the critical failing for Cocoa Bindings remains the difficulty in adding custom transformations and custom properties. These could both be done but the work involved in registering transformers and exposing bindings dictionaries made a tiresome affair. It always just seemed easier to pass the data through the view controller without bindings. This meant that Bindings tended to help the simplest problems (that didn’t need much help) but didn’t have much impact on the harder problems.

Since Cocoa Bindings in Mac OS X 10.3, there haven’t really been any clear attempts by Apple to alter the design pattern used for Cocoa apps.

Marcel Weiher:

The problem with using the same name is shadowing: since the names are the same, accessing the original definition is now hard. Again, this wouldn’t really be a problem if it weren’t for the fact that the old MVC solved exactly the kinds of problems that plague the new MVC.

Previously: Model Widget Controller (MWC) a.k.a.: Apple “MVC” Is Not MVC.

The Story of Firefox OS

Ben Francis (Hacker News):

During this five year journey hundreds of members of the wider Mozilla community came together with a shared vision to disrupt the app ecosystem with the power of the open web. I’d like to reflect on our successes, our failures and the lessons we can learn from the experience of taking an open source browser based mobile operating system to market.

[…]

In a rush to get to market we imitated the app store model with packaged apps, adding to the problem we set out to solve. Lost focus on what makes the web the web (URLs). Too much focus on the client side rather than the server side of the web stack.

[…]

After realising “open” on its own doesn’t sell, ultimately chose a strategy to compete mainly on price, which is just a race to the bottom. Suffered from a lack of product leadership and direction after the initial launch.

Tuesday, March 14, 2017

RxNot

Chris Adamson:

It’s not like iOS isn’t meant to deal with asynchronous events. In fact, it has lots of different techniques… all mutually incompatible, owing to the long development of the Cocoa and Cocoa Touch APIs over the years, and the legacy of Objective-C.

[…]

So now let’s look at how ReactiveX deals with this. In Rx, things that change over time are offered as observables. […] So, where’s the rub? For starters, it takes a long time to get the hang of Rx, both to get into its mindset (it sucks when you just need to get the current value of something, but it’s an observable, so there’s no real concept of a “current” value). And then there are all the operators. Follow that link to the operators that I linked a few paragraphs back. There are over 70 of them.

[…]

In practice, there are lots of ways to mess this up. Are you right to only want one event? What if you forget to capture self weakly? The worse problem is when your closure is never called: setting breakpoints in this code will do nothing, so it’s a hair-pulling exercise to figure out if fooObservable is not producing events, or if your chain is screwing them up somehow.

[…]

In my experience, Rx turns out to be far more costly than it would originally appear from the propaganda. I can’t speak for my ex-employer of course, but my own takeaway is that 1) adopting Rx can take way longer than you’d expect, 2) RxSwift seems to really slow down the Swift compiler (possibly because of having to do a bunch of type inference through those chains of Rx operators).

Mark Lilback:

I don’t buy the idea of replacing everything with it. But use the right tool for the right job. For chained operations it is better than promises/futures and much better than callbacks/closures.

How to Set Up and Use Airline Boarding Passes in Wallet

Adam C. Engst:

I’m sure many of you are nodding your heads in agreement, or wondering why I’m telling you all this. I’m no frequent flyer, so I’m sure that these improvements have been obvious to road warriors for a while. But I wanted to document how to do all this because I saw a lot of people still relying on paper boarding passes on that last trip. The experience of relying on an iPhone is so good, and so much better than dealing with paper, that if you’ve avoided it so far, I urge you to give it a try next time. But feel free to print a paper boarding pass as a backup until you’re comfortable with using your iPhone instead!

[…]

At the end of the check-in process, the apps I’ve used have provided a relatively clear Add to Wallet link or button. Tap it, and when it hands you off to Wallet, make sure everything looks correct in the boarding pass and then tap the Add link in the upper-right corner. You may or may not need to do this for each boarding pass; check to see what’s in Wallet after the first one. Now you’re ready for when you go to the airport.

I’d still want a paper copy in case my iPhone spontaneously shuts down. Also, sometimes they won’t let you swipe the pass yourself, and I don’t want to hand my iPhone to the attendant. I admit to not really appreciating the benefit of Wallet here. It’s an extra step to use, but then you can access the boarding pass from the lock screen instead of having to open the app. And maybe it saves you from having to rely on the airline app at the critical moment? I’ve twice had an airline app stop working after arriving at the airport but before boarding. So now I always take a screenshot of the boarding pass just in case.

Eject from Interface Builder

Eject (via Brian King):

One common pain point with Interface Builder is that as a view becomes more dynamic and is managed more programatically, Interface Builder becomes less helpful. This tool lets developers use Interface Builder without that concern, giving them an Eject button to hit when Interace Builder starts getting in the way, and provides an easy path to transition to full programatic view layout.

Previously: Working Without a Nib.

Dropbox Drops Public Folders

Josh Centers:

On 15 March 2017, Dropbox will convert all Public folders on free accounts to private folders, breaking existing links. Dropbox now recommends using a shared folder or shared link for sharing files with others. Dropbox Plus and Dropbox Business users can continue to use the Public folder until 1 September 2017.

[…]

Although it’s annoying to lose the Public folder and its HTML rendering capability, Dropbox remains useful because it’s integrated so well into the Mac and iOS experience, and it just works.

Although, some of its recent behavior has been troubling. I just want a basic folder that syncs and doesn’t peg my CPU when there’s filesystem activity in an unrelated folder.

Previously: Dropbox Discontinues HTML Rendering.

Stop Auto-Play Web Videos

Kirk McElhearn:

Auto-play videos suck. They use bandwidth, and their annoying sounds get in the way when you’re listening to music and open a web page. I happen to write for a website that uses them, and it annoys me to no end. (My editors have no control over those auto-play videos, alas.)

But you can stop auto-play videos from playing on a Mac. If you use Chrome or Firefox, it’s pretty simple, and the plugins below work both on macOS and Windows; if you use Safari, it’s a bit more complex, but it’s not that hard.

To do the whole thing from Terminal:

defaults write com.apple.safari WebKitMediaPlaybackAllowsInline 0
defaults write com.apple.safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback 0

(Or substitute com.apple.SafariTechnologyPreview.)

Jason Snell:

I fought for six months to get those [videos] turned off. When I left, they turned ’em right back on.

Monday, March 13, 2017

Sketch’s Open File Format

Jasim A Basheer (via Andy Matuschak):

“enables more powerful integrations for third-party developers” is stating it lightly. This is what the fine folks at Bohemian Coding has done — they opened up Sketch’s file format into a neat JSON making it possible for anyone to create and modify Sketch compatible files.

[…]

Can you imagine what kind of new things will now be possible? One word: design automation (okay, two words!).You want Artboards that showcase a font and its variations, like a Google Fonts page? There’s probably going to be a script to generate that file. There will be websites from which you can download freshly brewed Sketch files based on what you ask — say an image gallery, or a landing page, or a signup form. You’ll be able to pick your brand colors, choose a theme, randomize it, and voila! you have a Sketch design to start playing with. Someone could even build a Sketch equivalent that runs on the browser. The possibilities are many!

[…]

And Sketch itself comes with an in-built REPL where anyone can whip up a plugin in no time, and just hit Save to package it into a distributable plugin. There is nothing extra to do — it is all in the app. This makes it very easy for users of Sketch to get started with plugin development, and they happily take the bait!

[…]

But I wanted to make a point with all this: even though plugin development is undocumented and painful, developers still build crazy useful things on top of it.

What Twitter Means to Me

Ricky Mondello:

When I was in high school in a small town in upstate New York, I didn’t really have anyone around to help develop or even share my interest in technology with. Twitter was my connection to the world I wanted to live in. Although I’d been a member of several forums in the past, I liked Twitter more than any forum because there was no pretense of being limited to any particular topic. In 2008, Twitter was accessible on my iPod touch in a way that other communities weren’t. From that iPod, I followed people who talked about Mac software, making web pages, podcasting, and politics, and that stream of information helped me figure out what I wanted to do with my future.

[…]

What started as a way for me to fill a void in the types of people I knew in “real life” changed as I left that small town. Today, Twitter is how I get my news.

Previously: Anil Dash’s Advice for Twitter.

Update (2017-03-20): See also: Stephen Hackett.

Sierra Logging Spew

Lloyd Chambers:

Opening Console, you’ll see the ceaseless spew from a cornucopia of processes, including many I never want, and will never use. It might be ‘quiet’ at times, but what I’ve found is that a number of Apple services get triggered from time to time to go into a state of endless bitching and moaning, often with messages that equate to “fix this bug someday”.

For example, here is this lovely new Apple bug involving touchui. On a Mac Pro no touch user interface exists, but the engineers at Apple don’t bother to test much any more, so the com.apple.nowplayingtouchui apparently is just going to fail forever.

The spew has been getting worse the last few versions of macOS, and it’s also more of a problem with 10.12 and its new logging subsystem. I’m running into more cases of runaway logging where the same message is repeated multiple times per second. Not only does this hog the CPU, but Console falls behind so that (even with a filter to hide the spew) it can take minutes for actual, relevant log entries to show up. The only remedy seems to be to restart the Mac.

Previously: Sierra Log Littering.

A Look Inside Backblaze

Backblaze (via Hacker News):

Files can be written to the Vault even if a Storage Pod is down with two parity shards to protect the data. Even in the extreme — and unlikely — case where three Storage Pods in a Vault are offline, the files in the vault are still available because they can be reconstructed from the 17 available pieces.

[…]

We use Reed-Solomon erasure encoding. It’s a proven technique used in Linux RAID systems, by Microsoft in its Azure cloud storage, and by Facebook too. The Backblaze Vault Architecture is capable of delivering 99.99999% annual durability thanks in part to our Reed-Solomon erasure coding implementation.

[…]

We developed our Reed-Solomon implementation as a Java library. Why? When we first started this project, we assumed that we would need to write it in C to make it run as fast as we needed. It turns out that modern Java virtual machines working on our servers are great, and just-in-time compilers produces code that runs pretty quick.

Yev Pusin:

Yes we do plan on expanding to more datacenters, and we do have emergency plans in place, though we do choose our datacenters carefully to make sure that we avoid any natural-disaster prone areas. As for backing up our own data - we certainly do make backups of our core info/necessary data. As for the user data that we store, that’s backed up across the storage pods in a vault as discussed in that post. We do not replicate customer data across multiple datacenters. At our price-point, that’s just not feasible.

Encrypted Media Extensions (EME)

Glyn Moody (Reddit):

For the last four years, the Web has had to live with a festering wound: the threat of DRM being added to the HTML 5 standard in the form of Encrypted Media Extensions (EME). Here on Techdirt, we’ve written numerous posts explaining why this is a really stupid idea, as have many, many other people. Despite the clear evidence that EME will be harmful to just about everyone -- except the copyright companies, of course -- the inventor of the Web, and director of the W3C (World Wide Web Consortium), Sir Tim Berners-Lee, has just given his blessing to the idea[…]

Tim Berners-Lee:

The question which has been debated around the net is whether W3C should endorse the Encrypted Media Extensions (EME) standard which allows a web page to include encrypted content, by connecting an existing underlying Digital Rights Management (DRM) system in the underlying platform. Some people have protested “no”, but in fact I decided the actual logical answer is “yes”.

[…]

The reason for recommending EME is that by doing so, we lead the industry who developed it in the first place to form a simple, easy to use way of putting encrypted content online, so that there will be interoperability between browsers.

[…]

If W3C did not recommend EME then the browser vendors would just make it outside W3C. If EME did not exist, vendors could just create new Javascript based versions. And without using the web at all, it is so easy to invite ones viewers to switching to view the content on a proprietary app. […] If the Director Of The Consortium made a Decree that there would be No More DRM in fact nothing would change. Because W3C does not have any power to forbid anything.

Anne van Kesteren:

The fact that the CDM (DRM code in the article) is not part of the standard means the promise of interoperability is false.

And the fact that CDM sandboxing is not defined means you allow for a race to the bottom in terms of end-user security.

Peter Bright:

EME does not specify any DRM scheme per se. Rather, it defines a set of APIs that allow JavaScript and HTML to interact with decryption/protection modules. These modules will tend to be platform-specific in one way or another and will contain the core DRM technology.

[…]

The EFF, along with the Free Software Foundation (FSF) and various other groups, has campaigned against the development of the EME specification. They signed an open letter voicing their opposition and encouraged others to sign a petition against the spec.

[…]

However, it’s not clear that EME does anything to exacerbate that situation. The users of EME—companies like Netflix—are today, right now, already streaming DRM-protected media. It’s difficult to imagine that any content distributors that are currently distributing unprotected media are going to start using DRM merely because there’s a W3C-approved framework for doing so.

Update (2017-04-22): See also: Richard Stallman (via Hacker News).

Facebook Bots Relearn Early PC Lessons

Sarah Perez (via Farshad Nayeri):

Facebook’s Messenger bots may not be having the impact the social network desired. Just yesterday, online retailer Everlane, one of the launch partners for the bot platform, announced it was ditching Messenger for customer notifications and returning to email. Following this, Facebook today announced an upgraded Messenger Platform, which introduces a new way for users to interact with bots: via simple persistent menus, including those without the option to chat with the bot at all.

One of the problems with Facebook’s bots is that it’s often unclear how to get started. The directory of bots in Messenger wasn’t initially available and now only reveals itself when you start a search in the app. And it hasn’t always been obvious how to get a bot talking, once added, or how to navigate back and forth through a bot’s many sections.

Previously: Bots Won’t Replace Apps.

Friday, March 10, 2017

Making Swift Enums and Structs Equatable

Ole Begemann:

The downside of not having a default case is, of course, more boilerplate to write. […] This isnʼt fun to write, and it would get even worse with more cases. The number of states the switch statement must distinguish grows quadratically with the number of cases in the enum.

[…]

You can make this considerably more manageable with some intelligent application of the _ placeholder pattern. While we saw above that a single default clause is not enough, one pattern per case is.

Ole Begemann:

Unfortunately, like the enum example I talked about in the previous post, this conformance to Equatable is very fragile: every time you add a property to the struct, you have to remember to also update the implementation of the == function. If you forget, your Equatable conformance will be broken, and depending on how good your tests are this bug has the potential to go undetected for a long time — the compiler wonʼt be able to help you here.

[…]

It occurred to me to use the standard libraryʼs dump function as a safeguard. dump is interesting because it uses Swiftʼs reflection capabilities to create a string representation of a value or object that includes all storage fields.

[…]

The biggest drawback of the solution might be that dump is not a perfectly reliable way to determine equality. It should be pretty good at avoiding false negatives, but youʼll probably see some false positives, i.e. values that really are equal but whose dump outputs are different.

Rust’s Language Ergonomics Initiative

Aaron Turon (via Joe Groff, Hacker News):

There are three dimensions of the reasoning footprint for implicitness:

  • Applicability. Where are you allowed to elide implied information? Is there any heads-up that this might be happening?
  • Power. What influence does the elided information have? Can it radically change program behavior or its types?
  • Context-dependence. How much of do you have to know about the rest of the code to know what is being implied, i.e. how elided details will be filled in? Is there always a clear place to look?

The basic thesis of this post is that implicit features should balance these three dimensions. If a feature is large in one of the dimensions, it’s best to strongly limit it in the other two.

The ? operator in Rust is a good example of this kind of tradeoff. It explicitly (but concisely) marks a point where you will bail out of the current context on an error, possibly doing an implicit conversion on the way. The fact that it’s marked means the feature has strongly limited applicability: you’ll never be surprised that it’s coming into play. On the other hand, it’s fairly powerful, and somewhat context-dependent, since the conversion can depend on the type where ? is used, and the type expected in the scope it’s jumping to. Altogether, this careful balance makes error handling in Rust feels as ergonomic as working with exceptions while avoiding some of their well-known downsides.

St. Clair Software Leaves the Mac App Store

Jon Gotow:

For both applications, complying with Apple’s sandboxing and feature constraints to get them approved for sale would have required significant rewrites. And in Jettison’s case, it would also require that buyers download a separate helper app to enable its full functionality. I realize that some people will be put off or inconvenienced by the fact that these apps are no longer in the Mac App Store – my apologies if you’re one of those folks, but it just doesn’t make sense for Jettison and HistoryHound.

Their other two products are App Tamer, which I’ve been meaning to try to reduce Dropbox’s CPU use, and the venerable Default Folder X. Those are probably impossible to sandbox.

Update (2017-03-11): See also: Sip and Videoloupe (via Bad Uncle Leo).

Time Out 2’s Supporter Business Model

David Sinclair:

A year after release, the supporter model is still working well. If you’re not familiar, the basic idea is that someone can download Time Out and use it for free, but some features only work for an hour at a time, as often as they like. So they can try all of the functionality, at their own pace, and decide if the advanced features are useful to them. If so, they can become a supporter for three, six, or twelve months. This permanently unlocks all of the current features as a reward. Even when the supporter period expires, those features remain fully available. So they can choose to extend their supporter status, or just keep using the app without paying any more. Of course, I hope that people do renew, to help fund ongoing sustainable development.

At present, about 9% of people who download Time Out end up purchasing one of the supporter options... which is a reasonable "conversion rate", which can often average more like 5% for normal trial apps. I feel pretty comfortable with that. But I’m also happy that people who choose not to become a supporter can still use a great break reminder tool to help them get or stay healthy.

[…]

Looking at both editions combined, you can see that most of the purchases were through the Mac App Store[…] Again, combining them into one chart, you can see that [revenue is] pretty much neck-and-neck for direct vs Mac App Store, due to the larger slice of the pie that Apple takes.

Playing Jenga With Swift’s Type Checker

Vincent Esche (via Todd Ditchendorf):

One would expect both of these minimalistic programs to be semantically equivalent and thus be handled identically by the compiler, no?

The answer to this question and many more can be found in the Swift project’s official documentation on its “Type Checker Design and Implementation” (emphasis mine):

Swift implements bi-directional type inference using a constraint-based type checker that is reminiscent of the classical Hindley-Milner type inference algorithm. […]

The Swift language contains a number of features not part of the Hindley-Milner type system, including constrained polymorphic types and function overloading, which complicate the presentation and implementation somewhat. On the other hand, Swift limits the scope of type inference to a single expression or statement, for purely practical reasons: we expect that we can provide better performance and vastly better diagnostics when the problem is limited in scope.

[…]

Repeat after me: “Swift limits the scope of type inference to a single expression or statement”.

Thursday, March 9, 2017

Half the AirPods for a Tenth the Price

Adam C. Engst:

I won’t pretend that either of these earbuds is anywhere near as good as Apple’s AirPods. They’re not: their Bluetooth pairing can be annoying, audio quality won’t be as good, battery life is shorter, it’s more difficult to plug in their charging cables, their microphone quality is weak, and neither supports Siri or voice commands. And heck, you only get one, something that AirPods allow but don’t require.

But these earbuds are so cheap that you may not care. I wrote this while at the ASMC Summit, a conference for independent Apple resellers, and when I showed these two little earbuds to one attendee, he said that he didn’t even bring his AirPods to the conference for fear of losing them. Just as the best digital camera is the one in your pocket, the best earbud is the one you have with you.

Also, I’m talking about a category which has many more than these two entrants. When you search for “Bluetooth earbud” on Amazon, you’ll see a variety of comparable products with slightly different industrial designs that you might find more compelling. Some are as cheap as $5, and there’s no reason I can see to spend more than $20 given how similar they look. I wouldn’t expect any of them to last for all that long, and they’d be easy to lose, but a super low price makes up for a lot of sins.

Prior to getting AirPods, I used a Jawbone headset, which had many of the same issues, except that it cost almost as much as the AirPods. Even so, I usually preferred it to wired earbuds. So even if you don’t want AirPods, I recommend giving one of these a try.

Editing App Store Descriptions Now Requires a New Version

Benjamin Mayo:

Overnight, developers have noticed a silent policy change to iTunes Connect interface which does not seem to have been formally announced by Apple.

Developers are no longer able to edit descriptions, update notes or any other metadata for their apps without making a new version, which must be submitted to App Review for approval.

Mark Munz:

Now a mention of sale (promo) on App Store requires TWO separate version updates: first to add it, then to remove it. 🤦

Update (2017-03-10): Benjamin Mayo:

They rolled this back a day later (original post has been updated).

Twitter for iOS Gains New Option for Clearing Cache

Nick Heer:

None of these figures are very large individually but, collectively, I’d conservatively estimate that I have about 1 GB of cached data on my iPhone that could be purged. I wish there were a button in every app’s settings panel to dump old or expired data, but I suspect this is a lot harder than it seems: how can iOS reliably know what’s old and expired?

Every app should implement a Clear Cache feature.

Mozilla Acquires Pocket

Mozilla (MacRumors, Hacker News, Reddit):

Mozilla is growing, experimenting more, and doubling down on our mission to keep the internet healthy, as a global public resource that’s open and accessible to all. As our first strategic acquisition, Pocket contributes to our strategy by growing our mobile presence and providing people everywhere with powerful tools to discover and access high quality web content, on their terms, independent of platform or content silo.

[…]

Pocket brings to Mozilla a successful human-powered content recommendation system with 10 million unique monthly active users on iOS, Android and the Web, and with more than 3 billion pieces of content saved to date.

Pocket:

Pocket will continue on as a wholly-owned, independent subsidiary of Mozilla Corporation. We’ll be staying in our office, and our name will still be on the wall. Our team isn’t changing and our existing roadmap has been reinforced and is clearer than ever. In fact, we have a few major updates up our sleeves that we are really excited to get into your hands in the coming months.

How does Mozilla fit into this equation? They’re adding fuel to our rocketship. We have worked closely with Mozilla as we partnered with their Firefox team, and established a deep trust with their team and vision. They have extraordinary resources, global scale, and reach to put Pocket in more places, and help us build an even better product, faster.

Previously: Pinterest Acquires Instapaper.

How to Crash Safari by Typing Simple Words

Keir Thomas:

There’s a handful of basic words and letters that when typed into the URL field will instantly crash Safari on the Mac. Versions of Safari on iPhone and iPad don’t seem to be affected.

[…]

As mentioned by reader “MB” in the comments below, this bug can be deactivated by turning off Safari suggestions: open Safari’s preferences (Cmd+comma), click the Search tab, and remove the check from the Include Safari Suggestions box.

Wednesday, March 8, 2017

FSMonitor 1.0.2

Matthias Keiser:

FSMonitor is a macOS app that monitors all changes in the file system.

  • Track all changes to the file system, including file creation, deletion, change of content, renames, and change of attributes.
  • Examine the changed files with any of the four provided display modes.

Time to stop using fs_usage directly.

Previously: opensnoop.

Apple Rejecting Apps That Use Rollout

assdass (via Ben Sandofsky, Hacker News):

Just got this message for a few of my apps that are live in the app store (and have been for years).

"Your app, extension, and/or linked framework appears to contain code designed explicitly with the capability to change your app’s behavior or functionality after App Review approval, which is not in compliance with section 3.3.2 of the Apple Developer Program License Agreement and App Store Review Guideline 2.5.2. This code, combined with a remote resource, can facilitate significant changes to your app’s behavior compared to when it was initially reviewed for the App Store. While you may not be using this functionality currently, it has the potential to load private frameworks, private methods, and enable future feature changes.

This includes any code which passes arbitrary parameters to dynamic methods such as dlopen(), dlsym(), respondsToSelector:, performSelector:, method_exchangeImplementations(), and running remote scripts in order to change app behavior or call SPI, based on the contents of the downloaded script. Even if the remote resource is not intentionally malicious, it could easily be hijacked via a Man In The Middle (MiTM) attack, which can pose a serious security vulnerability to users of your app.

Chance Miller:

Apple today has started informing developers that use “hot code push” SDKs that it will soon start rejecting their applications.

[…]

While Apple has yet to publicly comment on the change, the email sent to affected developers seems to imply that services like Rollout.io are the cause.

[…]

It really shouldn’t come as too big of a surprise that Apple is starting to crack down on these type of SDKs. Seeing that they allow changes to be made to an app after App Store review, it’s really a miracle that they have lasted so long in Apple’s generally rather restricted ecosystem. Whether or not this is a good policy on Apple’s part, though, is up for debate.

Rollout:

How can Rollout allow you to push code-level updates to live iOS apps and be fully compliant with Apple’s guidelines? Glad you asked.

[…]

Apple’s guidelines explicitly permit you to push executable code directly to your app, bypassing the App Store, under these two conditions:

  • The code is run by Apple’s built-in WebKit framework or JavascriptCore
  • The code does not provide, unlock or enable additional features or functionality

[…]

Rollout isn’t intended to push new features or functionality. It is meant to tweak or fix them, avoiding the minor releases needed to fix bugs, add logging or tracking, update messages, force users to upgrade, etc.

Nick Lockwood:

Many tweets about Apple rejecting apps using Rollout.io have mentioned React Native, but AFAICT, RN isn’t affected

I can see why people would jump to the conclusion that these rejections are about apps bypassing review, but that may not be the case.

It may be that Apple is more concerned about MITM attacks being used to hijack apps, or dynamic selectors being used to call private APIs.

Jeff Johnson:

App review should just say “We don’t allow Rollout” instead of scaring the shit out of everyone with respondsToSelector and performSelector.

Mike Ash:

The machine doesn’t know or care what’s public and what’s private. There’s no security boundary between the two. Private APIs do nothing that a third-party developer couldn’t do in their own code, if they knew how to write it. The only way Apple can check for private API usage is to have a big list of all the private APIs in their libraries and scan the app looking for calls to them. This is fundamentally impossible to do with certainty, because there’s an unlimited number of ways to obfuscate such calls.

Functionality that needs to be restricted due to privacy or security concerns has to be implemented in a completely separate process with requests from apps being made over some IPC mechanism. This is the only way to reliably gate access.

Apple’s prohibition against using private APIs is like an “employees only” sign on an unlocked door in a store. It serves a purpose, but that purpose is to help keep well-meaning but clueless customers away from an area where they might get confused, or lost, or hurt. It won’t do anything for your store’s security.

Update (2017-03-09): Rollout:

While Apple has not modified its guidelines, it appears that these guidelines are now being interpreted in a more narrow way. We are disappointed that Apple has made this change before we have had an opportunity to address any concerns. We have already reached out to Apple to discuss and are committed to adjusting our offering as needed to remain in compliance under the more narrow interpretation of the guidelines.

Update (2017-03-10): See also: Dave Verwer.

Update (2017-05-19): See also: Peter Steinberger, Colin Cornaby.

Living and Dying on His Own Terms

Ray Holley (via Dori Smith):

Indeed, [Tom] Negrino walked with a bit of a sway, but he went everywhere vigorously and purposefully. He was the author of 48 books, focusing on Macintosh computers and software. He wrote on his website, “I’ve been writing about Macs, other computers and software since dinosaurs ruled the earth. OK, it’s actually been since 1987.”

Negrino was a contributing editor for Macworld Magazine and a leading figure in the Macintosh movement in Southern California, where he met Smith.

Thank you for decades of good writing. Thank you for recommending my software. Best wishes for whatever comes next.

Update (2017-03-08): Negrino’s own announcement from May 2016.

Update (2017-03-09): See also: John Gruber, Kirk McElhearn, Jason Snell.

Update (2017-03-11): See also: Adam C. Engst (tweet).

Update (2017-03-12): See also: Andy Ihnatko.

Update (2017-03-14): See also: John Moltz.

Update (2017-03-15): See also: Jeff Carlson and Dori Smith.

Update (2017-03-16): See also: Jean MacDonald.

WWDC Scholarships Now Include Lodging

Stephen Hackett:

I’m glad to see lodging covered as part of the scholarship. Most of the time, the WWDC ticket itself is not the most expensive thing about the trip.

Bravo. When I attended WWDC on a student scholarship (in 2002, coincidentally the last year in San Jose), lodging was not included. However, Apple did book an inexpensive hotel, within walking distance, and arrange roommates. With triple occupancy, the lodging ended up being only about $250 per person for the whole week. Most of the food was included, so the main costs were airfare and ground transportation from/to SJC (not far).

Sierra Bluetooth Problems and the Logitech K811 Keyboard

Ever since updating to macOS 10.12.2, my MacBook Pro has had horrible problems with Bluetooth. Multiple times per day, the keyboard disconnects. Sometimes it reconnects automatically a few seconds later. Sometimes it reconnects only after I power cycle it or toggle Bluetooth. Sometimes to get it to reconnect I have to reset the Mac’s Bluetooth module by holding down the Option and Shift keys (on the internal keyboard, natch) to access the Debug submenu of the Bluetooth menu bar icon. And sometimes all that fails and I have to reboot the Mac.

At first I thought this was due to a hardware problem with my original aluminum Apple keyboard. I had been able to extend its life by making better connections to the batteries, but power problems with this model seem to be common, and eventually something inside of it breaks.

Liking the keyboard’s feel, but tired of dealing with the AA batteries, I replaced it with a Magic Keyboard (Amazon). I ended up liking the Magic Keyboard slightly less, as it’s flatter, it’s harder to feel the edges of the keys, and the left-right arrow keys are harder to find because they aren’t half-size.

More importantly, the Magic Keyboard also would disconnect all the time. Sometimes it would reconnect and think that a key was stuck down. I’d see the same letter repeat for several lines, or see several lines of text delete one character at a time. Still suspecting a hardware problem, I reported these problems to Apple Care. After ruling out Wi-Fi as a cause and also reproducing the problem on a second Mac, I got them to send me a replacement Magic Keyboard. It exhibited the exact same problems. Curiously, the Magic Keyboard also did not work reliably when directly connected via Lightning. I had thought that when used with a cable it would act like a regular USB keyboard, but apparently the cable only provides charging and Bluetooth pairing assistance.

Thinking/hoping that the problem was with Apple’s keyboards, I then bought a Logitech K811 (Amazon), which I’d heard good things about. Indeed, it’s a great keyboard. It’s like an improved version of the Apple aluminum keyboard that I liked so much. It can pair with three different devices at once and quickly switch between them. It’s still low-profile, but the keys have slightly more travel than Apple’s, they’re slightly clickier, and there are larger spaces between them, so it’s easier to feel their edges. It has the T-shaped arrow key layout, and you also get an extra function key: F13. One downside is that some of the hardware functions (like brightness) are assigned to different F numbers than on the internal keyboard, and I have had a hard time getting used to this.

There are also a bunch of software issues compared with the Apple keyboard. The OS doesn’t know the keyboard’s battery level. You need to install a kernel extension to make the media keys behave as standard function keys. Both the menu bar and flashing bezel indicators for Caps Lock get out of sync with the actual state of the key. It keeps forgetting the level I’ve set for the keyboard backlight. LaunchBar and Dictation can’t detect taps of the fn key.

And the Enter key doesn’t work. You’re supposed to be able to type Enter by pressing fn-Return, but (unlike with Apple’s keyboard) this just generates a Return. Logitech support first blamed this on a defective keyboard and sent me a replacement that had the same problem (as did another, older, Logitech keyboard that I tried). They then blamed a recent OS update, but I reproduced the problem on 10.10. It’s possible to use Karabiner Elements to program another key to act as Enter, but that didn’t seem worth the extra software to me. Instead, I opted to use the alternate keyboard shortcuts—unfortunately not consistent—in the apps where I used Enter: Control-Return to execute a BBEdit shell worksheet command, Command-Return to send a tweet in Tweetbot, Command-Return to submit an event edit in Fantastical, and Command-K to compile an AppleScript in Script Debugger.

The main problem, though, is that the K811 is subject to the same disconnection issues as Apple’s keyboard, although it seems to be slightly better at auto-reconnecting and does not repeat keys. I’m now convinced that the Bluetooth keyboard problems, which others have also noticed, are due to an OS bug. And it’s not limited to keyboards: when I tested a Microsoft Bluetooth mouse, it also kept disconnecting. Fortunately, my wireless mouse does not rely on Bluetooth.

The keyboard disconnections have gotten so frequent that I pulled my Apple aluminum USB keyboard out of storage. It works reliably, but I miss the narrower layout of the newer keyboards (which keep my mouse more centered), I keep forgetting that the corner key is Control rather than fn, and I miss the dual-purpose function keys that fn enables.

Update (2017-03-08): Addison Webb:

I’m having the exact same issues with my Late 2015 iMac. It’s super annoying and I also solved the problem with my Apple USB keyboard.

Jordan Merrick:

I have two Logitech BT keyboards, K780 and K380. Both completely unusable with Sierra, yet worked flawlessly with El Cap.

I was able to get the Magic Keyboard to work in wired mode by connecting it via Lightning and then unpairing it in the Bluetooth pane in System Preferences. I expect this to be more reliable, though it keeps auto re-pairing even before I reboot. I don’t want to turn Bluetooth off entirely because I use it for my AirPods and Universal Clipboard.

Nick Heer:

Sierra also introduced a couple of serious bugs with the way keyboards and trackpads are interpreted. I occasionally notice keypresses getting “stuck”, and my cursor sometimes lags when it is moved. Both of these bugs have been destructive for me: I have, more than once, deleted the wrong file, and have selected the wrong action in several applications.

Paul Ward:

Same problem with an MX Master & K780. My MBP lives on a swing arm, & the problem is reduced when I move it away from the desk.

Update (2017-03-17): Dan Frakes recommends FunctionFlip, which uses the accessibility APIs to invert the behavior of the function keys so that a kernel extension is not needed.

Update (2017-10-02): Marco Arment is also seeing Bluetooth disconnections with Sierra.

Tuesday, March 7, 2017

Google’s Algorithm Is Lying to You About Onions and Blaming Me for It

Tom Scocca (via Andrew Abernathy):

So when I saw the news that Google’s search result box has been giving people bogus information in its algorithmic search for the One True Answer to various questions, I thought about the onions. If Google can’t figure out whether Barack Obama is plotting a coup or not, or whether or not MSG is lethal, can it at least recognize that the lie about cooking onions is a lie?

I typed “how long does it take to caramelize onions” into Chrome. The answer was worse than I could have imagined[…]

Not only does Google, the world’s preeminent index of information, tell its users that caramelizing onions takes “about 5 minutes”—it pulls that information from an article whose entire point was to tell people exactly the opposite. A block of text from the Times that I had published as a quote, to illustrate how it was a lie, had been extracted by the algorithm as the authoritative truth on the subject.

[…]

In fact, it made the lie even worse, because Google’s automated text analysis is too dumb to recognize that “about 5 minutes” followed by “about 5 minutes longer” means 10 minutes.

See also: Google’s “One True Answer” problem.

Nest Cam Waking in the Night

We use a Nest Cam in the bedroom as a baby monitor. It has worked well, and I did what I could to configure it for increased privacy. Most of the time it’s off. I did not sign up for the Nest Aware service that stores footage in the cloud. I also turned off the activity history, which saves snapshots. The camera should only be active when I log in from an iOS device or the Web.

Around 4:30 AM, the Nest Cam was supposed to be off, but its status lights came on. First blinking green, then solid blue, then yellow. This was a scary sight, especially in the dark, half awake. According to Nest’s key, these colors correspond to someone “remotely watching the live video stream,” “booting up or rebooting,” and “trouble connecting to your Wi-Fi network.”

I contacted Nest support to see what might have happened but have not yet heard anything reassuring.

First, I was told that it’s normal for the camera to turn on in the night if the night vision feature is set to Auto. It was, but it doesn’t make sense to me that the camera would be checking for ambient light changes or motion when it’s supposed to be off.

Then I was told that, even without Nest Aware, I should be able to see 3 hours of footage in the app. I guess that was referring to this, but I had the activity history feature off, and in any case it was now more than 3 hours later. So there was no evidence in the app of whether the camera had actually been on and recording anything.

Nest says that there is no way to see when an account has been accessed. However:

We have the best encryption available and I can assure you that there was no security breach. Our system has AES-128 bit encryption, if your system was breached, we would have known and would have informed you.

I don’t see how they could know whether someone had broken into my account. Then I was told:

When someone is watching the led light will blink only blue, since your camera blinked with multiple colors, that means that the camera was disconnected from Wi-Fi and was trying to connect back to the Network.

This makes sense except that we had blinking green, not blinking blue, and blinking green is supposed to mean live viewing.

Best case: Faulty memory about the colors, there was some sort of Wi-Fi problem in the night, and the Nest Cam reported this through its lights. I don’t think this is it, though, because I only got one e-mail notification of the camera getting disconnected from the network, and that was after manually unplugging it.

It’s also possible that the Nest Cam malfunctioned or got hacked. At present, there doesn’t seem to be any way to investigate this. However, my case has been escalated, so perhaps the next person I hear from will know more.

Previously: Vizio Tracking TV Viewing.

Update (2017-03-21): It’s now been two weeks, and Nest never followed up like they said they would.

Update (2018-12-31): Landesman:

My nest camera is in my two year olds son’s room. It randomly wakes up in the middle of the night and begins flashing green - which means that someone is watching live. This happens in the middle of the night, when our phones are on night/ airplane mode and our computers are off. Also note: the “signal light” is turned off in the app.   At slightly before 8 pm tonight I unplugged the camera when it woke up and started flashing green as I was putting my son to bed. Can nest please send me the logs of what IP addresses were accessing the camera?

girlroseghost:

No one else knows our password. It’s the little LED light above the camera. The light will be green and then suddenly flash blue a few times and go back to green. We’ve changed the password and it keeps happening. No notifications are given from the app when this happens. It honestly is creeping us out...

I never heard back from Nest, and the problem is still occurring.

Sierra Stuck Mouse Cursor Graphic Bug

Stephen Braddy:

I have been reporting this problem (and others like it) to Apple Support for a long time now. So far I have been completely ignored. No fixes were ever made for the UI problems I have found in 10.11 and 10.12.

I was easily able to reproduce all but one of his examples on my Mac. I had seen a few of these cases before, but my use patterns are such that I don’t run into this bug very often, and thus it has not caused as much frustration for me.

Pierre Igot:

In what world is it OK to have a cursor like this one when the mouse is right in the middle of a paragraph of text in a word processor?

I really don’t know what it would take to make @apple acknowledge the flakiness of context-based cursor changes in #macOS AND ELIMINATE IT.

Update (2017-03-08): Nick Heer:

It was trivial for me to reproduce Stephen Braddy’s bug video, and it’s something I’ve noticed all the time on MacOS for the past couple of major versions of the operating system.

Lightroom 6.9

Adobe:

The goal of this release is to provide additional camera raw support, lens profile support and address bugs that were introduced in previous releases of Lightroom.

The direct download link is here.

The update claims to fix a bug introduced in 6.8 that broke the auto-import feature. Because of that bug, and one causing an incorrect warning on quit, I have reverted to 6.7 for the last few months. Unfortunately, customers are reporting that the auto-import bug is only fixed for new libraries. So I will continue to use 6.7.

Monday, March 6, 2017

The Genius Bar Idea

Eric Johnson quoting Ron Johnson (via Joe Rossignol):

“I remember the day I came in and told Steve about the Genius Bar idea and he says, ‘That’s so idiotic! It’ll never work!’” Johnson said. “He said, ‘Ron, you might have the right idea, but here’s the big gap: I’ve never met someone who knows technology who knows how to connect with people. They’re all geeks! You can call it the Geek Bar.’”

“And I said, ‘Steve, kids who are in their 20s today grew up in a very different world. They all know technology, and that’s who’s going to work in the store.’”

Apple Losing Education Share

Natasha Singer (MacRumors, Hacker News):

Mobile devices that run on Apple’s iOS and MacOS operating systems have now reached a new low, falling to third place behind both Google-powered laptops and Microsoft Windows devices, according to a report released on Thursday by Futuresource Consulting, a research company.

[…]

While school administrators generally like the iPad’s touch screens for younger elementary school students, some said older students often needed laptops with built-in physical keyboards for writing and taking state assessment tests.

The public school system in Eudora, Kan., for instance, used to have rolling carts of iPads for elementary school classrooms and MacBook carts for older students to share. But last year, when administrators wanted to provide a laptop for each high school student, the district bought 500 Chromebooks at about $230 each.

[…]

To compete with Chromebooks, Microsoft announced last month that it had worked with Acer, HP and Lenovo to develop low-cost Windows laptops for schools, with prices starting at $189.

This is sounding like a familiar refrain, but it seems like either Apple doesn’t care about this market or it completely misjudged its needs. I haven’t used a Chromebook, but at least on paper it seems like a near perfect machine for education: great price and durability, a real keyboard, a larger screen than on Apple’s cheaper devices, cloud-based productivity apps, and little need for administration. In some cases, students would need the full power of a Mac or PC, but for most education uses they don’t.

Update (2017-05-19): See also: Natasha Singer (via Hacker News).

Lightning or USB-C on the New iPhones?

Takashi Mochizuki:

People familiar with Apple’s plans said the iPhone releases this year would include two models with the traditional LCD and a third one with an OLED screen.

They said Apple would introduce other updates including a USB-C port for the power cord and other peripheral devices, instead of the company’s original Lightning connector.

John Gruber:

My expectation has been that iPhones will never switch to USB-C — that Apple would stick with Lightning until they can do away with external ports entirely.

I have no inside dope on this, but it rings false to my ears. If there’s any truth to it, I’d bet that this year’s iPhones will ship with USB-C chargers, that use a USB-C to Lightning cable to connect to the phones. That makes sense, given that Apple has dropped USB-A ports from the newest MacBook models.

Joe Rossignol (via John Gruber):

All three iPhones rumored to be launched in 2017 will retain Lightning connectors with the addition of USB-C Power Delivery for faster charging, including an all-new OLED model with a larger L-shaped battery and updated 4.7-inch and 5.5-inch models, according to KGI Securities analyst Ming-Chi Kuo.

My initial expectations matched Gruber’s. I didn’t think Apple would drop Lightning. That said, I think there’s a pretty good case to be made that they should. That would take some courage because people don’t like change. But I don’t think it would be that hard of a sell. Lightning was the right choice when Apple adopted it because it was better than the alternatives that existed at that time. But now we have USB-C, which is an emerging standard and offers many of the same benefits, plus some of its own—though also some confusion.

Imagine that Lightning didn’t exist today. Would there be a compelling reason for Apple to invent it? USB-C looks like it will become a widespread standard. If Apple doesn’t switch, it had better have a good explanation for why it’s inconveniencing its customers with a proprietary connector.

And if it’s going to switch, why not do it now? Why ship a few hundred million more devices with Lightning when you know USB-C is the future? It’s better to be a little early than a little late on these transitions.

Update (2017-03-09): See also: Accidental Tech Podcast.

Update (2019-01-15): Juli Clover:

Mac Otakara’s report also suggests that the next-generation iPhone coming in 2019 could potentially include a USB-C port. According to “those who are working on it,” though, it has not reached a design reference step and whether or not the new iPhones will use USB-C over Lightning is not yet fully established.

Amazon S3 Outage

Amazon (via Sam 北島-Kimbrel, Hacker News):

The Amazon Simple Storage Service (S3) team was debugging an issue causing the S3 billing system to progress more slowly than expected. At 9:37AM PST, an authorized S3 team member using an established playbook executed a command which was intended to remove a small number of servers for one of the S3 subsystems that is used by the S3 billing process. Unfortunately, one of the inputs to the command was entered incorrectly and a larger set of servers was removed than intended. The servers that were inadvertently removed supported two other S3 subsystems. One of these subsystems, the index subsystem, manages the metadata and location information of all S3 objects in the region. This subsystem is necessary to serve all GET, LIST, PUT, and DELETE requests. The second subsystem, the placement subsystem, manages allocation of new storage and requires the index subsystem to be functioning properly to correctly operate. The placement subsystem is used during PUT requests to allocate storage for new objects. Removing a significant portion of the capacity caused each of these systems to require a full restart. While these subsystems were being restarted, S3 was unable to service requests.

[…]

While this is an operation that we have relied on to maintain our systems since the launch of S3, we have not completely restarted the index subsystem or the placement subsystem in our larger regions for many years. S3 has experienced massive growth over the last several years and the process of restarting these services and running the necessary safety checks to validate the integrity of the metadata took longer than expected.

[…]

From the beginning of this event until 11:37AM PST, we were unable to update the individual services’ status on the AWS Service Health Dashboard (SHD) because of a dependency the SHD administration console has on Amazon S3.

Amazon Web Services (Hacker News):

The dashboard not changing color is related to S3 issue. See the banner at the top of the dashboard for updates.

Jim Dowling (via Hacker News):

Aside from the outage, there are many limitations of working with S3 that make it a less than ideal long term storage technology, and most of its problems relate to S3 object replication and metadata. S3 is a an eventually consistent key-value store for objects. However, eventual consistency tells us nothing about what guarantees S3 provides.

[…]

Netflix does not trust the metadata provided by S3. They have replaced it with their own metadata service, s3mper, which is essentially an eventually consistent key-value store that stores a copy of the metadata in S3 [s3mper]. Netflix rewrote their applications to account for s3mper. In the diagram below, you can see that application programming becomes more complex. Creating an object in S3 becomes a write to DynamoDB and a create operation in S3. This is not done transactionally. All S3 read/list operations need to be re-written to query DynamoDB and S3 and compare the results.

For me, the S3 outage brought down part of my FastSpring store, and a bunch of serial number reminder e-mails and crash reports didn’t go out because Amazon SES kept failing. My server code had assumed that sending e-mails would always succeed. In fact, it relied on sending e-mails to myself in order to report errors with the site and store. I’ve since added SparkPost and FastMail as backup SMTP providers.

I also plan to store e-mails in a database until they’ve been successfully sent. This seemed like it would be really easy, but I ran into a weird issue with my database layer not saving, and I haven’t had time yet to track that down.