Archive for October 15, 2015

Thursday, October 15, 2015

Customizing Columns in OmniFocus 2.3

Derek Reiff:

Today’s update to OmniFocus, v2.3, is all about (OK, is mostly about) column customization. OmniFocus 2 introduced the Fluid layout, which turned tasks with a lot of data—defer and due dates, flags, context, project, and notes—into a readable row.

With 2.3’s Custom Columns layout, you can pick and choose what data you’d like to show, which Perspectives show what (Pro), or just flip a switch once to effect change everywhere.

[…]

This update also introduces Title Folding, which collapses an action’s title to just one line to keep row height consistent. Unless the row is selected, of course, in which case it’ll unfold. Turn it on in the View menu (Show Full Item Title->When Selected).

The Fluid layout was terrible for data density. An esoteric preference was added to put everything back on one line, but there was still too much white space. This update is a step in the right direction because in Custom Columns mode the rows are spaced more tightly. I’m not fond of seeing “defer” and “due” placeholders in every row, though; previous versions only showed these on mouseover, reducing the clutter.

There’s still no way to reduce the width of the sidebar (which is about 2x as wide as my widest context name), nor is there a way to resize the columns (which devote 3–4x as much space as needed to my project names).

Update (2015-12-04): William Van Hecke and Curt Clifton:

On the surface, the solution might seem to be to just bring back OmniFocus 1’s spreadsheetesque layout. But we believed we could design for these needs while holding on to OmniFocus 2’s hard-earned improvements in approachability. The result of this quest for balance is the new Custom Columns layout. Superficially, it looks a bit like OmniFocus 1, but Custom Columns have a lot more intelligence behind the scenes.

Update (2015-12-10): William Van Hecke and Curt Clifton:

Here’s a diagram showing the structure of controllers and views in an OmniFocus window before we added Custom Columns layout.

[…]

For Custom Columns layout we needed to use different table cell views, but wanted to retain as much of the existing, working code as possible. As the figure above shows, both OFIProjectTableCellView and OFIActionTableCellView are backed by .xib files and have a common superclass, OFIActionProxyTableCellView. We wanted to add two more leaf nodes and .xibs for Custom Columns layout: OFIProjectColumnarTableCellView and OFIActionColumnarTableCellView. These classes needed to share some behavior with each other, but also needed to share some behavior with their corresponding Fluid variant. For example, both OFIActionTableCellView and OFIActionColumnarTableCellView needed to manage their status circles. This is a classic example of the diamond inheritance problem.

Since Objective-C (and Swift) don’t have multiple inheritance, we chose to solve this diamond inheritance by introducing assistant classes for the action and project table cell views. Here’s a diagram showing that design.

[…]

Cocoa’s solution for these cases is NSStackView, which allows you to set priorities on subviews and have them automatically removed as needed. NSStackView is great for many use cases. Unfortunately, we’ve found that it doesn’t yet perform adequately when used in table cell views, many dozens of which can be laying out at once (for example, while you resize a window).

Swift Casting With _ObjectiveCBridgeable

Rafael Machado:

The documentation, which is only founded in header files says:

A Swift Array or Dictionary of types conforming to ObjectiveCBridgeable can be passed to Objective-C as an NSArray or NSDictionary, respectively. The elements of the resulting NSArray or NSDictionary will be the result of calling bridgeToObjectiveC on each element of the source container.

But this is not limited to the standard collection types. It can also be used to cast an Objective-C object to a Swift struct.

Quickly Dimming the iPhone Screen

Tim Stenovec (via Kirk McElhearn) and Justin Searls (via Josh Centers) show how you can set up your iPhone so that triple-clicking the Home button dims the screen. This seems to only change the brightness. It doesn’t change the color temperature like f.lux does. There is a limited way to do that in iOS via Settings ‣ General ‣ Accessibility ‣ Increase Contrast ‣ Reduce White Point, but I don’t know of a way to make a shortcut for that.

