Friday, April 10, 2015

Et Tu, Tim?

Joe Rosensteel:

A few days ago, U.S. District Judge Lucy Koh dismissed a class action lawsuit against several animation, and visual effects companies. This is directly tied to the emails uncovered in a 2010 suit by the Justice Department for the companies agreeing not to poach employees from one another. Ed Catmull — one of the most important people in computer graphics, and film — was sending very casual emails about coercing people to participate in the no-poaching scheme.


When Koh ruled against the former employees, I was gobsmacked that the employees couldn’t sue the companies because the statue of limitations had expired. The clock started ticking when the employees were affected, not when proof of a scheme came to light. So tough cookies.

During my twitter indignation over this, Glenn Fleishman and Jason Snell pointed me towards the new Becoming Steve Jobs book. They informed me that the book doesn’t shy away from it (unlike Catmull’s autobiography) and specifically includes a quote from Tim Cook defending Steve Jobs’ position in this.

Archive Your iOS Device Backups With iTunes

Apple (via Dan Moren):

Always back up your data and files to iTunes before you install a prerelease version of iOS. Then archive the backup. If you back up to iCloud or if you don’t archive your backup, you won’t be able to restore from it if you go back to current version of iOS.


4. When the backup is complete, go to iTunes > Preferences > Devices.

5. Find your device’s backup and Option-click the backup. Choose Archive.

This should read “Control-click the backup.”

Thursday, April 9, 2015

The 12-inch MacBook

The way Apple’s presentation focused on the new MacBook’s keyboard, you might think it was better for typing, the way all keyboards would be someday. Jason Snell finds otherwise:

Apple seems to have realize that the reduced travel has made this keyboard less appealing, and has attempted to offset the change with a bunch of other changes that improve the typing experience. There’s a new butterfly key mechanism atop stainless steel dome switches, which Apple says increases key stability, and the keys are all a bit wider than on a traditional keyboard, so there’s more area to hit on each key.

These changes help, but they don’t really offset the reduced travel. The MacBook keyboard’s better than I expected it to be—I was able to score 118 words per minute on TypeRacer using it—but it never felt particularly comfortable. If you’re not a keyboard snob, you may not even notice the difference, but if there’s any single feature that would make me reluctant to buy a MacBook, it would be the keyboard.


The Esc key has been elongated and the function keys narrowed, which didn’t really bother me. However, the redesign of the arrow keys really shook me–the up and down arrows are still half-height, but the left and right arrows are now full sized. It turns out that I used the gaps above the left and right arrow keys on prior keyboards to orient by feel, so I knew which arrow key was which. On the MacBook’s keyboard, there’s no longer a gap–and I kept having to look down to make sure I was tapping the up arrow key.

Jason Snell:

I’ve got to say that I’m not a fan of the new keyboard. Apple played the other enhancements that the keyboard offers, such as increased stability and wider keys, as attempts to offset some of the costs of the reduced key travel. That makes me hopeful that Apple sees this keyboard as what it is—a pretty serious compromise in order to get the computer thinner—rather than some breakthrough new keyboard that will be replicated on every other Apple keyboard in the next year or two.

If you don’t type a whole lot, or very fast, you may not care about the substantially reduced key travel. And you can get used to it. But it’s just a tiny step up from typing on flat touchscreen glass.

Jim Dalrymple:

The arrow keys took the most time to get used to. Surprising, I know. However, I use the up and down arrow keys a lot to navigate email messages and RSS feeds and those keys are quite close together—in fact, they are the only two keys on the keyboard that are so close together. It’s like the person that designed the keyboard doesn’t use those two keys and put them together like that because it looked better. At any rate, those keys are just taking a bit longer for me to use without error. I hope for a change in the future.

Keyboard aside, it sounds nice for what it is. It’s not for me, though. After the 12-inch MacBook was announced, I bought an 11-inch MacBook Air to use as an auxiliary Mac. It’s small enough to fit on the desk next to my main Mac, much faster than the 12-inch MacBook, and has a Thunderbolt port for connecting my drive dock.

Yosemite-Only Security Fixes

Emil Kvarnhammar:

The Admin framework in Apple OS X contains a hidden backdoor API to root privileges. It’s been there for several years (at least since 2011), I found it in October 2014 and it can be exploited to escalate privileges to root from any user account in the system.

The intention was probably to serve the “System Preferences” app and systemsetup (command-line tool), but any user process can use the same functionality.

Apple has now released OS X 10.10.3 where the issue is resolved. OS X 10.9.x and older remain vulnerable, since Apple decided not to patch these versions. We recommend that all users upgrade to 10.10.3.

