aaron@traas.org

The home of Aaron Traas — man of faith, science, and very bad humor

Aaron's blog, page 2

Planning My Exit from Google Apps

Today, Google announced an enhancement to Google+ and Gmail that I think is a step too far.

It sounds innocuous and even helpful. If you use both Gmail and Google+, people who can see your Google+ profile will soon be able to email you directly from your profile. It's handy, because you don't need to manage your own list of contacts; if you can encounter the person on Google+, you can send them a message.

Some people have objected on basis of privacy violations:

This is a fucking mess. Google just made it really easy for strangers to email you https://t.co/uX4gQHmr3i

—Joshua Topolsky (@joshuatopolsky) January 9, 2014

This is my primary objection to Facebook, and why I've refused to use it as a medium for communication: it has become the primary mode of exchange between a large percentage of people. To many friends and family, Facebook is the Internet, and they never leave it's walled garden. They coordinate events and meetups exclusively on Facebook, and thus people without a Facebook account are barred from entry into these events. I literally haven't heard from many of these people in 6 or more years; they no longer use email or SMS.

I'm not arguing that de facto protocols should never change, be augmented, or be replaced. I argue that the primary channels of communication must remain open. Facebook is not Open. Google+ is not open. I cannot make an implementation of Facebook myself, and communicate with Facebook via published protocols. Google+ is no different. Gmail, a proprietary product that adds functionality on top of email, enables me to communicate to users of Hotmail, Yahoo Mail, or any other service that implements the Simple Mail Transport Protocol defined in RFC 821 in 1982. But if Google is trying to direct people away from using email addresses, and instead make Gmail the messaging tool for Google+ users, I want out.

This is going to be a long process. I rely on Gmail for all https://traas.org email for my family. I rely on Google Calandar to keep my family organized. I'm using Blogger to write this blog post. I use Google+ to complain about gadgets. I use Google Drive to store and edit documents and notes. I use Google Voice to have a portable phone number and voicemail that isn't crap. I buy a new Android phone every year.

Google+ and Blogger will be the first to go. I've already disabled the Google+ comments on this blog. I'll be looking to migrate to something Python/Markdown based for blogging. On Google+, I will remove all my circles and posts. I will use it as an identity to improve the SEO of my website, and nothing more.

I won't be leaving Android, because there is no other open-sourced mobile OS that's gained any traction. I will minimize my use of Google services on the platform, to aide in my ability to switch to a different platform if one arises. iOS is not an option for me. I find the walls of its garden too high.

Gmail will be tough. Real tough. It offers a number of features that are non-negotiable, including great filtering, labels instead of folders, two-factor authentication, and first-class Android and iOS apps. I don't know what I'm going to do here. I'd like to switch to something that makes PGP easier, if possible.

I'm not surprised. Google canned XMPP support when they rebranded Google Talk as Hangouts. I understand extending the protocol to add capability; that's healthy. But not maintaining compatibility with a protocol used by a lot of platforms and blessed by the IETF as a mechanism of interchange between instant messaging frameworks is negligent at best, and hostile at worst. I accepted, once they did that, that they would eventually cross one line too far.

An Android User's Review of the iPhone 5

I really, really like Android. A lot. I've been an Android guy since well before I got an Android phone. It just always lined up more with the way I thought an OS should work. I was always hopeful for WebOS, but it never felt quite finished to me, and HP bought it only to kill it a year later. In addition to my preference of the way Android works at a theoretical level, I'm also a heavy Google apps user, and that's kept me on Android as a primary platform.

I've felt, however, that I've never given iOS a fair, honest shake as a primary device. After a month with an iPhone 5 as a second phone (the first 2 weeks I used it as my primary), I can say that this is absolutely true; as a gadget nerd I really aught to have given it more of an effort. There's frankly a lot on the platform to love. And also plenty to hate.

Hardware

