Archive for May 31, 2016

Tuesday, May 31, 2016

1PasswordAnywhere No Longer Works With Dropbox

David Teare:

In the coming days, 1PasswordAnywhere (the 1Password.html file within your Agile Keychain folder) will stop working for 1Password data stored in Dropbox.

Logging into my Dropbox account, it looks like this day has already arrived.

Those were the 3 main use cases for 1PasswordAnywhere when we designed it and each one has a better alternative available today.

Hopefully in 2016 you no longer need 1PasswordAnywhere.

To me it has always been about reducing dependencies. Plain HTML and JavaScript files are about as permanent as possible. The passwords should be accessible even in the unlikely (and unfortunate) event that Agile’s apps and Web service are not available. Even from a different platform and with no network access. It was a nice bonus that syncing via Dropbox produced an up-to-date, globally accessible but password-protected backup.

First, you can continue to use 1PasswordAnywhere with an Agile Keychain stored locally or on a USB drive. Many browsers restrict access to local files, however, so be sure to configure your browser to allow local file access. Just be aware that this could potentially pose a security risk.

Khad Young:

You can get around local file restrictions in Safari by selecting Develop > Disable Local File Restrictions from the menu bar. (You will need to enable the Develop menu first if you haven’t already. This is done by checking the box for “Show Develop menu in menu bar” on the Advanced pane in Safari’s preference.)

In my view, these instructions should be in the HTML file itself, kind of like Apple did with the HFS wrapper.

Also note the recent change in the “Lock on sleep” behavior:

Previously we had it set to auto-lock when the computer itself slept; a recent update made it so it auto-locked when the display slept because that’s what most people expected from the app. (I suspect that most people think a laptop goes to sleep as soon as their display does. It’s too bad Apple got rid of the little “breathing light” indicators on its MacBooks!)

That explains why it started prompting for my password every time I returned to my Mac. I always sleep the display but leave it running.

Mocking Dependencies With Generics

Elmar Kretzer (via Andy Bargh):

You can inject code dependencies in a transparent way by using generics and typealias.

[…]

Those dependencies are loosely coupled, but in my opinion they belong together in a semantic way.

[…]

We end up with:

  • a generic ModelFor taking a type conforming to Environment
  • a typealias Model representing ModelFor<RealWorld>
  • no code necessary to manage the dependencies with properties or whatever

Seven Hundred Million

Nick Heer:

That’s approximately how many passwords to popular web services were leaked over the past week or so, as lists from LinkedIn, Tumblr, MySpace, and others have all showed up for sale on pseudonymous marketplaces.

Troy Hunt is the creator of Have I Been Pwned, a service that allows you to type in your email address or username and see if your account is among those compromised by major security breaches:

Swifty Objective-C

Peter Steinberger, Michael Ochs, and Matej Bukovinski:

Using Swift without binary compatibility would mean that we have to offload technical details to our customers and restrict them in their choice of Xcode to a point where they might not be able to update to Xcode 7.3.1 if our SDK is still compiled with 7.3.0.

[…]

Instead we decided to use Objective-C++ to complement pure Objective-C where appropriate. […] In our Objective-C classes, we only use a very tiny amount of C++ to benefit from the convenience, safety, and performance features of C++. In contrast to full blown C++ implementations, learning a small subset for use in a mainly Objective-C codebase is very easy, even for developers without any prior C++ experience.

[…]

When using generics it gets quite annoying to type the type specifier […] auto will transform at compile time to the above — it doesn’t require any runtime features.

[…]

In Objective-C NSArray can only contain objects. This is both more complicated and — because of boxing — slower for primitive types. […] With Objective-C++ we can simply use std::vector:

[…]

The C++ lock is automatically released when it goes out of scope. The RAII pattern is everywhere in C++ and it’s really great and deterministic. This allows us to do work that requires locking inline with a return statement as the lock is only unlocked after the return.

[…]

Compiling .mm files will take a bit longer than standard .m files, however in our experience it’s worth the slight compile time penalty.