This sounds like a serious bug that Apple should fix for previous OS versions as well. Not everyone can update to Yosemite, and some don’t want to yet because of bugs. Mavericks was the current OS version less than six months ago. It’s too early to abandon it.

Quoted Domain Specific Languages

Shayan Najd, Sam Lindley, Josef Svenningsson, and Philip Wadler (PDF, via Lambda):

We describe a new approach to domain specific languages (DSLs), called Quoted DSLs (QDSLs), that resurrects two old ideas: quotation, from McCarthy’s Lisp of 1960, and the subformula property, from Gentzen’s natural deduction of 1935. Quoted terms allow the DSL to share the syntax and type system of the host language. Normalising quoted terms ensures the subformula property, which guarantees that one can use higher-order types in the source while guaranteeing first-order types in the target, and enables using types to guide fusion. We test our ideas by re-implementing Feldspar, which was originally implemented as an Embedded DSL (EDSL), as a QDSL; and we compare the QDSL and EDSL variants.

Mailman 3.0

Sumana Harihareswara (via Hacker News):

More than a decade after its last major rewrite, the GNU Mailman mailing list manager project aims to release its 3.0 suite in April, during the sprints following PyCon North America. Mailman 3 is a major rewrite that includes a new user membership system, a REST API, an archiver replacement for Pipermail, and a better web interface for subscriptions and settings — but it carries with it a few new dependencies as well.


The architecture and user interfaces of previous versions of Mailman reflect a different era of the web, and of application interoperability. Mailman 2 was a single codebase, written in Python 2, encompassing a rudimentary web application for subscription and list management (and incorporating the Pipermail web archiver) as well as the engine for receiving, moderating, and propagating messages. Lead developer Barry Warsaw explained in the overview he wrote for The Architecture of Open Source Applications that, beyond the browser-based interface, Mailman 2 also offered a dedicated command-line interface, and a Python internal API that system administrators could integrate with by writing Python code.

In contrast, Mailman 3 is a suite of five connected projects, each of which can run independently[…]

AnyBar and SuperDuper

Dr. Drang:

Today, One Thing Well posted an article on a utility called AnyBar, written by Nikita Prokopov, that lets you put a colored dot in your menubar by sending your computer a UDP message. As soon as I read the article, I knew I could make some use of it.


Instead of putting a bunch of words on my Desktop, I could just put a colored dot in my menubar—green for a successful backup, red for a failure.


Brian Webster:

PowerPhotos will be free for all existing iPhoto Library Manager customers. Due to the smaller feature set, I’ve decided to offer PowerPhotos at a lower price point of $19.95. iPhoto Library Manager 4 will continue to be sold at its current price of $29.95, and will also include a free copy of PowerPhotos; the serial number you receive with your purchase can be used with both programs. This also applies to existing iPLM customers, who can just use their existing serial number with PowerPhotos. iPhoto is not disappearing overnight, so iPhoto Library Manager will continue to be supported as well.

Git Tower’s Yosemite Design

Fabricio Rosa Marques:

We recently updated Tower to make it feel even more at home on Mac OS X Yosemite. We touched many areas of the app over the course of several updates. Now, we want to share our experience from bringing an app to Mac OS X 10.10.


In some cases it can become tricky to decide whether to treat certain aesthetics system-specifically or just go for a "yosemitized" look on all system. Targeting specific OS versions might bloat the app and will make managing your app's aesthetics harder, so you need to draw a line and compromise at some point.

Wednesday, April 8, 2015

iPhone Sizes

Jason Snell:

And since my normal iPhone 6 is locked to AT&T, I used an unlocked iPhone 6 Plus as my phone for the trip.


This all made Myke Hurley, my co-host on the Upgrade podcast, thrilled, as he’s a proud iPhone 6 Plus user and hoped to convert me to his side as he’s been doing with other friends. Thus he began anticipating my defection with the hashtag #mykewasright.

I really did appreciate the iPhone 6 Plus’s longer battery life. The longer life is noticeable, and was much appreciated as I was wandering around London. And I got used to the size of the device in my pocket in no time. But beyond that, I have to say I’m hard pressed to find anything I prefer about the iPhone 6 Plus over my iPhone 6. Yes, the screen is larger, but I didn’t ever feel that I was seeing more of the world by viewing an extra tweet in Twitterrific or a little bit more territory in Maps.

I also noticed—and Myke confirmed—that the iPhone 6 Plus’s camera appears to be buggy.

Marco Arment:

Camera: The 6 Plus’ image stabilizer is a minor difference outdoors, but a noticeable difference indoors when it can select a lower ISO, resulting in less noise.

