3 Aug 2016

Hidden Settings Are a Great Idea

Autosave on the Mac is a step forward, making computing simpler and safer. I have it enabled on my Mac. But I don't want it enabled for Preview because it autosaves to JPEG, which is lossy. So I wanted to disable autosave for Preview. I looked in Preview's preferences, but there was no such option. macOS lets you disable autosave globally, but I didn't want to [1]. I thought I was stuck — I had to live with generation loss. But something made me search on Google, and I found to my surprise a command-line solution:

defaults write -app 'preview' ApplePersistence -bool no

When you're building an app, every setting you provide imposes an overhead on users who don't care for it. For example, when they may encounter it in the settings page of your app. Or when reading the help or manual. Or when reading an article about your app or asking a friend about it. All this is an overhead, so competent developers ensure that a setting is important to enough users before they provide it. Better to thoroughly delight 80% of your potential users than make a cluttered, confusing, mediocre app for 100% [2].

But there's a way out of this dichotomy, a third option: a hidden setting. Write the code to read the setting value and honor it, but don't implement a UI for it. Instead, that can be left to the command-line. For a Mac app, you'd probably use plist files to store settings. Since this is a standard format stored at a well-defined path for each app, users can use the defaults command-line tool to read, set and delete individuals properties (keys) in the plist.

That way, you have the best of both worlds — you can offer more settings to power users, without cluttering up your app for most users. When users ask you how to do something, tell them about the plist.

This can even be a way to implement settings when you're on the fence about their benefit. Implement it as a hidden setting for a while, and see if you continue to get many requests for it. If so, add a UI for it. If not, remove it, or leave it hidden.

[1] The developer of an app can decide not to use autosave, but not the user.
[2] I first heard of this credo on Daring Fireball, but I can't find the exact link. Sorry.

No comments:

Post a Comment