Monday, June 8, 2015

Post-WWDC 2015 Keynote Thoughts

It’s now been a few hours after The WWDC 2015 Keynote, and I’ve had some time to digest everything. My immediate impression of everything was a little “meh”, but then again, that’s sort of how I feel every year. It’s hard to satisfy everyone.

Second impression is that the WWDC Keynote is no longer for developers. It’s for the end users and wannabe developers. Us old-timers are too jaded to care about this new and shiny stuff, and most of the new products in the keynote aren’t even things developers can use (on that note, was it really necessary to spend that much time on Apple Music?).

Another noteworthy thing–no new hardware. I was expecting at least something, so to hear crickets was a little unfortunate. I can only assume that the inordinate amount of time spent talking about Apple Music was in some part due to a need to “fill time” from what would have originally been a 15-20 minute spiel on Apple TV.

As always, the things that are exciting to me happen in the sessions throughout the week. The Keynote is sort of just a preview of what’s to come. After some perusing through the documentation, here’s what I’m excited about:

Deep Linking

I wrote about this in my WWDC 2015 Wishlist, and it came true. You can now link up URLs to be opened by your application. I haven’t had too much time to play around with iOS 9 yet, so I’m not sure how this works from either the developer or end-user side of things, but my first impression is that Apple did this right.

Besides the notable backtracking of moving search away from the pull-down gesture and back to the left of the home screen (I would have loved to be a fly on the wall in that meeting), iOS Search can now display search results straight from apps in Spotlight.

Just to illustrate an example—my company writes an app called Tweet Seeker that lets people download their Twitter archives and search their tweets locally on their device. Tweet Seeker can now hook right into iOS and display tweet search results right from Spotlight. Now that’s cool!

iPad Multitasking

Remember the iPad Pro? Well, this is it. You take a regular iPad, and you install iOS 9. There. iPad Pro. :claps:

You know those things that you can’t really imagine a use for, or want, and then in 3 months you realize you can’t live without it? Yeah, well, I’d put money that this is one of those things.

I can see this changing how people use their iPads, along with the new keyboard gestures. The iPad is no longer just a toy, or larger screen iPhone made for watching Netflix and HBO. It’s now a tool to get shit done.

Swift 2

I think it’s great news that Swift is going open source “later this year”. Of course, in Apple parlance, that means probably somewhere around December 15-31 (just trying to be realistic here–it’s not easy to open-source something like this, I’d bet there is a ton of proprietary code lurking in that codebase).

Also, I think with this release, I’m comfortable picking up the Swift book and starting to actually learn the language. I am embarrassed (only a bit, though) that I haven’t written a single line of code in the language. With this latest release, I think I might be ready to start jumping in. A 2.0 implies a little more stability, and other developers who were waiting on the sidelines will probably jump in on the fun as well.

Another telling thing is that all the code I saw in the “Developers State of the Union” Keynote was written in Swift. I don’t think it’s any secret now that Apple considers Swift to be the future. As much as we might not want it, it’s going to happen.

If you started learning it a few months ago, though, prepare to have to relearn a bunch of stuff. I wouldn’t be surprised if Apple pulled the rug out from under you.

Apple Music

I’ll keep it brief. I don’t need it. Spotify works great for me. I think its success hinges on musicians buying in. We don’t want another Ping here.


You’ll notice I skipped over a lot of the OS X stuff. I honestly haven’t had enough time to digest it all. So. Much. New. Stuff. Will download and report back.

That’s it for now. I’m taking a walk to think about this all some more.

Wednesday, June 3, 2015

WWDC 2015 Wishlist