Typing: For whatever reason, the keyboard size on the 6 Plus (in portrait orientation) fits me better than the 6, resulting in far fewer errors. I’m already typing more accurately on the 6 Plus than I ever could on the 6.


The 6 Plus is indeed worse than the 6 for one-handed use, but not by nearly as much as I expected — both are poorly suited to it.


In fact, the iPad-crossover enhancements mostly annoy me, and I’d disable them if I could. The iPad-style treatment of split-view apps and slide-up modal views in landscape orientation feels cramped and hacky at best — it just feels like a too-small iPad, rather than a too-large iPhone. I’m also constantly rotating the home screen unintentionally, requiring me to use portrait lock regularly for the first time.


The biggest problem I’ve hit is that it just feels uncomfortably huge and awkward in my pocket more often than the 6 (which did have this issue sometimes as well, but not as often), and it’s clumsier to insert and remove from pockets.


CGP Grey summarized the difference well in the aforelinked Hello Internet episode: “I am more and more convinced that the iPhone 6 is the phone for nobody; it’s the in-between phone that has all of the disadvantages of both [the 5S and 6 Plus]”.

Manton Reece:

The lesson from all these switches couldn’t be more clear: there’s no longer one perfect iPhone for everyone. What works great for one person might be terrible for someone else. I personally love the 5C design — the size of the screen, the way the plastic feels in my hand, flipping or spinning it on my fingers without worry that it’ll slip, using it without a case, adding a little color to my life — but many people never even tried it because it contains underpowered hardware compared to the latest models.

The Object Graph

Soroush Khanlou:

Now, what did Sandi mean about the “edges of your object graph”? Let’s not use the word “edge”, since it’s overloaded in the context of graphs. Let’s use the word “boundaries”. She’s talking about the tiniest leaves of our tree. Polymorphic objects are okay by Sandi as long as they are only referred to, instead of doing any referring. And this makes a lot of sense! Polymorphic classes are dangerous because small changes in them ripple to all of their subclasses and users. By making sure your inheritance hierarchies stay small and well managed, you can contain that complexity. When you refer to other objects, you’re more fragile. If you’re only referred to, a stable interface is the only thing you need to keep from breaking anything else.

In addition to your object graph, you also have a dependency graph. Here, your nodes are classes instead of instances, and your links are #imports instead of object ownership. […]

It makes me think that it would be great to have two types of objects, separated into layers.

Mac App Store Licensing and Copy Protection

Gus Mueller:

I’m seeing 40x more downloads than purchases. Hello massive pirating.

It’s been happening for years.

Cabel Sasser:

Yeah, easy as pie. One username/password shared. As if I needed another reason to hesitate from the MAS…

Ian Meyer:

My girlfriend’s workplace uses a single MAS account to make purchases for hundreds of users. She’s trying to change that.

Jason Snell (in 2011):

When you buy an app on the Mac App Store, you’re getting the rights to run that program on any Macs you own and operate, for your personal use. Basically, if your household has a half-dozen different Macs, including desktops and laptops, you can buy a copy of Gratuitous Space Battles and play it on every single one of them. Consider a purchase of consumer software via the Mac App Store to be a bit like buying a household site license for the app.

The situation is slightly different for apps that are considered commercial or professional in nature. For apps that fall into this category—Aperture’s a good example—the Mac App Store license says that you essentially can install that item on computers you use or on a single computer shared by multiple people. Basically think of it as a one-seat license for a pro app.


There’s no authorizing or deauthorizing of Macs, like you do with iTunes media. There’s no five-Mac limit, or device limit of any kind. […] Beyond entering in your Apple ID and password, this is all on the honor system.

It seems like Apple should be able to solve this problem rather easily. It already has a system to keep track of which devices are authorized to play media files. This could have been a reason to sell in the Mac App Store, because a FairPlay system would be both secure and easy to use. But Apple doesn’t really sell software anymore, so it probably doesn’t see this as much of a problem. And developers are not breathing down its neck the way the record labels were.

Enforcement aside, Apple isn’t even trying very hard to communicate how the honor system is intended to work. Alastair Houghton:

To be fair, it’s far from obvious how businesses are supposed to handle purchases from MAS.

There are no links from the App Store front pages, and no obvious indication what to do.

Normally businesses buy the same way as consumers and don’t need to use a special channel.

Apple should be more pro-active; right now, it’s costing developers quite a lot of lost revenue I expect.

Update (2015-04-09): There is further discussion on Twitter.

Facebook Legacy Contacts

Hayley Tsukayama:

