Thursday, April 22, 2010

Usability Apothegms

A common saying in computing is that “Security is inversely proportional to usability”… or something like that.  As we critical examine the security of our systems, we realize we need to put measures in place that make the system harder to access and thus harder to use.  A good interaction design can help mitigate the usability issues, but at the end of the day a system that doesn’t require me to memorize a password or login is easier to use than a system that does.

We can say definitively that security and usability exist in tension.

As software architects we seek simplicity in our designs in the name of maintainability, if not intelligibility.  We also seek modularity in the name of reusability. I submit that simplicity and modularity exist in tension.

Accepting a priori that simplicity is the absence of complexity, we can obtain the simplicity of a program by measuring its complexity.  A field of computer science called algorithmic information theory defines the complexity of something to be the length of the simplest program for calculating it.  We might infer from this that a monolithic program (no components, no objects, no abstractions, etc.) is a simpler program than our common object-oriented code.  In general we can say that modularity implies no small increase in the use of abstractions to enable that modularity.

In object-oriented* systems, an increase in modularity results in a proportional increase in complexity.

I limit this to object-oriented systems purposefully.  In my experience functional programming languages modularity is de rigueur.

Monday, April 12, 2010

Converting Oranges to Apple’s: Meta-competition in the Platform Wars

Updates to the developer agreement in the new iPhone SDK restrict developers to using C, C++, or Objective-C to create their native iPhone applications.  That is, they must have been “originally written” in one of those languages.

This move has made its rounds among the pundits and bloggers.  Rather than rehashing any of those points, I’ll give my own opinions on why Apple made this move.

Make no mistake, this is about stewardship of the iPhone experience.  Steve Jobs has responded to the criticism (emphasis my own),

[…] intermediate layers between the platform and the developer ultimately produces sub-standard apps and hinders the progress of the platform.

Before you go say they’re really just trying to kill Flash, let’s address that up front.  Flash does not run in Safari on the iPhone for the same reason that you are prohibited in the developer agreement from hosting a virtual machine in your iPhone application.  As the steward of the platform, Apple has to attempt to ensure that users have consistently good experience.  Trying to squeeze a bloated swf player into a memory and processor constrained device is just not workable currently.  As any iPhone user can attest, websites that are not optimized for mobile browsers are horribly slow to load.  Flash content would just make that worse.  And, guess what, my mom doesn’t know that your website or Flash animation is a pig, she just thinks her phone is slow.

Let’s look at it from another perspective.  The latest incarnation of Microsoft’s flagship development suite, Visual Studio 2010, has been re-written on their WPF platform.  Well, everything except the splash screen.  You see, it takes too long to load WPF and .NET up to affect the desired result of a splash screen—giving you something to look at while the main application loads.  The iPhone developer guide makes it abundantly clear that you should load something as quickly as possible to give the user the sense that your app is responsive.  Try explaining to your mom that, yes, her phone has registered her tap on the application icon, but that it has to spin up a virtual machine or load some large libraries that abstract away Cocoa.

Next, try to explain to her why the extra cycles required by the VM and/or interoperability libraries drain her battery.  She’ll just be annoyed that she’s constantly plugging the darn thing in.

Apologies to all the technical moms out there.

so, Flash [1] is not the target here, at least in the sense that Apple cares if Flash is around or perceives it as a threat.  And, assuredly, we cannot say that stewardship of the performance of the phones is the only reason.  That’s part of Steve’s “sub-standard apps” argument, and it is not entirely convincing given that it becomes an optimization problem, and developers are notoriously good at those when they set their mind to it.  As a steward though, you really cannot afford to wait from them to figure it out.  Nevertheless, I think the original ban on virtual machines and this subsequent tightening to a whitelist of languages comes down to a stewardship of a different kind: keeping out the riff-raff.

Keeping up with AppStore submissions is already pretty hard and very expensive.  Developers are often frustrated by the time it takes to get their updates into the store, especially developers used to patching websites with no downtime. Don’t imagine for a second that your $99 covers the cost of the program.  This is Apple’s investment in the ecosystem.  Imagine the deluge of useless, crappy submissions they will get if every Flash developer and every VB developer can just tick a box to target the iPhone.

But, it’s not just about raising the bar for entry to keep out sub-standard developers and their apps.  They have to look after all those developers who have committed to their platform.  They aren’t going to invest significant resources to enabling C#, VB, Python, Ruby, or Flash developers to compete against their own. 

Apple is not interested in seeing your app run on a Droid, Windows Mobile 7, and iPhone.  They are actively controverting homogenization of the mobile application marketplace.  They have an insurmountable lead[2] in the mobile applications marketplace, and the iPad, another device on the iPhone OS platform, marks the next step in their overall competitive strategy for leveraging that lead.  At the center of all of this is the AppStore, perhaps the single most valuable asset in computing today.  Whereas no one controls the Internet, Apple owns the AppStore outright with all the rights and responsibilities that entails; think of and their AppExchange.

Microsoft has long understood that developers are what make their ecosystem work.  Steve Ballmer’s famous rallying cry, “Developers! Developers! Developers!”, is poignant illustration of this reality.  Apple understands that to usurp Microsoft’s position in the PC and enterprise markets, to continue their domination of consumer segments, they need a large population of developers that understand their platform.  What they don’t need are more ways for developers to “write once, run everywhere.”  In the platform wars, he who has the developers wins.


[1] Anyway, it isn’t just about Flash.  Look no further than Microsoft’s Windows Mobile 7 announcements to see that.  Silverlight, a Flash competitor to say that least, will be the native platform of those devices.  Where Flash is Silverlight will surely follow.

[2] I believe that Google will continue to have limited success as a web-native device.  There is a significant segment of the marketplace that just want a phone, email, web-browsing device.  RIM has an Apple-style loyalty thing going for it.  Microsoft?  Well, they still have such a big footprint; they could fail and still make a huge impact.  I think the move to Silverlight helps shield their effort from their internal Windows-Office power structure enough that it actually has a chance of competing, but they are way too far behind to win.  There’s not a huge population of Silverlight developers in the world, after all.