I was quite happy with the hardware of the Nexus 4—a solidly built, attractive device with a great screen and fast internals. It's completely destroyed by the iPhone 5 here. The screen, in particular, on the iPhone 5 is only about 10% better, but it's a huge 10%. The two areas where it's simply better is color calibration and uniformity of brightness. The latter is a bit harder to pull off on a larger phone, but there's no excuse whatsoever for the former. Using the iPhone 5 has made me so unhappy with my Nexus 4 that I'm planning on installing a custom kernel this weekend that allows me to adjust the color. Like, seriously, this could have been fixed in software!

The build quality is just brilliant, and because of the nerrowness of the phone, it fits in the hand far better. I'm not a fan of using the phone naked; though it's beautiful, the sharp edges dig into my hand a bit. It's also delightfully thin and light.

The battery life is a hair better in my use than the Nexus 4. I initially had some issues with it, but I tracked down an app that was grabbing location data continuously, and that was making the phone's daily lifespan into a useless range.

The camera, as expected, blows away the Nexus 4's crummy shooter, but I honestly don't care that much, because taking pictures from my phone isn't really my thing.

Though the hardware difference that makes my Nexus 4 the most jealous is the LTE radio. I'm on T-Mobile, and they've been rolling out their LTE network in NYC and the surrounding areas lately. The LTE download speeds haven't been that much faster than HSPA+ (the best I've found is around 25 Mbps, and I've found comparable HSPA+ speeds in those locations), but the real difference is the upload speeds and latency. All of my network operations feel much faster. In my town in Jersey, some of the spots where T-Mobile had spotty coverage and would previously drop down to Edge, I'm getting a decent LTE signal.

One little thing I now desperately desire on my Nexus 4 is the mute switch. It's so damn useful. I know Android has great software toggles for this sort of thing, but the additional affordances of having a hardware switch that can make my phone instantly meeting/church/theater friendly is fantastic. It's such a little thing that's really great. I never used the switch on the iPad, but I don't take an iPad everywhere with me.

The screen size is a bit small, particularly for web browsing and reading. I'm used to the monster 4.7" Android devices now, and the iPhone feels... cramped. I don't know how I'd survive with the smaller screen of all the previous iPhones. This isn't a dealbreaker for me at all, but I do prefer a larger screen.

The new "Lightning" connector is interesting. Apple changed the connector from the 11-year-old proprietary connector dating back to the original iPod to something that's maddeningly not micro-USB, which is the standard that every single phone manufacturer other than Apple uses. However, Lightning is the nicest interconnect I've ever used. The best part: it doesn't matter if you plug it in upside-down. That's freaking brilliant. It just snaps in very solidly. Every night before bed, I plug in my iPhone 5, and then fumble for 5 minutes in the dark trying to plug in my Nexus 4. I really can't wait for one of the wireless charging standards to become ubiquitous, so they can get cheap and we can use them everywhere, but until then, we're stuck with this situation.

Software