Facebook has announced that it will grant users more control over what happens to their Facebook pages after they die. Starting Thursday, users should see a new option pop up in their security settings that will let them choose whether they want to pass their information and account management over to someone else when the time comes.


  • You can do nothing, in which case the current rules apply and your account can be memorialized by anyone after your death, providing that the company gets adequate proof of your death.
  • You can ask Facebook to delete your account after you die.
  • You can designate someone—called your legacy contact—to manage your account. Once Facebook is notified of your death, your timeline will also change to let people know you’ve died. Facebook does this by adding the word “Remembering” ahead of your name—i.e. “Remembering John Doe.”

Tuesday, April 7, 2015

Swift, Accelerate, and Generics

Chris Liscio:

After spending a while in a Playground, I managed to get a generic vDSP multiply routine written that could work on both Slice<Float> and [Float].

For no good reason at all, I decided that I should brain-dump this approach into my SMUGMath-Swift project before I lose the playground to the sands of time.

The “magic” is in the way that I was able to lean on the withUnsafeBufferPointer method that exists for both collection types, and then also specify some additional type clauses to ensure we’re working with Float vs Double floating point types.

1Password 5.3 for Mac

Chris De Jabet:

We recently introduced our TOTP feature — Time-Based One-Time Passwords — in iOS and Windows, and now we’re bringing it to the Mac. TOTPs are increasingly used as an extra layer of security by companies from Dropbox to Tumblr, so now you’re ready for them with 1Password for Mac.


We also implanted a plethora of custom field options, some great 1Password mini nips and tucks, and Secure Notes can now have custom fields and sections.

Infinite NSScrollView

Milen Dzhumerov:

When we refer to infinity, what we mean is that in practical terms the user will never hit an edge. One way to achieve that would be to make the scrollable area as large as possible (max values of CGFloat). Unfortunately, such very large values end up producing jerky scrolling movements.

Another approach is to never let the user hit the edge of the scroll view. We can observe the position of the scroll area and if it gets too close to a particular edge, we can move it back to the center while also making any changes to ensure the onscreen contents do not change. This will create the illusion of an infinite scroll view – in practice, the user can just never hit the edge.

Car UI

Dr. Drang:

When the wiper is in intermittent mode, it moves at the same speed as it does in low-speed mode. The difference is that it pauses between wipes. How long it pauses is what’s controlled by the collar position. To me, twisting the collar to move the marker down should make the pause between wipes shorter. This would be consistent with the way the stalk itself is moved: down to handle heavier rain. This is also consistent with the quasi-bar chart graphic, which I interpret as a graph of the pause, or interval, between wipes.

You will not be surprised to learn that the collar works exactly the opposite of how I think it should work. The interval between wipes increases as you turn the collar to move the marker down; the bottom position is for the lightest sprinkle. For the stalk, down equals heavier rain; but for the collar, down equals lighter rain.

The chart is apparently meant to represent the frequency of wiping, not the interval between wipes, despite the INT label on the marker. Yes, I know they mean INT to be interpreted as intermittent, not interval, but intermittent is not a quantity that can be graphed. Interval is. Which is why every time I look at that control, my mind says interval and I want to twist it the wrong way.

This has always bothered me with my Toyota.

Monday, April 6, 2015

Xcode Searching

Daniel Jalkut:

A search scope that includes system frameworks will not actually search or match against any of the frameworks that are linked to by the targets in a workspace. It appears that it will only search frameworks that are explicitly included as file references in the project navigator.


A related problem is that even if a framework is explicitly linked to, such as Cocoa.framework, only the header files of that specific framework will be searched, not the header files of subsidiary frameworks (e.g. Foundation and AppKit).

I find that searching in Xcode is only worthwhile for my own code. If I’m trying to find an API, Xcode’s documentation search is clunky and doesn’t seem to actually search all the documentation. Its header searching, as Jalkut explains, is very limited. Dash is great for searching the documentation, but there is a lot that is not documented. If Dash can’t find what I want, I have a BBEdit saved search set that looks in all the header files in the current SDK.

Google, Our Patron Saint of the Closed Web

Drew Crawford:

Of course ICANN cannot actually afford to manage the day-to-day operations of thousands of new TLDs. So they’ve opened the process up to anyone who wants to apply. So you fill out an application, you pay $185,000, there’s a convoluted evaluation process where they ask you questions like whether or not you’re a drug dealer and whether you’re technically qualified to run a TLD, and after a lengthy and bureaucratic review process you basically get your own TLD.

It came as no surprise that thousands of applicants came forward in some kind of crazed internet landrush. Many internet companies are placing bets. Amazon made some 76 applications, and Google made even more, with 101.

