Archive for November 5, 2015

Thursday, November 5, 2015

Google Engineer Reviews USB-C Cables That Don’t Work

Benson Leung (via Hacker News, Slashdot):

I bought the CableCreation Micro-B receptacle to Type-C plug for testing with Pixel and Nexus devices. I found that this adapter does not correctly charge the Chromebook Pixel and other Type-C devices. My analysis shows that this cable, although will charge and provide data through to the devices, does not correctly follow the USB Type C specification for power delivery identification. The CableCreation adapter advertises itself as 3A capable, but that is not appropriate because this is a legacy host port adapter.

[…]

In other words, since you are creating a USB Type-C plug to a USB 2.0 Type-B receptacle assembly, you must use a resistor of value 56kΩ. According to our testing, your cable uses a 10kΩ pull-up, which is not legal when the other end of the cable or adapter is a legacy Type-A or Type-B connector or receptacle.

By using this cable, your phone, tablet, or laptop computer may attempt to draw 3A, which may be more than the micro-b to A cable you attach to this adapter may be able to handle. This may cause damage to whatever cable, hub, pc, or charger you plug into this.

Amazon reviews have their problems, but for many types of products they’re the best available source of information.

Update (2016-03-30): Katie Collins (Hacker News):

The online retailing giant on Wednesday tightened regulations for selling USB Type-C cables. It added faulty USB-C cables to a list of banned items that also includes pirated DVDs and portable lasers. Those selling them risk Amazon shutting down their account and destroying any of their products stocked in Amazon fulfillment centers.

Mail’s Vanishing Rules Actions

Rob Griffiths:

Each click on the Edit button eats a bit more of the space reserved for the Actions section. After about 25 clicks on Edit, the Actions section will be completely gone. (I have verified this on three machines, including a fully-stock El Capitan installation, so I don’t think it’s something on my end.)

At this point, the only fix is to quit and relaunch Mail—this will restore the Actions section, at least for another 25 clicks.

I’ve seen this, too.

Apple News Format

Apple (via Federico Viticci):

Apple News Format is the custom JavaScript Object Notation (JSON) document format for News content. With Apple News Format, you can create beautifully crafted layouts with iOS fonts, rich photo galleries, videos, and animations—all optimized for iPhone, iPad, and iPod touch.

See also: Facebook Instant Articles, Google’s Accelerated Mobile Pages.

Dropbox API v2 Drops Objective-C SDK

Steve Marx (via Peter Steinberger):

There are currently four SDKs for API v2: Swift, Python, .NET, and Java. We’re continuing to add new SDKs, so watch the blog for upcoming announcements. All SDKs and documentation for API v2 are managed via a code generation process, which means that they’re consistent across languages and easy to update as we add new API features.

[…]

Developers have often asked us to support the notion of a file ID: a unique identifier for a file that remains constant even when the file is moved. We’re pleased to announce that API v2 includes this highly-requested feature. Developers can now use file IDs instead of paths to make sure their apps don’t lose track of a file when it’s moved by a user.

You could call the old Objective-C API from Swift, but the new API does not work from Objective-C.

Update (2015-11-05): Matthew Abbot:

FWIW, objc support is planned as soon as the swift API leaves beta. There are a few aspects that will need a compat layer.

Update (2015-11-09): This Week in Swift links to this thread, which makes it look like Dropbox didn’t realize what they were doing.

WebKit Shadow DOM API and the State of Web Type

Ryosuke Niwa (comments):

Shadow DOM is a part of Web Components, a set of specifications that were initially proposed by Google to enable the creation of reusable widgets and components on the Web. Shadow DOM, in particular, provides a lightweight encapsulation for DOM trees by allowing a creation of a parallel tree on an element called a “shadow tree” that replaces the rendering of the element without modifying the underlying DOM tree. Because a shadow tree is not an ordinary child of the “host” element to which it is attached, users of components cannot accidentally poke into it. Style rules are also scoped, meaning that CSS rules defined outside of a shadow tree do not apply to elements inside the shadow tree and rules defined inside the shadow tree do not apply to elements outside of it.

Bram Stein:

Up-to-date data on support for type and typographic features on the web.

Via John Gruber:

It’s disappointing how poorly Safari fares here. Mac OS X has had wonderful built-in typographic features for over a decade — Apple led the industry. But now, on the web, Apple trails the industry.

See also: Safari Is the New IE.