Update (2015-10-23): Dan Frakes wrote about this with iOS 8.

Empty Parentheses Are Not “No Parameters” in (Objective-)C

Jonathan Mah:

Using () in a function type declaration means unspecified parameters. This is a very old feature of C that has been maintained for backward compatibility. In fact, it was noted as an “obsolescent feature” in C89 — yes, that’s 1989!

[…]

Because this warning is apparently unimplemented, huge amounts of otherwise high quality code has these turds lurking in both public API and implementation.

You’re supposed to use (void).

Apple’s Processor Advantage

Steve Cheney (comments):

One of Steve Jobs’ biggest legacies was his decision to stop relying on 3rd party semiconductor companies and create an internal silicon design team. I would go so far as to argue it’s one of the three most important strategic decisions he ever made.

[…]

It is – in fact – these chip making capabilities, which Jobs brought in-house shortly after the launch of the original iPhone, that have helped Apple create a massive moat between itself and an entire industry.

[…]

The truth is the best people in chip design no longer want to work at Intel or Qualcomm. They want to work at Apple. I have plenty of friends in the Valley who affirm this. Sure Apple products are cooler. But Apple has also surpassed Intel in performance. This is insane. A device company – which makes CPUs for internal use – surpassing Intel, the world’s largest chip maker which practically invented the CPU and has thousands of customers.

John Gruber:

I don’t think it has gotten through the heads of many people that Apple has now turned the old dynamic on its head. Apple’s ARM chips are years ahead of the commodity chips used by its competition, and are set to surpass even Intel’s x86 chips in terms of performance-per-watt.

[…]

We should clarify one point from Cheney’s headline — Apple’s lead is formidable, not insurmountable. Nothing in tech is insurmountable.

Dave Lee (comments):

The University of Wisconsin successfully claimed that Apple used its microchip technology without permission in some iPhones and iPads.

The patent, filed in 1998, is said to improve the power efficiency of microchips.

devit:

Looks like the “idea” of the patent in the description is to use a predictor to predict when a STORE and LOAD alias and not speculate the LOAD and any instruction depending on the load (although the claims generalize this to any non-static dependency).

As it generally happens in software/hardware patents, the claimed solution seems quite obvious whenever one wants to solve that particular problem, and the hard part is the “execution”, i.e. implementing it efficiently and figuring out whether the tradeoffs are worth it.

Joe Mullin:

In this case, WARF said the ’752 patent improves the A7, A8, and A8X chips Apple uses in newer iPhones and iPads. Now that the jury has found Apple liable, it will decide on damages; in earlier orders, US District Judge William Conley has written that the maximum in damages that can be claimed is $862.4 million. A third phase of the trial will determine whether Apple was a “willful” infringer; if so, damages could be tripled. If both the damage and wilfulness phases go poorly for Apple, it could be a record-breaking verdict.

John Gruber:

The more I think about it, the more sure I am that it’s wrong to call WARF a patent “troll”. They are a non-practicing entity, but a university almost has to be. Universities don’t produce commercial products, they conduct research. And WARF uses its patent royalties to fund research.

MallocNanoZone=1 Makes for Hard Debugging

Gus Mueller:

Then it happened again, and I found a pretty reliable way to reproduce it. But again I wasn't running from Xcode and when I launched it from Xcode I couldn't reproduce it.

[…]

So what does the MallocNanoZone env variable do? It's a flag that changes the memory allocator for your app, and for the frameworks your app uses. I don't know the specifics of this allocator vs whatever the normal one is, but I do know how it hid this bug from me in Acorn. When MallocNanoZone was set, the allocator worked in such a way that when I used CFRelease with a CGImageRef, and then used CGImageGetWidth with that same (bad) reference, it would return the correct answer (CGImageCreateCopyWithColorSpace() may have been involved as well). When MallocNanoZone was off the normal allocator was used and CGImageGetWidth would return a bad answer (as it should!).