What people did not seem to expect (whether due to incompetence or malice is up for debate) is what they would be used for.


Google opens with a “how-is-this-not-a-parody” argument that owning a TLD and not allowing anyone else to use it “lead[s] to diversified consumer choice”[…]

.htaccess Snippets

Phan An (via Hacker News):

What we are doing here is mostly collecting useful snippets from all over the interwebs (for example, a good chunk is from Apache Server Configs) into one place.

The Birth of Microsoft’s New Web Rendering Engine

Charles Morris comments:

As we announced last month, Project Spartan will be the new browser across all Windows 10 devices, from phones to tablets, PCs and beyond.


First, the Web is built on the principle of multiple independent, yet interoperable implementations of Web standards and we felt it was important to counter movement towards a monoculture on the Web. Second, given the engineering effort required, we found that we could deliver an interoperability focused engine to customers significantly faster if we started from our own engine (especially if unshackled from legacy compatibility concerns), rather than building up a new browser around an open-source engine.


As detailed in Jacob Rossi’s article for Smashing Magazine, the new engine began as a fork of MSHTML.dll but has since diverged very quickly. By making this split, we were able to keep the major subsystem investments made over the last several years, while allowing us to remove document modes and other legacy IE behaviors from the new engine. On the other hand, our legacy engine (MSHTML.dll) can remain largely unchanged (outside of security and other high priority fixes) to help guarantee legacy compatibility for our enterprise customers. We also built up capabilities to switch between the legacy and new rendering engines seamlessly.

A clean break also necessitates a new user-agent string to ensure that no IE-specific code was being sent. This built upon a long browser history of using whatever tokens are necessary to get the desired content from servers. Although this meant a lower compatibility rate initially, it was also useful to reveal interoperability issues that needed to be fixed!


However, a new engine was not enough – we also needed to significantly revamp how we find, track and fix issues on the long tail of the Web. To do so, we do daily analysis on trillions of URLs crawled in conjunction with Bing to detect patterns that exist in the head of the Web and the tail of the Web. By fixing these patterns, sites just end up working. This data is augmented by thousands of daily feedback reports from users via the “smiley face” icon.


Nick Lockwood:

MustOverride provides a macro that you can use to ensure that a method of an abstract base class must be overriden by its subclasses.

Apple does not currently provide a way to flag this at compile time, and the standard approach of raising an exception in the base class’s implementation has two disadvantages: 1) it means that the method will only crash when it is called, which might only happen under difficult-to-reproduce conditions, and 2) you cannot provide a base implementation and require that the subclass calls super.

MustOverride uses some runtime magic to scan the class list at load time, and will crash immediately when the app is launched if the method is not implemented, even if it is never called.

Motion Sensing Using the Doppler Effect

Daniel Rapp (via Avi Bryant):

Recently I stumbled upon an interesting paper for implementing motion sensing requiring no special hardware, only a speaker and mic! Unfortunately the paper didn’t include code to test it, so I decided to reproduce it here on the web!


In order to measure the doppler effect for motion detection on a conventional computer, what you can do is send out a sinusoid at some known (inaudible) frequency, say, 20 kHz. If something is moving in the room, then, after the sinusoid has bounced around on the walls and into the microphone, the sound will shift in frequency. This can be measured by looking at the frequency spectrum in the nearby region of the 20 kHz tone.

Speedy Transfers With IP Over Thunderbolt

Dan Moren:

Right now Thunderbolt remains the fastest port on both my 2011-era iMac and my MacBook Air from 2014—even if it can’t reach its full speed of 10Gbps (or 20Gbps in the case of Thunderbolt 2), it can still transfer a multi-gigabyte file from one machine to the other in a matter of seconds. But using it to transfer files does take a few steps.

While you could use Thunderbolt Target Disk Mode, which essentially lets you boot one of your Macs as an external drive, I generally don’t feel like shutting down my computer just to transfer a file. Fortunately, there’s another option: Thunderbolt can converse via the same Internet Protocol (IP) used by Ethernet. It just takes a little quick configuration.

Friday, April 3, 2015

XCTest: Areas for Improvement

Brian Gesiak (via Ole Begemann):

There are a lot of things that XCTest does really well. Below are some suggestions for what it could do even better, in my order of my personal preference.

My number one would be a way to automatically show the full log entry for each failing test. Right now, even with a behavior set up to show the report navigator and navigate to the current log, I still have to click at the top to show Logs instead of Tests, then click the expansion triangle to see the full log entry for the first test. And neither of these operations has a keyboard shortcut.

Must Fix for Next Release

Craig Hockenberry:

This fix was submitted two weeks ago on February 2nd. A week later it went into review and was quickly rejected. The problem was that a buy button was accessible from our Help window.