Though the hardware is really great, and beats the vast majority of Android phones neatly, the software is the more interesting difference. iOS is fundamentally and philosophically different than Android in its goals, and thus the surface-level similarities are really cosmetic. The preference for one or the other is polarizing. The real reason I wanted to use this as a primary phone for at least a couple weeks without jailbreaking (which I still haven't done at the time of writing) was to see for myself if my preference for Android was genuine, and not based on a superficial knowledge of what it is to own an iOS device.

The good stuff first - the OS is really, really polished. The median perfomance of the Nexus 4 is on just as responsive as iOS on the Nexus 4, but the outlying cases is where iOS shines. It never, ever seems to drop below 60 FPS, no matter what it's doing. That's phenomenal. Even though on the Nexus 4, I get 60 FPS 99.9% of the time, that additional 0.1% of time is really key to making the platform feel more solid and real. And I'm not one to talk about "magic" with software; I've done everything from basic web apps to debugging a SCSI tape IOCTL in the Linux kernel. It's all comprehensible to me, but the consistent, uniform performance is the closest thing to "magic" I've seen in years. It's simply quite amazing.

And, frankly, shame on Google for not having this fixed yet. Android is way, way smoother and faster than it was a few years ago, but it's still not good enough. I don't want to hear damn excuses about garbage collection or or the extra safety of bounds-checking in Dalvik or other nonsense. If you can't have your render thread deliver a consistent framerate for 2D compositing on first-party apps on a quad-core Snapdragon S4 Pro, that's kinda sad in 2013. I mean, you've got more compute than a high-end desktop chip from like 5 years ago.

The polish of the OS also extends to the better iOS apps. Apple has been doing, more consistently and for longer, a better job at teaching developers to make apps that feel cohesive to the platform. Google put in a major new effort with Ice Cream Sandwich 18 months ago, and that's helped an awful lot, but they still haven't caught up. Tweetbot is just better enough than Tweetlanes to make me prefer it. Prompt blows ConnectBot out of the water. The iOS versions of Vine, Evernote, 1Password, etc. are better than their Android versions. And, frankly, this is the key reason some geeky power users, who I'd expect to prefer something super-customizable like Android, legitimately prefer iOS. It's nice to be able to drink from this well.

But certain classes of apps are more functional on Android: notably ones that sync large amounts of data in the background. Because of the limits of what iOS apps are allowed to do in the background, particularly when push notifications are recieved, they are made to feel slow and janky compared to their Android equivalents. This primarily effects RSS readers, mail clients, podcatchers, and similar apps. The lifecycle goes like this:

  1. Recieve push notification for, say, a new email recieved
  2. Tap on said notification to launch the app
  3. Wait for app to load
  4. Wait for app to sync with server and download new emails
  5. Tap on email to view.Whereas with Android, when the push is recieved from the server, the app is woken up, and immediately begins downloading the new content before the notification is presented to the server. That way, when the user taps on the notification, it brings them immediately to the appropriate email message or whatever. I know iOS 7 will likely mitigate some of this issue, but it doesn't do so for me right now.

This is exacerbated further in applications that want to sync a large quantity of data, like podcatchers. An app can only run in the background for 10 minutes at a time, so when you're syncing podcasts, which can be hundreds of megabytes each, you have to do it more or less manually, because they'll often time out otherwise. Whereas on my Android phone, the quite excellent Pocket Casts simply downloads my podcasts in the background at its leisure with no action on my part.

Related is the actual terribleness that is notification center, which Apple added in iOS 5. It was a huge, huge improvement over the previous system, but it's primitive compared to the notification tray in Android 1.0, let alone the truly excellent and interactive notifications in 4.2. The worst thing is the tiny little "x" button that I can never seem to tap—let alone tap twice—to dismiss a bucket of notifications.

I know this is a personal thing, but many, many touch targets, particularly on toolbars in the header or footer of the screen, are too small. I frequently fail to register taps, and in some case gestures. Also, there seems to be a bit of a lag between when I press the home button and it returns me to Springboard, and that drives me nuts. I wish Apple enabled the same gestures as on the iPad for going home and switching tasks. I also find the μk1 on web views to be way too high, but on list views, it's just right. The fact that I'm nit-picking about these sorts of details is likely and indication that I've really spent most of my time, historically, on Android, and have developed a preference for an Android feel, so take this with a grain of salt.

Back to Normal

After spending a few weeks forcing myself to use the iPhone 5 as my primary device, going back to normal is nice. I've noticed my usage patterns change from before. I default to Android for most tasks. I do use the iPhone for certain things, however. Most notably and consistently is the Camera -- the hardware and software on the iPhone 5 is just plain better, end of story. The second is Twitter, as Tweetbot is just better than anything available currently available for Android. The third, strangly enough, is a Google app: YouTube. The screen is a hair better, the speaker is louder, and is on the side, rather than the back. And then there's LTE. Most importantly, however, since I use my Nexus 4 for most things, I tend to go through battery faster on Android, and thus I have more battery available on the iPhone 5.

I'm glad I did this. It's nice to see how the other half lives. I really get, for the first time, why power-users like the platform. I actually appreciate Android more now as well, for what it does very well. Though it's not my platform of choice, it's an excellent platform, and a fantastic device. I also can't wait to try iOS 7.

  1. Coefficient of kinetic friction. A higher μk means greater friction force, which means that the object in motion will slow more quickly. See this article for more info (Wikipedia).

Mac Pro Replacement: Thinking Backwards

As Marco Arment mentioned numerous times on his blog, and reiterated with his co-hosts on Accidental Tech Podcast, the current generation of Thunderbolt, both in terms of bandwidth and latency, is insufficient to use to augment a laptop with a high-end GPU and pools of CPU and RAM, especially in a daisy-chain scenario. If you attempted such a thing, where you connected, say, an 11" Macbook Air to an external box with a CPU, GPU, and huge pool of RAM, the communication between the laptop's CPU and the resources on the Mac Pro Replacement (henceforth, "MPR") would be way too slow to yield a smooth experience for games, high-end 3d, video editing, etc.

But what about turning the whole formula around. The MPR could be a box with a pair of Xeon CPU's, a really beefy professional GPU, and gobs of RAM, optional hard drive, but no OS. It connects to a Macbook of some sort over Thunderbolt. The laptop suspends the OS, migrates the OS to running on the MPR, and then the MPR takes over, using the laptop as an external display, keyboard, and trackpad, and hard drive.

In other words, most people are thinking of the MPR as a docking station with some additional compute resources, whilst my proposal would make the MPR a fully functional computer sans OS, with the OS and primary storage provided by the externally attached laptop.

Now, I'm not saying Apple will do this, but this is a way they can.

Learning Python

As I've told numerous people over the years, a real Computer Scientist should be able to learn a new language in about a week. Maybe a bit more if it's a particularly strange language. But most imperative or OO languages should take about a week to learn for someone who is any good at the craft. Now, I'm not talking about mastery. Every language has its own set of idioms, tools, quirks, bugs, performance characteristics, etc. that take quite a bit longer to completely understand. I refer to, instead, basic competence, i.e., the ability to write functional, clean code, and reasonably ability to read well-written code in the language.

I took it upon myself to learn Python a couple months ago. I've been meaning to do so for years. I had just been introduced to Codeacademy, and I wanted to evaluate it so I could recommend it to other people wishing to learn how to code. It's very theory-light, but otherwise a good way to introduce someone to writing web-centric code. While I was there, I noticed the Python track, and decided to do it.

I was infatuated very quickly. As in, instantly.

First, I have a confession. Most of the programming I've done in recent years has been JavaScript and PHP. Both of them are pretty terrible languages in a lot of ways. Effective, but terrible. PHP in particular, though it's incredibly effective and performant enough, is really weird, has a powerful but often ill-conceived and inconsistent set of standard libraries, and has a lot of really odd behaviors in general. I have always loved it, however, for being a down-and-dirty language that doesn't get in your way for doing very simple things. Compare writing a simple email form in PHP to what you'd have to do in Java. In PHP, the whole thing can be done in one file that's mostly HTML, and has a dozen lines of (ugly and nasty) PHP code that does all of the heavy listing. In Java, you'd have to start a full blown project, make a couple of classes, set up a build system with Ant or Maven, build your WAR file every time you make a change, using dozens of files to do something that's ultimately very simple. Yuck.

It's no secret that I strongly prefer scripting languages for most small- to medium- scale web programming. Sure, there's cases where you want to build your RESTful API in C or Java for performance reasons, but I don't really see any point to building anything past the middle tier in a compiled language. If cacheing is used, you can make most front-end logic performant enough in even the slowest scripting language (coughRubycough), and it's also really easy to just through more hardware at the problem, which is typically cheaper than using more programmer time.

What I always liked about PHP is that it made string parsing and formatting really, really easy. Sure, it's a mess, and most PHP coders are terrible, but it's so simple to just get something working, fast, and with minimal code. Python, in most cases, is better than PHP at this. In some cases much better. In many cases, it requires even less code. Additionally, it encourages better coding habits.

Case in point: slicing. In PHP, getting the second through fifth characters in a string is pretty simple:

$my_string = "Hello world!";
$my_substring = substr( $my_string, 1, 4 ); // "ello"

Python really takes the cake with this one using a technique called slicing:

my_string = "Hello world!"
my_substring = my_string[1:5] # "ello"

Using slicing operations to replace string functions is just really nice, and makes for extremely readable, natural code. Plus, the same slicing operators work on lists (Python-speak for arrays) as well as strings.

The flow-control and looping structures in Python are simple, clean, orthogonal, and without any extra crap. Compared to PHP which has the really terrible C-style for and switch statements, Python is a breath of fresh mountain air.

One of the most valuable traits Python has over PHP is it's opinionated nature. When you want to do something in PHP, it's really hard to figure out what the best way is. There's usually a dozen or so options in PHP for any given operation that will yield a correct result. Python, in contrast is incredibly opinionated. It tells you (and enforces) the right way to indent code. It shows you the right ways to iterate through a list, the right way of handling string formatting, etc. It seems to have an opinion on everything, and even where it doesn't, the community does. This, of course, is not without its drawbacks, as I don't always agree with Python, but there's quite a uniformity in Python code online that doesn't exist in PHP

There's a few things in Python that seem a little clunky_—_mostly the different ways lists and dictionaries (read: hashmap or associative array) behave in for loops. I'd rather it always behaves as if you were using ennumerate(mylist) or mydict.iteritems(), as that seems to make the most sense. I'm personally not a fan of elif, preferring languages that provide the more natural and modular else if. I personally don't like whitespace being meaningful.

Where I actively dislike Python is its handling of object orientation, particularly the way you need to make a self parameter as the first (uncalled) parameter of every function. This makes it harder to read the code and see what member function signatures actually are to the outside world. Yes, I know that's how the this pointer in most languages actually works under-the-hood, but I don't think it's something that ought to be exposed in a very-high-level dynamic scripting language. It's just a messy implementation detail that I see as unnecessary.

Though PHP has a few strengths, Python a better language, full stop. It has a cleaner syntax, has a better community, is more enjoyable to code in, and has fewer unexpected behaviors. However, it's highly unlikely that I'll use Python any time soon for web programming.

Why? I primarily build web applications to order for clients. These live on their own server environments. All of my clients, right now, are running PHP, ASP.NET, Java, or a combination thereof. I'm not going to convince them to switch from PHP to Python. And why should they? PHP is performant enough, the hosting is cheap and readily available, and there are more PHP developers out there than Python developers (even if they are, on average, of lower quality). So I'm stuck with PHP for a while.

Which is why a lot of the trendy web developers really need to get off their high horses and shut the hell up. PHP is a practical solution for a lot of use cases, and it's most important trait is its ubiquity. It might not be the best language, it may not even be very good. But it is everywhere, and allows an awful lot of developers to be extremely productive.

Where Python has very quickly become my go-to language, however, is automation of simple tasks. I've already replaced a few shell scripts and ant tasks I depended on with much simpler and more featureful Python scripts. The fact that Python is installed by default on OS X and most Linux distros is really nice. I really, really wish Microsoft would include it by default with Windows; maybe they'd stop hemorrhaging web developers to the Mac if they made it a nice development environment out of the box like OS X is.

Keyboard Shortcuts

?
Show/hide help
Right
Select right-hand menu
Up
Next menu item
Down
Previous menu item
Left
De-select right-hand menu