Here’s my list of things I’d be overjoyed to see fixed / announced / released at WWDC 2015 next week.


  • Deep linking support. Let apps define associated URLs (* –> open
  • Really want to hide my carrier and clean up that status bar. Such a mess right now.
  • It’s time to modernize the UI for and iOS 6 was years ago.
  • Save alarm and world clock data in iCloud. Re-adding this on every device is really tedious.
  • Export data or save it in iCloud with a password. At the moment, it’s not shared between devices and will be lost permanently if you don’t have an encrypted local iTunes backup of your device.
  • Needs to be a way to close all tabs in Safari without tapping the screen 50x times. Absurd.

  • Search that actually works. Right now this is the only reason I still have the Gmail app still on my phone. I open it up whenever I want to search for a message.
  • Send from an alias like Gmail web client lets you.
  • Better UX for labeling threads.


  • (I’ve mentioned this on Twitter) Fix the UX with reviews of physical locations.
  • Public transit support.
  • Improved traffic data.

App Store

  • Search. Need I say more?
  • Direct refunds without iTunes support involvement.
  • Responding to reviews would be nice.
  • Expire old reviews (1yr+) when new versions of app have since been released.

Safari (OS X)

  • Reopen more than the most recent closed tab in Safari.
  • Paste images into web pages.


  • Stop beachballing so darn much.
  • It would be nice to stop an archive action without needing to restart the app.
  • Debugging extensions is currently a huge pain. It would be nice if it were easier.

Added 6/7/2015

Photos on OS X

  • “Show in Finder”

Sunday, March 29, 2015

The Free, Easy, and Secure Way to Encrypt Shared Dropbox Folders on Your Mac

My wife and I have been searching for months for a service to allow us to store our sensitive files in Dropbox securely. There are a lot of services out there that promise to do this well, but frankly, it’s hard to trust that our data would be safe if they happened to be hacked or compromised. I therefore went looking for a piece of software that was:

  1. Vetted as being secure.
  2. Ubiquitous. Something I wouldn’t need to worry about installing or finding on a future machine.
  3. Compatible with Mac OS X.

TrueCrypt, an open-source file encryption product, seemed like it might fit the bill. However, I must have had my head in the sand about a year ago (sure enough, I was off the grid when it happened), but TrueCrypt was abandoned by its developers with a very vague / scary message on their website:

WARNING: Using TrueCrypt is not secure as it may contain unfixed security issues

Ok then. So that in itself wasn’t reason enough for me to give up. I went ahead and downloaded TrueCrypt from some random site and verified the checksum (remind me which of my family is going to know how to do this?) and installed it (in order to do this, I had to temporarily disable OS X’s protection against unsigned software in “Security & Privacy” in System Preferences).

That’s a lot of steps for someone who just wants to share encrypted files. And more steps are bad—I didn’t want people I’m sharing stuff with to just give up. We’d be back to square one.

Not to mention, TrueCrypt doesn’t offer dynamically sized volumes. You have to specify the size of the volume at the time of creation. This means that if the number of files in a volume you’re sharing hits the limit—too bad. You need to now create a new volume (one with a larger limit) and move all of the existing files from the previous volume into it. That’s a drag. And sort of dumb.

Off I went looking for an alternative. “Wait”, I thought, “doesn’t OS X provide full-disk encryption via FileVault?”. Well, I didn’t actually ask myself that, but I concluded that there must be a way to do this just using a stock Mac OS X installation.

Sure enough, after some digging, I found this on Apple’s support site: How to create a password-protected (encrypted) disk image. Boom! There we have it.

If you follow the instructions (which are quite simple, really), you’ll have a “file” (which is actually a “sparse image”—sort of like a Volume) which you can drop into a shared Dropbox folder and share with anyone you want. To add or remove files to the encrypted folder, you need to double click it, type in the password, and then open it like you would any other volume (like your Hard Drive or a USB stick). Once you’re done modifying files, just “eject” it. Easy peasy. Dropbox syncs it immediately.

Oh—and the folder resizes automatically! Another huge plus over TrueCrypt.

So, in short, you can create an AES-encrypted folder, inside your Dropbox, and anyone else who uses a Mac will be able to add or remove files from it without needing to install any third-party software. And, it’s free.

Go forth and encrypt!

P.S. Windows users might have similar luck with BitLocker.

P.P.S. Jamie Phelps pointed me to this AgileBits article regarding a downside of using sparse bundles and Dropbox (note–a sparse image and a sparse bundle are not the same thing, so the two may not have the same downsides). Knox stores its vaults with OS X sparse bundles, and those have been shown to have issues syncing over Dropbox when simultaneous edits are made. I’ve yet to see this be a problem with using sparse images (since OS X—and Dropbox—treats a sparse image as a single file), but it might be an issue. Jamie recommends SafeMonk as an alternative.

Monday, September 8, 2014

Supercharge Your Python Shell

I’ve been using and working with Python in a professional context for around 8 years. So it came sort of a shock that something so useful, so obvious, was unfamiliar to me until around a week and a half ago.

It involves a little file called .pythonrc that lives in your home directory. To get it to work, you’ll need to define an environment variable called PYTHONSTARTUP, like so:

export PYTHONSTARTUP="$HOME/.pythonrc"

(Major hat tip to kasnalin on Reddit for pointing out that I’d forgotten to include this important piece of info in an earlier version of the post.)

If you’re a Python developer, no doubt you open up a Python shell countless times per day. Whether you use the regular Python shell, or another one such as IPython, it’s all the same. Open up the shell, import a few useful modules, and start playing around.

Maybe you find yourself importing the same modules over and over again. Maybe you leave a single shell open all the time since it’s such a pain to re-type those commands.

I spend a lot of time working with Django, so I’d gotten pretty used to typing ./ shell and then from app import models to start playing around with objects in my database.

Well, I got to wondering what this .pythonrc could do to help me out with this, so I dumped in the following code:

    from app import models
    from django.conf import settings
    print("\nCould not import Django modules.")
    print("\nImported Django modules.")

Not expecting this to work at all, I ran my trusty Django shell, and voilà:

$ ./ shell

Imported Django modules.
Python 2.7.6 (default, Jan  6 2014, 13:22:56)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

It’s like magic. No more reverse searching my shell history to import commonly-used modules. If I find myself using one often enough, I just add it into my .pythonrc and it’s there for me every time.

I play around Redis a bunch, so here’s another chunk of code I plopped in there.

from redis import StrictRedis as Redis

r = Redis()

Now, I can just open up the shell and use r to play with Redis.

Here’s another one I’m pretty fond of. I’m a big fan of tab-completion and readline support. So I put this in my .pythonrc too:

    import readline
except ImportError:
    print("Module readline not available.")
    import rlcompleter
    if 'libedit' in readline.__doc__:
        readline.parse_and_bind("bind ^I rl_complete")
        readline.parse_and_bind("tab: complete")

Works like a charm.

Below is my full .pythonrc, in all of its glory (also available as a Gist).

# vim: set ft=python :

from __future__ import print_function

import json
import sys
import datetime

from redis import StrictRedis as Redis

r = Redis()

    import readline
except ImportError:
    print("Module readline not available.")
    import rlcompleter
    if 'libedit' in readline.__doc__:
        readline.parse_and_bind("bind ^I rl_complete")
        readline.parse_and_bind("tab: complete")

    from app import models
    from django.conf import settings
    print("\nCould not import Django modules.")
    print("\nImported Django modules.")

    from dateutil.parser import parse as parse_date
except ImportError:
    print("\nCould not import dateutil.")

View the rest of the archives