My issue is the way that we must fix these problems. In this particular case, the issue was resolved by editing some HTML on our server, not by changing anything in the app itself. But we still must submit a “new” binary and go through the lengthy review process again. This is a huge waste of time for both developers and app reviewers (who are clearly lagging behind these days.)

I think there’s an easy way to fix these minor transgressions that would benefit both parties: add a new kind of approval with strings attached. A “Must Fix for Next Release” state where the app can go into “Ready for Sale” but the issue remains in the Resolution Center.

Truncated Text in Mobile UIs

Ole Begemann:

As an app developer or designer, you should treat most cases where you conveniently resort to truncating text as a failure in your design. There are certainly exceptions to this, and especially if you deal with user-generated content you have to set a limit—nobody wants item titles spanning a dozen lines or more. For “normal” content, however, the default should be to display the full text. If that means an item title requires four lines, then give me four lines.


If you really think you need truncated text, you should at least provide the user with a way to see the whole thing without having to leave the current screen. Apple used to do this in the Music app. A long tap on a truncated song title would display a popover with the full title. This feature is gone in iOS 8, however. Another option might be to let users expand text by tapping on the ellipsis, but I still think these workarounds are worse than just showing the full text from the start.

I feel like I spend my day clicking to tell Xcode to show the rest of truncated error messages and unit test failures.

Aperture, Capture One, and Lightroom Walk Into a Bar

Jochen H. Schmidt:

As a registered developer I’ve installed Photos for OS X and have started to build an opinion on it. I actually like it — it is incredibly fast and some of its tools (like the retouch brush) are the best working implementations I have seen so far. But it is also very clear that this cannot replace Aperture today. Regardless of that, the infrastructure around Photos is how photos will be managed on Apple devices from now on. So it is likely that it’ll be a part of our future workflow even if another program replaces Aperture. Unfortunately it is not yet known which third-party vendors will offer some kind of integration with this new system or what that will look like.


I will edit a photo in Aperture, Lightroom and Capture One. The example is chosen to teach an important lesson; it is often wrong to quickly assume that something is impossible within an application. The paths are different — and sometimes more tedious — but in almost all cases you can get very comparable results from any of those programs. If not, try harder! To get to this point, you need to learn a programs strengths and quirks. Don’t write-off something to early!

Jochen H. Schmidt:

The result is looking much better than the one in Aperture. This example clearly shows why so many users trying Lightroom are shocked about the results they can get.


With both Lightroom and Capture One I easily can get better results than I got using similar techniques in Aperture. But is this really the whole story? Actually no; this kind of pushing deep shadows out of a photo with high dynamic range doesn’t really work with Aperture’s shadow slider. The solution is to drop the black point to zero and use the levels or curves tool to raise the shadows.


One fact is undenyable though: It is much easier in Capture One or Lightroom. The reason for that is very simple; the tools in those programs are written with such situations in mind. These are not just simple linear shadow level adjustments; there is a set of non-linear curves behind them which are carefully crafted to give natural results, even in the extremes. This is not a limit of the engine; it is a feature of the user interface which hides such complexity behind a simple linear looking slider.


When comparing Lightroom to Aperture I mostly miss the ease of use. While Lightroom’s tools work exceptionally well, the user interface and the catalog organization is something you may really have force yourself to like.


Capture One doesn’t only look similar to Aperture, it has a lot in common. The UI is more like Aperture and more configurable than Lightroom. The quality of its output it often said to be better than Lightroom.

Bob Rockefeller:

This is similar to my experience. Both Lightroom and Capture One have somewhat better develop tools. Aperture is far and away better at photo management.


I use Lightroom at work, but it never felt as comfortable as Aperture, even 5 years later. I have been experimenting with Capture One and like it as the best Aperture replacement so far. The most annoying missing features for me are global before and after (WTF? This is such a basic feature. You can do before/after only on each adjustment brick).

The current situation is a mess. Aperture is in maintenance mode, and its photo development tools lag behind the competition. None of the alternatives seem to be able to easily migrate files out of Aperture while preserving the organization (projects, albums, stacks, keywords). Only can preserve Aperture’s non-destructive edits and use Photo Stream, and it’s the most limited in terms of managing photos, the area where Aperture still has a big lead. Right now, the least bad option seems to be to keep using Aperture. There are still professionals using it who at some point will need better migration tools, aren’t there?

Update (2015-04-08): Jeff Carlson:

Unfortunately, there’s no way to assign geo information to photos that don’t already have it. For example, if I shoot several photos of a location with my iPhone, I can’t copy that data to photos shot at the same place with my DSLR.


If you’re a longtime Aperture user, Photos is definitely a step back. Or rather, it’s the clear signal that says it’s time to look for other professional photo pastures. I can’t recommend Photos as a full-time replacement, although I can envision situations where it would work alongside Aperture, such as creating small libraries for sharing with clients who don’t own Aperture (both iPhoto and Aperture can open a library after it’s been converted, but edits don’t sync).

Serenity Caldwell:

No, it’s not Aperture. It’s got a long way to go before it’s ever going to be Aperture — and honestly, Apple may be ready to cede the true pro-editing market to Adobe and the like. But for the vast majority of users — beginner to prosumer alike — Photos for OS X is more than enough for your photo management needs.


There aren’t any brushes, to my great disappointment. The loupe is gone, replaced with Multitouch pinch-to-zooms, as are some of the more advanced management features. And you can’t edit your images in an external editor, or properly work with a reference library unless you disable iCloud Photo Library.

Writing a Great App Store Description

Stuart Hall:

Sure this is a chicken and egg problem, but if you have any stats to brag about don’t hold back!


Selling a story of the person your potential customers want to be is what you are trying to achieve.

Preprocessor Abuse and Optional Parentheses

Mike Ash:

While coming up with macros that would justify this [UNPAREN()] construct, I built a nice dispatch_once macro for making lazily-initialized constants. Here it is:

#define ONCE(type, name, ...) \
    UNPAREN(type) name() { \
        static UNPAREN(type) static_ ## name; \
        static dispatch_once_t predicate; \
        dispatch_once(&predicate, ^{ \
            static_ ## name = ({ __VA_ARGS__; }); \
        }); \
        return static_ ## name; \

Here’s an example use:

ONCE(NSSet *, AllowedFileTypes, [NSSet setWithArray: @[ @"mp3", @"m4a", @"aiff" ]])

Then you can call AllowedFileTypes() to obtain the set, and it's efficiently created on demand. In the unlikely event that the type contains a comma, you can add parentheses and it will still work.

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

Marcel Weiher (tweet, comments):

As far as I can tell, this architectural style comes from having self-contained widgets that encapsulate very small pieces of information such as simple strings, booleans or numbers. The MVC architecture was not intended for these kinds of small widgets […]

With a widget, there is no complex model, not filtering being done by the view. The widget contains its own data, for example a string or a number. An advantage of widgets is that you can meaningfully assemble them in a tool like Interface Builder, with a more MVC-like large view, all you have in IB is a large blank space labeled ‘Custom View’. On the other hand, I’ve had very good experiences with “real” (large view) MVC in creating high performance, highly responsive user interfaces.

Update (2015-04-06): Martin Fowler (via Hacker News):

Probably the widest quoted pattern in UI development is Model View Controller (MVC) - it’s also the most misquoted. I’ve lost count of the times I’ve seen something described as MVC which turned out to be nothing like it. Frankly a lot of the reason for this is that parts of classic MVC don’t really make sense for rich clients these days.

Thursday, April 2, 2015

Unintended Consequences of Usability Improvements

Matt Henderson:

I’m never quite sure myself whether I actually turned the lights off or not. And so, inevitably, I end up delaying my departure from the vehicle for the 30 seconds or so it takes to confirm that the lights are actually off. (And you can imagine that bystanders find that—a guy staring at his car, with its lights on—equally odd.)


The Toyota has a key-less entry system such that if I’m simply in proximity of the car, and in possession of the key, the doors will automatically unlock if I attempt to open them. While nice, it makes confirming that the doors are locked a bit difficult.

WiFi Signal 3.3.1

WiFi Signal (App Store, via Bradley Chambers):

WiFi Signal is a system menu bar application that provides easy access to your Wi-Fi connection details, monitors the signal quality of your wireless network, and can find and recommend alternative channels for your network thus avoiding signal overlapping and channel conflicts that can result in connectivity issues and performance degradation.

It shows that my 5 GHz network has poor signal quality, with 3/5 bars vs. 5/5 in Apple’s menu bar icon. However, it has a better data rate than the regular network, which has good signal quality. It could not find a better channel to recommend.

Custom Swift Switch Matchers


Wouldn’t it be great if we could teach switch new matchers that knew how to deal with our custom objects? Believe it or not, there’s an operator for that.

It’s called the pattern match operator, sometimes known by its (less googleable) syntax: ~=. And switch statements use it behind the scenes to compare values to their cases’ matching patterns.


This is yet another example of Swift employing polymorphism in an unexpected way to make the type system do work for us. Work that results in very clean, concise, and — dare I say it — declarative code.

Semaphores are Surprisingly Versatile

Jeff Preshing (via Jean-Francois Roy):

I used to think semaphores were strange and old-fashioned. They were invented by Edsger Dijkstra back in the early 1960s, before anyone had done much multithreaded programming, or much programming at all, for that matter. I knew that a semaphore could keep track of available units of a resource, or function as a clunky kind of mutex, but that seemed to be about it.

My opinion changed once I realized that, using only semaphores and atomic operations, it’s possible to implement all of the following primitives[…]

Not only that, but these implementations share some desirable properties. They’re lightweight, in the sense that some operations happen entirely in userspace, and they can (optionally) spin for a short period before sleeping in the kernel.


With all of these applications, semaphores are more general-purpose than I originally thought – and this wasn’t even a complete list. So why are semaphores absent from the standard C++11 library? For the same reason they’re absent from Boost: a preference for mutexes and condition variables. From the library maintainers’ point of view, conventional semaphore techniques are just too error prone.

The Death of Optimizing Compilers

Daniel J. Bernstein (tweet):

Have compilers become so smart that they automatically turn clean high-level code for these hot spots into optimized code, removing the need for humans to be optimization experts? The reality, unfortunately, is very much the opposite: general-purpose “optimizing” compilers are falling farther and farther behind the actual capabilities of modern processors.

This tutorial is an introduction to (1) what current and near-future processors are capable of; (2) how modern high-speed software libraries actually work; and (3) the increasing dominance of domain-specific tools to engineer high-speed software.

Hopefully the full talk will be available after ETAPS 2015.

Wednesday, April 1, 2015

Exploiting the DRAM Rowhammer Bug to Gain Kernel Privileges

Mark Seaborn (via Collin Allen):

“Rowhammer” is a problem with some recent DRAM devices in which repeatedly accessing a row of memory can cause bit flips in adjacent rows. We tested a selection of laptops and found that a subset of them exhibited the problem. We built two working privilege escalation exploits that use this effect. One exploit uses rowhammer-induced bit flips to gain kernel privileges on x86-64 Linux when run as an unprivileged userland process. When run on a machine vulnerable to the rowhammer problem, the process was able to induce bit flips in page table entries (PTEs). It was able to use this to gain write access to its own page table, and hence gain read-write access to all of physical memory.


History has shown that issues that are thought to be “only” reliability issues often have significant security implications, and the rowhammer problem is a good example of this. Many layers of software security rest on the assumption the contents of memory locations don't change unless the locations are written to.

The public discussion of software flaws and their exploitation has greatly expanded our industry’s understanding of computer security in past decades, and responsible software vendors advise users when their software is vulnerable and provide updates. Though the industry is less accustomed to hardware bugs than to software bugs, we would like to encourage hardware vendors to take the same approach: thoroughly analyse the security impact of “reliability” issues, provide explanations of impact, offer mitigation strategies and — when possible — supply firmware or BIOS updates.

Printing Objective-C Invocations in LLDB

Ari Grant:

A while ago Facebook open-sourced Chisel, a collection of commands and functions to assist in debugging iOS apps in LLDB.


There is one command that I find particularly fun and interesting yet haven’t had the chance to write about, until this post.

The command is pinvocation (for print invocation) which is most useful for debugging Objective-C methods in Apple’s code (or anything where you don’t have access to the source and thus symbols). pinvocation finds the values for self and _cmd, packages them up into an NSInvocation and then prints it all out for you, including the arguments.

It sounds like a wonderful idea, but I tried it with several applications and was not able to get it to work. I kept getting errors like:

error: error: 0 errors parsing expression
error: The expression could not be prepared to run in the target

Currently, only 32-bit x86 (Mac and iOS simulator) is supported.

Store Within a Store

Ouriel Ohayon:

Messenger “App Store” is the 1st major exception to App store rule 2.25 (i.e. do not promote apps that are not yours)

Why Overload Operators?

Marcel Weiher:

There are two candidates for what the difference might be: the fact that the operation is now written in infix notation and that it’s using special characters.


To my eyes at least, the binary-message version is no improvement over the keyword message, in fact it seems somewhat worse to me. So the attractiveness of infix notation appears to be a strong candidate for why operator overloading is desirable. Of course, having to use operator overloading to get infix notation is problematic, because special characters generally do not convey the meaning of the operation nearly as well as names, conventional arithmetic aside.


I’d say that overloaded operators are particularly attractive (to hacker mentalities, but that’s probably most of us) in languages where this boundary between user-defined and built-in stuff exists, and therefore those overloaded operators let you cross that boundary and do things normally reserved for language implementors.