Sync is the new lock-in

I tried to run Firefox, instead of Chrome, yesterday.

But it felt so strange, because Firefox had none of my bookmarks, bookmarklets, passwords, and I just couldn't remember what I was going to do with it.

And in that moment I realized how much I depend on Chrome's sync feature. Chrome owns my browsing because of its fantastic ability to sync all this stuff between all my computers, PC, Mac, everywhere.

Dropbox contains tons of my important files, because it does the same thing.

And I've stopped buying music on Amazon because iCloud is so good at getting music to all my devices now.

Syncing is the bridge between the cloud and the PC and mobile devices. It saves dozens of steps, keeping everything merged intelligently, and even combining metadata automatically.

But of the three examples, only Dropbox provides a way to get to my data from anywhere, through a regular web browser, and with a good API that works with other services.

Google's Data Liberation page (which has a fantastic mission), has PC-era directions for moving your bookmarks to a new browser. You're supposed to sit at your computer and push an export button! And the  instructions provided about how you can view your bookmarks in Google Docs haven't worked for over a year. Google has moved Chrome bookmarks somewhere else now, and while users ask for a solution, none is forthcoming.

This "online viewing" should be a much bigger priority for Google. What if I mostly want to use Chrome, but I want to own my data and occasionally use it somewhere else?

Google has a separate delicious-like "bookmarks" service that appears to be completely different than Chrome's bookmarks. And while I really like social bookmarking sites too, I use them for a different purpose. In the browser, I use lots of bookmarklets and folders, and I really care about what order my commonly-accessed sites appear.

The New Lock-In

Of course, if you think about it, while you're sitting on the couch with your iPad, there is no way to get the  Chrome bookmarks exported from your Windows machine to show up in Mobile Safari. Part of this is Apple's fault, of course.

On the iPad, I can get to my Dropbox, but I can't get to my bookmarks.

And I think there's at least a partial solution in Dropbox: if you care about your users, every proprietary sync feature should have a live webpage, that you can access from anywhere. (And you should work hard at cross-platform support, too.)

Otherwise, like Apple and Google do today, you have created a new form of lock-in. And it's almost worse than the old kind.

In the old way, files were mostly idle on disk, and data was sort of stuck in a hard-to-parse format on a server.

But it is worse with data that changes all the time, because "exporting" isn't good enough. You can't export a moving target.

If you want to access your recent Chrome Bookmarks, you really need to write your own sync utility, or at least periodically export from Chrome.

I want  Google to do the right thing, and I want to use sync feature in Chrome, which is amazing. But maybe I will need to use XMarks instead. This feels complicated, hard to set up, and probably more prone to breaking than Google's solution, so I'm trying not to do it. But it may be the only solution available today.

Data that changes frequently is the hardest to "liberate", but it is also data that is very important to users. It is critical to get this right. We should insist that these amazingly-convenient sync features don't become the next form of vendor lock-in.

Google, at least give me a webpage with my Chrome bookmarks on it?

Always running, or at least running fast

There's something very compelling about writing a little script and putting it online. Because even if someone comes by once every three days and tries it out, there it is! Online always. Software like this is alive in a way that a binary on a PC is not.

It's been fun shipping our f.lux app to the desktop, because it's always on, and even though it does just a small thing, doing that thing without using a lot of resources, and running all the time is sort of neat.

Running all the time hasn't been true of the "app" on the desktop or device. Since we've historically tried to save RAM, launch times have remained inconvenient and excessive. Excel now takes 30 seconds. Visual Studio can take a minute. Photoshop, forever. Sure, we have these annoying tray icon apps with their inconvenient UIs, but the PC is getting slower for doing real work.

Dropbox is always on, and instantly useful. Gmail and Facebook are very fast, because they're already "loaded" into a server somewhere.

Excel XP from ten years ago launches in a half second. This year, Excel takes 30 seconds.

I'm not sure if Apple's quest, with OSX Lion, to ignore whether or not apps have launched yet is the right approach. Apple now hides the little "light" under each icon that says if an app is running, and it tries to restore some application state on reboot. This is good, but it's still too slow.

xCode now takes forever to launch, and so does iTunes. Launch times are getting worse, in a world where that really makes no sense. People's tolerance for 30 second launches is lower, since they're used to mobile OSes, which are fast because the apps are simpler. And people seem to be more distractible: when iTunes takes 30 seconds to launch, most people will have forgotten the song they wanted to hear and will have checked their Facebook messages instead.

You can't ignore the engineering around making launch times small, and complexity makes for sloppiness. A launch that takes a full second is noticeable, and probably most apps should strive for 500ms, at the most. 30 seconds is completely absurd and negligent.

Superfetch, Readyboost, etc., all aren't good enough. Important stuff needs to be loaded into RAM. How do we launch in one seek, rather than 10,000? SSD can't fix everything.

This problem, making apps launch fast, is 100 times as important as making Windows boot fast, and it's 100 times as complex. Hope the next versions of the OSes get to fix this, or application writers start paying attention to it.

Apps should launch instantly, and more real services (not launcher icons) should be loaded automatically, so the launch isn't there at all.

The perception of productivity on the desktop will wane quickly if this particular bloaty trend isn't fixed.

More thoughts on Google+ (after using it for a few days)

My Google+ experience is in that exciting time, with new people are coming in every day. And the extended Google network is also very compelling. Most of the people on Google+ today were invited by Googlers, so it's mostly smart people saying interesting things. I'm amazed in some ways all the people I don't know.

Reshare and Publicity

Many of my earlier comments about discovery/serendipity have been dodged by one thing I didn't anticipate. A huge portion of the content in Google+ is public, like Twitter. This means that there is a public sphere and a very private one. Nice way for Google to be in the game. For me, it's becoming hard to find the private content now (and this is not necessarily good).

Re-share also has some significant benefits. I'm not a fan of the re-share presentation (it should be more compact and integrated), but I get the value of it. To take a public conversation into a small group and talk about it makes a ton of sense. Already, some of the huge public threads have become incredibly unwieldy. I don't care about 500 public comments, but more about what my friends have to say.

The Plaxo Curve

When Plaxo first crawled our Outlook address books back in 2002 and encouraged everyone to invite all their contacts in one go, it was novel, because nothing had ever spread so fast. I recall it took Aol's Instant Messenger nearly 12 years to grow to 90 people per buddy list. But after Plaxo, it took this next generation of social networks not long at all. (My Google+ account has this many people, already.) Since then, it's become necessary for each new service to plumb your email contacts and IM contacts and make friend of a friend suggestions, in order to grow quickly enough.

If you think of it that way, the invite policy of social software results directly in a growth curve. Tagged.com took it too far, spamming friends without even asking your permission. Google's prior effort, Buzz, mostly confused users by not giving enough control. Facebook takes it right up to the line and stays on the side of user-controlled politeness, with a great Friend Finder that can login to a bunch of services.

But especially given the limited number of people on the service, Google's "Plaxo number" is very high indeed. People I don't know are adding me, sort of like Twitter. And I already have >100 people in my circles, despite being on the service for only a few days. Google isn't logging into as many services as Facebook, but they're making the contacts they have count for a lot. Never has adding people been quite so fun.

This bodes well for growth, and with Google's sorting tools, that growth is manageable too.

Invites

Based on promises that you would be able to share any entry by email, I uploaded a video and shared it to 20 people who haven't got Google+ accounts yet. They all got "permission denied" errors and emailed me about them. So it goes with a field test, I guess.

Integration and Speed

The integration with google.com navigation is incredibly compelling. Every search result tells me when Google+ has new stuff for me. I look at that top bar on Google more times per day than my email. Seriously, this is almost as good for Google as building Google+ directly into the browser.

A related bit: Google+ is incredibly fast to load, so I'm never afraid to popup the notification window or clickthrough. For me, Facebook's mobile app in particular has been taking >10 seconds per pageview, which gives me pause if I want to click through an email from my phone, or not.

Limited sharing a good match for photos

My usage of Picasaweb has been declining, but I expect Google+ to bring it back. Sharing by email was laborious, and the previous "groups" interface was daunting. It was becoming too easy to post a few photos on Facebook instead.

That said, I believe the Circles UI doesn't scale as well as it could.

I have too many people in the "friends" bucket, just like Facebook. I started adding "Family" to "Friends" also, halfway through, so I could just share with one group most of the time. Understanding which users are in multiple groups is often confusing. Knowing who you're sharing could be better, but today is not so clear: you have to be really precise about managing people in order for the experience not to devolve into an experience exactly like Facebook.

API

There's mention of an upcoming API. I can't wait.

Circles and Serendipity (Google+ thoughts)

After a few hours using it, I think Google has done a decent job with Google+. It's a gigantic improvement over Buzz.

I also believe they have over-thought the edge case "I'm in charge of my privacy", and perhaps killed some of the serendipity that is the real magic behind social software.

Let's start with some stories.


I'm a new parent

We recently had a baby, and we talk (a bit) about being new parents on Twitter and post pictures on Facebook. But what's amazing is the half-dozen people we both used to work with who've become "parent friends" due to this change in our lives, because of social media, because of the messiness of it, and because of the serendipity of it.

I wonder if in the Google+ world, we would have ever discovered these connections. Using the "Circles" UI to its fullest, I'd have a "parent friends" circle, and I'd not show any evidence that I've become a parent to my nerd friends. Why would they necessarily care? I don't really know for sure that they care, so I probably wouldn't pester them. And that's the fundamental problem with Google+.

And, Once I Broke my Foot

I broke my foot two years ago, and through a Twitter post that wound up in Friendfeed, learned that a former colleague had broken his arm at the same time. It became extra-interesting to post updates because I found out someone was going through a similar set of challenges at the same time.

Is it really like the real world?

The idea that "circles" represent the world exactly like real life seems to be failing me. In real life, people notice I have a baby carrier and had a foot brace, but online, these things don't happen. 

Also, in the real world, I meet new people sort of by accident, and this doesn't happen as much online. The best approximation is a person who makes an interesting comment, and Google+ does this as well as anything else online.

But in some ways, that's why the messy, serendipitous social media "oversharing" works at all. Because it approximates context, not because it excludes it.

Much like eBay and Craigslist created markets that barely existed offline, I think the most magical experiences online are the unexpected and accidental. If you put a thing online that all your real-life friends think is weird, you'll find a million people online who actually agree with you. And if you had to name them all first, you couldn't do it.

I can't remember ever experiencing this sort of serendipity over email. But most certainly it happens every day on Twitter, and occasionally it happens on Facebook.

In some ways, Google+ is trying to do a better, more social email, almost a half Facebook and half an awesome address book, and I grant there's a place for that. But some aspect of it feels like work, not play. Perfect for a company that's a bit secretive but has a rich internal culture, but not so applicable to real life.

And so I worry that the lack of magic will hurt it in the end.


UI thoughts

My overwhelming feeling is that the UI that you use everyday in Google+ has tons of friction.

For instance, maybe I'll spend 5 minutes ever in my life adding friends to circles, and it's insanely cool and fun. Fantastic. Magic.

But then, there's this UI you use every day, the one that creates a "To line" email-style interface to making a post. I don't like it at all. It's cumbersome and a lot of work.

This part of the interface could be amazing, and instead, it's more boring than email. It feels transient, and it's on the wrong part of the page. Yes, if I click the "Friends" container before making my post it sort of auto-fills for me (okay!) but it doesn't show who I've left out, who I'm including, or anything like that.

But basically, it's too opaque. You get a little blue tile that says "Friends" on it, and that's all you know. Once you close the popup it doesn't say how many friends you have, or show their faces or who's online, who's been online in the last week, or anything. It's anti-social.

And it makes me think a lot before posting, which means I'm going to post a lot less. "Is that person in Family AND Friends or just Family? Maybe I'll just email it."

If they fix nothing else, let it be this interface:


What's the filter?

In some ways the brilliance of Facebook is that they've spent a great deal more effort on what the receiver wants to see, rather than what the sender wants to share.

And in so many ways, this focus is a much better approximation to real life than the "need to know" classified access-control-list email addressbook complexity of making a person limit their sharing to a certain circle of friends.

My Facebook friends are mostly the people I believe aren't insane. They might not want to see baby pictures all the time, but I don't mind if they do. 

And I'd rather the software takes care of that....if I put "Baby Girl" in the title, some people won't want that stuff ranked very high, so it can be harder to find. If Facebook doesn't do this already, I imagine their approach leads naturally to classifying content (not just people) and showing information to the right people. (Bubble filter indeed, but why not.)

I know there's an important "user story" about a 19 year old who goes to a party and doesn't want her parents to see the pictures. The trend we've seen is that people facing the un-coolness of their social network ("Mom's on Facebook!") will gravitate to using a different site for this purpose. No single site has been able to "fix" this problem, no matter how good its groups UI. Facebook has a fantastic Groups system that nobody uses, but they don't make it so prominent.

In some ways it will be neat to see if Google+ manages to catch this endless churn and contain it. But I think to do it you have to make cool and identifiable "spaces" for people/circles to interact. (Even Facebook Groups have their own photo galleries.) If there's a circle for your friends, you should be able to brand it, like the new cool site you moved to because your mom joined Facebook. I think a subtle tab highlighted on the left isn't enough.

In trying to contain the "mom problem", again, the network loses. Google+ has a "Share" (reshare?) feature, but this again has a ton more friction, compared with Facebook's version: "Michael commented on Lorna's photo..." with friend-of-a-friend visibility. 

In some ways, the seamless way that FriendFeed would remix streams of friends based on "Like" clicks, and Twitter with Retweet, simply had no historical precedent in online communication. Email forwarding is hard work, and so is the Google+ Share button.

Serendipitous or intentional? Facebook's is magic. Google's is more like email forwarding.

Profiles fit great with Google search, but activity streams not so much

For years, Buzz and Picasaweb kept asking to make my profile public. And I kept deleting it. Here's why.

When you search for a thing on Google.com, you expect relevance. And if you're the one being searched for, you want to look good, or not show up.

If you search for my name, you want to find some relevant things about me. Putting "Mike once liked this dorky video on Youtube" (with a kind of authority) at the top of that is somehow out of context. And it's worse if I did that 4 months ago, and I just haven't done anything since. 

In my Google Profile, social interactions I've had that happen to be public take up 80% of the screen (even if it's empty or out of date!), and links that I've made to important stuff in my life take up the small bit in the corner. 

That sort of "information" makes sense if you visit a twitter.com page, but at a google.com URL, it is not a good representation of a person. You kind of expect "best post of all time" and you get "Mike was in a bad mood when he made a public post 2 months ago."

I'm sure Google has wrestled with this dozens of ways, but I think there's a conflict in there.

Social+

Perhaps Facebook's most audacious and brilliant move is in trying to make the receiver the filter of content, while keeping loose track of potential friends. The filter problem is very unsolved, but it's very exciting as well. If you can show me what I want to see in a single space (not in multiple tabs), and if you can make it relevant based on the content and the context, I think that's a brilliant user experience. 

I think the Google+ emphasis on sender-driven sharing replicates email too closely, down to an awkward UI for sharing (which feels like email forwarding). It makes sense to a person who's in a certain habit of using email all day, but it also misses a huge number of interactions that magically, serendipitously happen online via Likes, Retweets, and simpler interactions online.

Google's first effort is impressive, and I think I will use it more than Buzz. It actually nearly solves the "huge niche" of private collaboration, and maybe people will use it for work more than play.

But in the initial version, I think it fails in not being cooler or more magical in any notable way, when compared to the thought leaders in the space, Facebook and Twitter. Google has tons of magic, but it's just not coming through. Lessons learned from the Buzz launch, I'm sure, an abundance of caution. Don't use the technology to scare people!

But when you allow and encourage serendipity, you get magic. If you worry too much about privacy, you capture a ton of niches that care about these things, but you don't become the new way people communicate online.

You just...become a better version of email.

A smartphone in my laptop

We all know the things our smartphones do well: check for mail in the background, get messages, wake up fast. In contrast, our laptops act a lot like desktop computers that are turned off sometimes. They work like they did ten years ago, before WiFi and 3g networks, and they don't do low-power background tasks very well.

Laptops today have "standby" mode, which disables everything the machine does except for keeping RAM alive. But the machine isn't really useful while it's in this mode. If you've stored a file on it, you can't get to it. If the file you saved is very large, uploading it to the "cloud" might take hours, and your favorite network filesystem probably didn't sync before you closed the cover.

You might have trouble backing up your hard drive (or uploading large files) at a time you're not using your computer for something else. Uploading big files is sort of a "non-foreground" task...you want backups to run while you're not using the laptop at all, not while you're streaming from Netflix.

Maybe to accomplish these things today, you have to leave your laptop plugged in with the cover open, glowing all night. 

I copied 10GB of photos to my Windows laptop tonight, and then waited 40 minutes for it to copy over the network, with the cover open, sitting on a chair in the corner. The PC was across the room from my Mac laptop, which was downloading an OS update, with the cover open, also for an hour. 

You would never design a device to work like that...it's like some mythological creature that can't be disturbed for fear that it will forget what files it was copying and make you start over. It's ridiculous, difficult, and fragile, but it hasn't changed in years.

Laptops wake up slowly compared to newer devices, and they can't do simple network tasks like making something light up when you get new email. When you're downloading a big OS update, and you leave the computer on, sitting on a table in the corner, it's not really using its CPU at all. 

A much smaller CPU with very little RAM could do all these jobs well.

CPUs have gotten better at low power, even though they don't compete with the smartphone versions yet. So have hard drives, as they're being replaced by SSD. RAM still uses more than a watt per chip (smartphones have a lot less RAM than a laptop), and a WiFi radio uses <100mW. 

One big culprit is the desktop-oriented chipsets, which use tons of wattage (like >10W) when you're not doing much with your PC. This is in contrast to the low-power chipsets that are emerging for Atom-based computers, which can stay in a true "idle" state for ten days. Presumably these improvements might come back to the PC, someday.

Intel has introduced a number of new idle states for their mobile platform that dramatically cut power during idle activity. This aggressive management of power state is why smartphones have long life, in addition to optimization of each component. Smartphones are good at waking up quickly, in response to a network event or a user-driven event.

But, I really just want a little smartphone in my laptop.

I want a computer that is a participant on my network, sharing files, backing up its filesystem, doing very slow uploads through my DSL, checking my email, all using a very tiny amount of power. Almost none of these operations is CPU-intensive, or even RAM-intensive. You could power down all but 64MB of RAM and I'd get by.

One complicated way is to make a hybrid version: a coprocessor that can access my disk and a portion of RAM when my "big" CPU is sleeping. Potentially a machine that runs most of its kernel on the low-power CPU, while apps run infrequently on the bigger one? For instance, an x86 CPU could wake up once a second to do a few cycles of work (a "sendfile" or an event-driven network stack?), handing off a buffer of data to a network controller and sleeping some more. If I'm doing a backup or uploading files, I could buffer a ton of data and go back to sleep.

In some ways, the PC model of "saving files" is very slowly being disrupted by the cloud. People are going to stop using Microsoft Office XP someday, in like 10 years. But the PC model is being disrupted much more rapidly by mobile platforms. Part of this is the square peg of PC hardware model that seems to have frozen some day back in the year 2000. The PC hasn't evolved to be part of the network, and in fact with the laptop, it's gone backwards, because you have to turn it off so much.

From what I can tell, people are not using laptops every day, and yet they are storing valuable data on them, and their home network connections can't sync everything instantly. This is just a very confusing state. 

"Post-PC devices" have demonstrated some abilities to do background tasks all the time, not just when they're asked to. You could imagine tons of tasks that could run in the background.

The old platform might do well to try, just a bit, to keep up.

Is Microsoft's consumer failure actually developer failure?

Most people don't understand how far off-course Microsoft's developer tools have gone in the past five years. Today is just five years since Ballmer's "Developers developers developers..." keynote, and in retrospect, it likely was the unlucky omen, the "protest too much" that brought down the ship.

Let's talk about money first.

Today, Microsoft's most expensive developer tools package is called "Microsoft Visual Studio Ultimate Edition" and it costs $11,899. Regular developers who just want a compiler with a profiler can buy a version for $5,469. If you don't pay that much, you can't profile your code to see what's fast and what's slow. 

And of course, there are many alternatives with fewer features: there are 1126 versions of Visual Studio to pick from.

Apple's most expensive developer tool is called XCode, and it is free. You can pay $99 for a subscription that allows you to publish stuff that people can download through the app store (and you also get early releases of Apple's OSes.)

Microsoft says very clearly that you should develop for their platforms if you have to, and not because you want to. It seems that they intend to make a ton of profit on these tools, rather than making a ton of profit on their operating system, Windows. And amazingly, revenues for Windows are down 4% this quarter. 

To be fair, they have free "Express" versions of their software, which don't allow you to edit user interfaces, or use third-party plugins, like source control. I don't understand how these versions are supposed to encourage people to develop for Windows. For instance, many native apps written for Windows have some tie to MFC, but the Express versions don't support MFC.

Microsoft's developer tools come with all sorts of SQL databases and "team foundation servers" and enterprise-sounding integration, and there's a "servers" pane when you open their IDE that only connects to Microsoft servers.

But: if you want to write a game or deal with video or read an image, you have to separately download a huge DirectX SDK, and then a lot of your old code won't compile. For instance, with some code I made to read images from a webcam for f.lux, upgrading to the new versions has missing header files and no suggestion of what the replacement might be.

Microsoft has a very fragmented installed base (with XP at 40% of users), so certain features are only available on Windows Vista or Windows 7, and they do not make it easy to say, "I really want this app to run on Windows XP." Using Apple's tools, you say, "I want to support this level of OS" and the tools do the rest.

Microsoft's developer samples are mostly very old, and the basic story is that they spent all their effort on .NET/ASP/C#, to the exclusion of providing equal access to the OS from native code, or compatibility layers to make stuff run the same way on XP and later versions of Windows.

So if you do care about the 40% of users who haven't upgraded away from XP, you are in this strange game of chicken with Microsoft. You want tools that build one thing that runs everywhere, and Microsoft are obstinately waiting 10 more years for everyone to be running some Windows-Vista-derived OS with only managed binaries on their PC. You'd love to compile on 64-bit Windows 7 and 32-bit Windows XP at the same time, but you really don't get to.

Chicken.

Apple's XCode comes with subversion and git integration, and it builds "universal binaries" that package up multiple builds for multiple OSes. Apple's OS X has a nice shell with an SSH client, so you can manage your server that runs Linux. You can build binaries for multiple versions of OS X by pushing one button, and the code samples are up to date, and they all compile.

Windows 7 shipped "Powershell" which takes 15 seconds to launch and nobody understands.

Microsoft seems to say to developers: if you're not developing for Enterprise, we simply do not care. Our developer tools business unit can be profitable if we sell licenses for $11,000, but not if we give them away for free. And presumably, in some weird twist of Microsoft politics, the snake eats its own tail: maximize developer profits and your platform stops having any new apps in just five years.

It's confusing, right?

In Microsoft's "ecosystem", seriously talented hobbyist developers are not welcome. Not doors-open welcome, maybe junior-high-school welcome. Seriously, they turned off the dialog editor in their free tools. 

So this part is obvious: all the people who are using Apple's free tools or Google's free tools or Linux's free tools to make cool stuff can ship it to consumers, while Microsoft's developers are a different breed, the stuck, the legacy...working for big companies who have to do it this way.

The big story isn't even about the iPad. It's why nobody else can get good developers on their version of the iPad, or the phone. And it's because Apple already had developers using their tools, years before they made an iPhone. And they made it easy for new ones to come on board. They made it free, they made it compatible, and they made their sample code compile.

Today, companies are developing for so many platforms at a time. When you use a tool only 20% of the time, for one of your platforms, for some of your users, it doesn't make sense to pay a premium for it. That $11,000 tool you use 20% of the time is like a $55,000 tool you use 100% of the time.

It seems that in the new world of free software, and Apple and Google, developers are sometimes kids from countries where people don't make much money. Certainly not enough to afford Microsoft's tools. 

I don't think that the conclusion is hard: Microsoft needs to give up their little bit of revenue they make from exploiting IT budgets for the "developer tools" line item, and price, package, and explain their software so it makes sense to people who haven't already been doing it for ten years.

Consumers, consumers. consumers?

On writing things down

I found this wonderful little bit of advice-poetry from Manuel Blum a few weeks ago (probably via Hacker News.)

It's called "Advice to a Beginning Graduate Student":
http://www.cs.cmu.edu/~mblum/research/pdf/grad.html

While the whole thing is quite wonderful, the piece that has been wreaking all sorts of havoc in my head this week is the idea that writing makes us smarter.


You know what FINITE AUTOMATA can do.
You know what TURING MACHINES can do.
For example, Finite Automata can add but not multiply.
Turing Machines can compute any computable function.
Turing machines are incredibly more powerful than Finite Automata.
Yet the only difference between a FA and a TM is that
the TM, unlike the FA, has paper and pencil.
Think about it.
It tells you something about the power of writing.
Without writing, you are reduced to a finite automaton.
With writing you have the extraordinary power of a Turing machine.

And you start thinking about that, maybe with your pop psychology hat on for a minute, and realize that being in a certain "state of mind" is just a badly-made FA, where you loop and loop through the same state, never really breaking out of it. And if maybe you're depressed, you do some cognitive-behavioral therapy and fix it by converting that state of mind to something explicit, almost a program that is external to that state entirely.

Maybe back to getting things done in the real world, you think why there are limits to what you can talk about or how much you can get done in a verbal meeting, because your short-term memory is more equivalent to a FA than to a Turing Machine, with its rather large amount of tape. So to really make complicated things or organize complicated tasks, you again have to write them down.

And then again, you think of the successful user experiences, and how amazingly the Facebook news feed is almost literally a tape that a Turing Machine would use, a sort of written record that can be read and written...all of life but in a very linear fashion.

There are dozens more, but it makes it very easy to say that our written language is the most important invention, ever.

Intel AMT on new Thinkpads

I got the huge (but pretty) Thinkpad T510, with a big screen. It is good enough that I don't use my Macbook Pro all the time now. I've been doing some work on Windows 7 (mostly unrelated to Windows.) It has a gorgeous screen with high contrast, and great battery life. Quite a departure from the other PC laptops, even if it's moderately huge.

However, I wanted to grump about one thing. There's a whole lot of "remote management" software installed by default on this machine.

One technology is Intel's AMT. It runs a webserver on port 16992 underneath your operating system. It's not entirely obvious how to login or change settings for it. I never figured out how to change the settings, but I was able to disable it through the BIOS.

AMT allows remote reboots, remote web access, and some access to the filesystem.
Intel's RPAT allows remote KVM, also below the OS layer.
Intel's AT is an anti-theft technology that can keep the computer from booting.

All this stuff is shipping on new laptops, some of it vaguely "on". In theory your IT administrator is supposed to configure it and use it to do stuff to your computer, and it's all magically secure for the enterprise.

But this sort of interface massively increases the attack surface to a regular machine. And any worms that manage to also infect this layer could have some serious impact.

And just to be a little bit offensive: my computer shipped direct from China with all this stuff turned on. Given Google's experience earlier this year, configuration like this should probably be turned off by default. Even if it's just to make me feel better.

Consumers shouldn't feel paranoid when they inspect your default settings.

But it is a fine machine otherwise.

eBook typography + User Experience

I've been a Kindle user for a little over a year, and I was looking at Google's books effort just now. I've not seen the mobile clients, just the web version.

I have a half-dozen small complaints about Kindle, and mostly I'm a happy user. But Google does very little to improve on Kindle, which is disappointing.

For instance, I haven't seen what Google does when you buy 100 books, which is overwhelming and hard to understand on a Kindle device.

But I have two other complaints that don't seem to be addressed in what appears to be a Kindle clone:
  1. Typography. Books have a personality, and a lot is due to the uniqueness of their layout and typographic choices. Much is lost in the eBook of today.

    Real-life books use unique fonts, and they have a variety of typographic settings. Instead, by making every book conform to the same exact point size, to the same leading, to the same font (Georgia, but, look, I can switch to Times!), is boring and makes switching between books feel less engaging.

    The world would be better if eBooks used Typekit, or even if they had random defaults to adjust their typography, to give a little more personality. Within a certain kind of variation (small color, spacing changes, etc.), readability wouldn't be impacted, but switching between the 5 books you're currently reading would be very much improved. Recognition at a glance is important, whether that's a book cover or a page. Today's eBooks badly need a typographic personality.

  2. Search. Another major limitation with a Kindle, especially the hardware version, is that "flipping through" is very slow. Google does a decent job "flipping" online with the arrow keys, but Google's search solution on the Web is no better than Acrobat's...it's off to the side, and dissociated from the paging interface. It's a 1998 interface.

    Why not make accessing reference books much better than Kindle? For instance, why isn't search somewhere near the paging interface, and why aren't the results shown in the same spot instead of in a sidebar? Similarly, moving the slider bar doesn't flip through pages (or better, zoom out!)...instead it just does nothing at all until you mouse-up.
Openness is only a theoretical benefit. User experience is a real one. I don't see a real competitor to Amazon (on any front) right now.

Those Tricky PC makers (a hunt for a laptop)

I'm in the market for a decent Windows 7 laptop. We're getting enough Win7-related f.lux bugs that I want a machine that works to test and develop on. I'm mostly using XP now, and have a junky Win7 Best Buy Special laptop I got for $400. It wasn't worth it.

After a ton of shopping, I realized what everyone else has realized: probably the best PC laptop on the market is called a "Macbook". I had to think for a minute about why I will spend $1700 on a Mac laptop, and I'll hesitate whenever a PC laptop costs over $1100.

This $1100 effect...I wanted to put it into words, and I figured out what it was: "They're trying to trick me." If you pay the PC makers more money, they give you more junk. They have no taste and no guide for quality.

Lenovo thinks they can put a screen in their expensive T410 business laptop that has a backlight so dim that you can barely use it in a bright room. Their users complain for years, but they don't make a better one (except on their enormous models). The Macbook's is 2x brighter. The Macbook Air's is 2x brighter. Lenovo's has a contrast ratio a ton worse than my 1998 Dell (that's 1/6 the contrast of a Macbook). The display on my thinkpad inverts intensities if you tilt it upwards by 40 degrees. And their mouse/trackpoint thing has worse drivers now, after 15 years of being great. It's worse than Windows 3.1 again.

HP makes a super-high-end machine called the "envy", and then crams it with crapware, and makes trackpad drivers that are almost unusable. And then to make me extra-happy, kills their highest-end screen, to replace it with a lower-resolution one with worse specs. But the retail price is a bit lower.

Dell still has some of the same designs from 1998 (including the keyboard and battery life). I'm scared of their awful keyboards, or I'd spend more time looking.

Norton. McAfee. TRIAL. Slow.

And so literally, 10 years of shaving $5 here and there, and there's no PC laptop that has a moderate weight, a great screen, a ton of battery life, and doesn't ship with software you don't want. I actually miss spending $2500 on a laptop that tried to get some of this right. Because there is just no way to do it.

You can buy a 17" Desktop Replacement that has a pretty good screen and has 45 minutes of battery life. Or a Sony. Maybe a Sony.

Better screens cost more. So, no PC maker is willing to ship them, even as an option. Unless you're talking about a really heavy big model where battery life doesn't matter.

But the most interesting thing is that I can at least quantify my own Apple Effect.

I will pay 50% more if you don't trick me: if you have a product line that consistently gets better as I pay more, not just heavier. Battery life should get longer, screens should get better, in resolution and quality, and you should have some sense about why a laptop shouldn't have a full-size keypad and weigh 14 pounds. I don't want 8 cores or a 60W video card. But I do want a decent display and a great keyboard.

And you shouldn't ship anything, ever, with "trackpad gestures" that don't work.

The road to a good product cannot be about squeezing costs without actual engineering. It doesn't mean making make-believe "Adamos" and "Envys" that still have the same problems as the lower-end models, but nicer cases. It means a core promise: we are not going to trick you. We care about making the best thing we know how to, and we'll give you some cheaper options if you want that.

I would love to see a PC OEM say, "This model is $100 off because we filled your computer with craplets." Because that's why you're getting a deal. But on the high-end model, why?

Or "$50 cheaper because this screen can't be viewed at all if you tilt your monitor 20 degrees too far."

Or "Congratulations! You've saved $10 on a keyboard that sways around as you type!"

Or, if there were a retail presence for PCs that cost more than $600...then I could just look for myself. But retail is something only Apple is doing well, too.

I know everyone wants a useful computer for $400. But where is the one that lets you get actual work done?

Metabolic Path Finding (day of hacking with Jeremy)

My college roommate Jeremy Horwitz visited, and he mentioned that he was trying to figure out how to solve a scavenger hunt path problem in San Francisco. It sounds on the surface exactly like classical Traveling Salesman: 16 points, and what order should you visit them?

But it turns out that walking in San Francisco isn't like LA. There are hills, and you sort of want to optimize for them when you're planning to walk around. So we started wondering if we could model how hard a hill is to climb.

Jeremy found the SF bike route planner, which we used as a base. The author had a friend with GIS software, who associated height data with each street crossing in the city. This height data makes it easy to compute slope for each span (and dx/dy is the standard way, not degrees).

However, the author just put a threshold to avoid ever taking paths that were too steep. There's no real sense in his code that going up or down is either worse or better than biking on a flat surface.

By now we had started Googling for biometric data about how efficiently people walk at different slopes, and it turns out there are some really great studies about this.

Back in 1938, a researcher named Margaria had found that walking at a -10% grade was the most efficient for humans. Fast-forward to 1993, and a paper by Minetti et al measures oxygen intake at different grades, and even does a nice quadratic fit at different speeds!

On to the races.

I was able to make the following two-liner change to the bike route planner to utilize this data. I just assumed the "most efficient" walking speed, but you can tune based on faster velocities or whatever you want.

  inclinepct = 100 * incline
  inclinePenalty = 110.87 + 10.114 * inclinepct + 0.516 * inclinepct * inclinepct


So now, we have a way to compute all the pairs of asymmetric weights for a graph, and the path finder will use it to compute routes around San Francisco!


But as you recall, the original problem is to do a walking tour to a number of points in San Francisco in minimal time. This is a "traveling salesman problem" and it's very expensive in the brute force case (O(n!) even). Most approximate solutions assume points are either Euclidean (i.e. simple edges weighted only by distance), or they assume symmetric weights (i.e. going from A to B costs the same as going B to A).


We found that most of the good approximate solvers at least made the symmetric assumption. However, we also learned about a technique to split the set of points into two digraphs (with twice the points total), such that each graph is only connected to the opposite side's nodes. This makes it possible to simulate an asymmetric graph using a symmetric solver.


We were able to convince ourselves using Georgia Tech's Concorde TSP solver that the whole thing could be solved for 16 points to visit using only seconds of CPU.


Time to prototype: ~12 hours to make scavenger hunts more efficient.

Most awesome thing: knowing how much oxygen you might use, walking between two places.

College Tuition Bubble (one more thing about that)

I ran across a bunch of articles this week wondering about the college tuition bubble.
Here's one in The American.

Thinking about this last year, I reviewed some numbers for schools in California. While I don't have them handy, one set of numbers jumped off the page.

I wanted to share that two factors are at play, not just one:

Tuition has gone up....and....
Need-based aid has gone way up, too.

The system has grown tuition with the incomes of the very rich, and a much larger fraction of students are given aid to help pay for school.

This scheme allows the schools to enact variable pricing, which allows them to charge extra money from the rich parents, while extracting a lesser amount from the usual student.

But those curves are really scary, I agree.

Apple: No downloads, just streaming?

I was interested to hear the appleTV announcement today. Apple has decided to remove "downloads" from their TV product, and instead only support "streaming".

So I opened my "Mad Men" folder, which has TV shows from iTunes, and they're mostly 1.5GB files.

1.5GB for a broadcast show is >5Mbps.

So I went to look at U.S. residential broadband, and found this great article:

U.S. residential broadband speeds average 50% of advertised speeds


Using this chart, and some more math, it appears that 75% of U.S. broadband connections are not capable of streaming a 5Mbps HD stream.




Without downloading first, of course.

Thoughts on Flipboard, why Quake is better than vi, mouse/keyboard vs. iPad...

I was just marveling at the UI in flipboard's iPad app and thinking a bit about why it is so relaxing, and so fast at the same time.

Flipboard has simply amazing visual design, but the navigation is equally compelling.

One reason is that the "flipping" gesture and the "touch/click" gesture are both incredibly fast.

Technically all the touch devices have had these gestures, but there's an important improvement in flipboard. The links aren't tiny. 

Flipboard made me realize how slow it is to click on a tiny link on a normal website on a touchscreen (it almost works, but it is 10 times harder than it should be). And actually, it is similarly slow to click on a link using a mouse, even though I'm pretty experienced with a mouse. All those tiny "next" buttons on the web should just be made bigger.

And flipping? Flipping isn't necessarily faster than hitting an arrow key on your keyboard, but it is fast, very fast.

But all this made me stop and think a bit.

On the old desktop PC, we still have keyboard interfaces that make you choose: mouse or keyboard?

Mouse, or keyboard?

I have two hands, but amazingly, the desktop got it really wrong.

Using the arrow keys makes you move away from the mouse and to the keyboard, and back again. The iPad makes you do no such thing. Click, scroll, flip, all without changing the device you're using.

So I thought for a minute about who might have solved this in the old model, and I came up with two examples.

Photoshop and Quake


Photoshop has shortcuts to its tools, all accessible with the LEFT hand, and the mouse can stay in the right hand, handling painting, selection, zooming, etc.

Quake players use the "inverted triangle" W-S-A-D to drive motion in a game, and the mouse at the same time to shoot.

Two hands, two devices. Right.

Kudos to sites like dpreview.com, who are in the rare set that provide a left-hand keyboard navigation for browsing articles in their Forums, while the right hand is free to scroll, click things or select text.

But mostly on the desktop we have messed up. We've kept scrolling and navigation as the right hand's duty, page up, arrow down, mousewheel, click. The left hand gets to do nothing, and it could do a lot.

Outlook fails: arrow keys, or mouse?

Gmail (vi-style "j, k, u, y...", etc.) totally fails. These UIs are all keyboard-only, or mouse-only. Most novice Web users use the mouse and can't gradually learn the keyboard, because the jump is too big.

Certainly the touchscreen interface makes a ton of impact, but if Flipboard says one thing on a UI level (and it says tons in other ways too), it's that the touchscreen UI's we're using today are not baked yet. They are going to get even better.

We shouldn't somehow stop at HTML5 with tiny links and scrollbars and incompatible gesture systems. The UI has to change as the input devices do.

We should make new UIs that take advantage of the new medium. That might mean bigger buttons in some places, and it might mean more gestural input, but one thing I know is: it means not having to change input devices constantly, like the keyboard/mouse combination gives us today.

A lot of websites and apps should focus more on how fast people can actually navigate a UI in real-life. In most cases, this is more important than how fast a webpage loads from a server. Interaction speed is harder to measure, and so it gets mostly ignored.

But of course, both kinds of speed matter, and thinking about interaction time makes for more enjoyable software. Every time you have to click on a tiny link, it eats a tiny bit of your patience, and makes your computer a less enjoyable place.

Flipboard makes you relax, and it feels fluid. Listen to that.

Getting rid of ZFS dedupe (and a new drive enclosure)

I previously wrote about my ZFS NAS, and how I managed to get dedupe to write moderately fast with a cheap SSD drive.

I've decided to go back on the decision to use dedupe at all, and I have some pretty great fast and noisy hardware to talk about instead.

Today, the publically-available "build 134" of OpenSolaris has quite a few dedupe bugs that make simple operations like destroying a dataset or even rm'ing a bunch of files very slow, sometimes leaving a server unresponsive for a day at a time. These bugs are getting fixed (there's a lot of talk about "single threading" and things like that), but it has been 6 months with not a lot of forward progress. The Nexenta guys are patching their OS from the development versions, which apparently are buggy, but I didn't want to deal with any of that.

At the same time, I had a security camera logging to my NAS, and almost filled it up. I tried to delete an old 500GB snapshot, and it locked the machine trying to remove all the deduped blocks. Basically there was no way to free up space. Also, my dedupratio at the time was about 1.8...when you're using 5TB on a 4 x 1.5TB RAIDZ there's no easy way to go back.

So I decided to get more disks and not ever turn on dedupe again.

I considered building a totally new server in a new enormous case, so I could put more disks in it. But this is tricky: you can get the cooling wrong, and a lot of the off-the-shelf bigger cases sound like wind tunnels. Instead, I decided to do it like datacenter guys do it: get a "direct attached" drive enclosure.

I found this enclosure from Sans Digital: the TowerRAID TR8X.

The TR8X is not cheap in home NAS terms (it's $400, plus a $300 LSI SAS controller), but compared to a box from Dell (which costs thousands) it is very cheap. And it has the advantages of a "real" external drive enclosure: it has good cooling, it has hot-pluggable drives, and it's actually SAS, so every OS on earth will recognize the drives instantly, and you can use enterprise SAS drives if you wanted to spend the money.

It turns out the cheaper "port multiplier" SATA controllers have mostly buggy drivers, even on Linux sometimes. But this SAS one works everywhere.

So I plugged it in.

I don't usually believe theoretical performance numbers will ever really happen, but a ZFS stripe on 8 drives actually did give me 700MB/sec performance.

With my old 4-disk setup, I was also nervous about running "single parity" RAIDZ. With this upgrade I was able to go to RAIDZ2 (so 3 disks have to fail before there's data loss), and the TR8X is still pulling >320MB/sec read and write with all that turned on. And a scrub of 5TB takes less than 4 hours. It's way too fast for anything I do.

This enclosure isn't for everyone: it is quite a bit noisier than my old quiet NAS, a lot of that is due to the really noisy Hitachi A7k2000 disks I got.

But it is a really solid piece of hardware, performance is amazing, and I didn't have to do a whole lot of reconfiguration to upgrade.

I wish everyone luck with dedupe, but I'm going brute-force for now, instead.

Native Code vs. Browser (a test)

I was really happy to see this test (from themaninblue) comparing Canvas, HTML, SVG, and Flash. It says that Flash is a little bit faster at drawing a particle system, not that much.

I ran his tests for my desktop PC, using the "1000 particle" mode:
And in the land of the blind, the one-eyed man is king...

So just for kicks, I coded up a native windows particle system just to compare. (It's quite safe to try, if you have Windows.)

My code runs about 350FPS on the same test

I know that's sort of silly, but it also looked bad if I used more than 1000 particles at a time. So my simple code is 12x faster than the fastest Canvas browser, and 8x faster than Flash. I suspect some of this is the Javascript time, and some is drawing.

This is not a GPU-based app. It doesn't even use DirectDraw. It doesn't use SIMD. It's just a 32-bit bitmap that I draw stuff to, in a loop.

So it seems like there's a bit of room to make browsers faster without requiring a GPU. Or maybe there are better opportunities to do vector operations in browsers and make Javascript use less time.

But overall, I don't know why we're not paying attention to pixel-bound inner loops in the browsers, like people have for years in native code. There's apparently a lot of room for improvement.

Client Fragmentation: Apps making software more expensive

I'm hearing stories of companies that want to ship on multiple platforms, where the only solution for a company is to hire 10 people to deal with it. And this seems like a lot, until you think about what's happened over the last few years.

You want to ship a client for the  iPhone, Android, RIM, Mac, Windows (Linux?). Of course, to make it more fun, Microsoft has managed to fragment XP against Vista...certain features just aren't available in XP.

Back in 2000, you might take VC funding to pay for expensive Sun servers and bandwidth. Now you need a pile of dollars to hire enough people to port your app to five platforms.

For the most part, all of these client platforms use separate languages, skills, toolchains, and development environments. You have to physically shift from a Mac to a PC, or you have to launch Eclipse to write Java code, or other days xCode, or emacs, or Visual Studio. This is all relatively new, since in the past, most developers could work in one place, and they got good at it.

Now you might be expecting history to repeat itself: one platform gets all the market share, and everyone writes software for it! That would be the 1990s outcome. (It was fun when the worst bugs we had to deal with were "A LaserJet shared from NT4 to Win98 prints upside down." Seriously. Recompile.)

Of course, I left out the Web, which is the market share leader right now. And that's actually one of the reasons it's different this time.

So to me, the absolutely brilliant thing Google has done with Android is to fragment client development. (They might not see it this way.)

With Android, I have to write Java code. And honestly, it was hard enough to make my C++ stuff work in Objective C. If I really want to be portable from desktop to mobile, I need at least three code bases now, and that's ignoring RIM and separate resources for iPad, etc. When you cross language boundaries, there is no #ifdef shared code, there is no "fix this on platform X", there's just hard work.

You end up moving a code process ("this doesn't compile anymore") to a manual one ("our project manager said I should implement this feature sometime"), and that is dangerous and error-prone territory.

Google's approach looks smart for the Web, because it makes browser compatibility look like a cakewalk. In short, client fragmentation makes writing code that runs in the browser a lot more attractive than it was 5 years ago.

Everyone knows that Apple has been even more insistent on the current fragmentation, and in the short term it has helped them: they have locked up the best developers right now. Developers hate switching environments, and so more people seem to be making apps for iPhone than any other platform, Windows included.

But in the long-term, innovation will happen in the places where it's easy for a team of 2 people to get something done that everyone can use, and I don't think successful businesses will be built around a single client platform. (Good demos absolutely will run on one platform. But after that, there's hard work.)

I think fundamentally, every time you switch languages or IDEs or physical machines to do a task, you should probably have more people involved. And as we shift languages, we've moved processes that might have been "fix the code to make it compile on the Mac" to some meta-programming process, like "we have to reimplement this feature in Java for Android."

When you have 5 developers trying to coordinate a feature set, you need people to manage it, and people to re-design it, and software gets rapidly more complicated and slower to make. Bugs are slower to fix, because your RIM guy moved over to do the iPad version, and he doesn't want to shift gears this week, maybe next? So there's another project manager to keep track of that task. Big company processes, for the smallest projects.

My project f.lux has given me some of these headaches. It's a C++ app on Windows, an Objective-C app on Mac, and a C thing on Linux. And as I'm looking through Android kernel source thinking about hooks to access Snapdragon hardware that are not currently exposed, or trying to figure out how to hack in .kext's on jailbroken iPads, I realize fundamentally this is a worse world than having one environment to deploy to. It makes me want to write Windows apps ten years ago, or Web apps instead.

One possible secondary effect of this fragmentation is that open source can help solve some of the details pretty well. But it is important to say that most of open source is corporate-funded today, and only a few very important projects get seriously committed hobbyist involvement, so I don't think this is a panacea in most ways.

For apps and businesses that need to add features and fix bugs quickly, we've got an expensive mess right now.

In the meantime, you can write for the browser, and do a client or two where it makes sense.

The world has definitely changed.

A Flawed Browser UI: the case of too many TABS

I have been watching myself avoid working in a variety of clever ways.

Most of them center around the browser, and the "tabbed" browser UI is troubling me more and more. You could say most of them are flaws in my own use, but I think they are common enough that solutions should be found.

The tabbed browser is broken. It's a bunch of tabs, often ordered badly, and the overhead of navigating it all is making computers gradually less useful for me.

I use browsers for News, for Research, for Apps, and as part of a collaborative experience.

People send links via IM, Email, or Facebook, and I click on them, which immediately disconnects the content from the original discussion. I don't know who to reply to about a certain article, because it's unclear exactly why that tab is actually open. I don't know when the tab was created, and I don't know which task I was doing when I opened it.

Often I will have 100 tabs open. I have seen Safari eat my wife's Mac with way way more than this. The "hunt" through the ten windows and 100 tabs is no fun and needs to get fixed.

Some of my tabs will be half-read articles that were interrupted by another task. Some of them will be things I've mostly read but didn't close. They don't close themselves, they don't even try...

Some of the tabs I've never looked at. Some of them are lazy bookmarks, things I'm keeping open so I can compare "A vs. B" later, except it's really hard to do that, because lining them up is quite hard.

But I do notice that I have "sets" of things...stories opened from a discussion, references from a Google search on an obscure programming term. And rarely do I think in advance, "I'm going to create a new window and start a new task."

We could have sets. We could have tasks. The computer could figure it out and make it make sense. I am really sure that a 3GHz quad core CPU could figure out "these things are all links from google results pages with setTimeout in the query string."

(And yeah, IE does some color-coding by domain, but this is just visual noise, not organization.)

I need some really amazing ways to group tabs by task, to save sets of them, and to have the UI connect back to the places I came from.

If I do a Google search to figure out how to write some portable Javascript, I will open ten tabs along the way, and then I will eventually find the single page that shows me the answer, and the whole task should go away in one click. Today, I have to close the 10 pages individually, and the Google search window that was around in case none of those pages contained an answer. Wouldn't a great UI do this grouping for me?


If I click on a link from Facebook or Twitter, and then I want to leave a comment for the person who sent me that direction, why should I have to look through tabs to do this? Wouldn't a great UI link these pages together?


Or maybe I'm shopping online for the best energy-efficient lightbulb, and I've opened 50 pages talking about that, and Windows update comes along, and I say, man, I want to come back to this later. Wouldn't a great UI let me save them as one 'library' of stuff and close 50 tabs at once?


And what about when I sit down at my computer to look something up, but instead there's some phenomenally juicy page on the top of my browser that makes me forget what I was going to accomplish and read it instead? Wouldn't a great UI somehow ask me what I wanted to do when I woke up my laptop? Google could (and should) make this fantastic.


I am seeing a ton of add-ons and random hacks that try to do things like this, but I think this set of problems is so core to the experience and so important to get right that we have to re-think the organization of the browser.

Adding tabs to the browser was a huge step forward for so many reasons, but it is time to help people organize the work they are doing on their computers, not confuse them with distractions and 100 tabs at a time, which is mostly what my computer is, today.

Today, I usually just quit the whole thing, lose all my state, just to avoid having to look through the entire mess. This can be so much better, and it doesn't even take a miracle, just some smart code and good UI.

Software Lens Fixes (barrel distortion, etc.)

I read with some interest this article on lens distortions from dpreview. I had no idea the Canon S90 was doing so much software lens correction!
http://www.dpreview.com/articles/distortion/


That's the image out of the Canon S90, natively.

It back me back 15 years to my college dorm room, when I had the original black & white Quickcam. For this old camera (~1994) Connectix had chosen a lens which allowed more light and sharpness for less money, but at a cost of terrific barrel distortion.

Back then, I posted some ancient code to do a bilinear warp of the form r = r + ar^3 + br^5, a polynomial approximation that seems to be able to fix most lens distortion. This code caches the warp map, and applies it to video in realtime. I'm sure it barely compiles anymore, because the hardware is really ancient:



Today you'd probably want to use a much better interpolation than bilinear, but this one was realtime for video back in 1996, which seemed pretty cool at the time.

Really all lenses should have these kinds of computations done automatically in the processing pipeline. It would give a benefit to weight, sharpness, and cost. And the software isn't that hard to write, either.

The dpreview article mentions that optical corrections for barreling tend to introduce a mustache distortion (which even the most expensive lenses aren't able to fix perfectly).

It seems to me like lenses should have some of these distortion measurements built-in, and the data could come through the processing pipeline directly.

My impression is that DxO and Photoshop CS5 are keeping external databases of this information, which is nice for the moment. It doesn't necessarily make sense to talk to a network service just to process a RAW file. But I guess it makes it possible to do this sort of correction right away rather than waiting 10 years for metadata standards to adapt.

The Mac "Fast Path": Safari 4 vs. Chrome 5




I did a quick benchmark of scroll speed in Safari 4 vs. the new Chrome 5.

My benchmark is, "Drag the scrollbar up and down furiously in Google News while running Shark."

And Chrome feels a lot faster than it did before. A lot.

But, Chrome still pegs the CPU during my test. Amazingly, Safari doesn't use all of a core. Scrolling in Safari is a relaxed day for the CPU.

The shipping version of Firefox has a profile more like Safari's--apparently it's using the system functions to scroll bits. However, a new experimental Firefox that uses layers (aka hardware textures) experiences a bottleneck quite like Chrome's.

Maybe in this case, people are slowly reading back from hardware textures instead of blending to surfaces in memory. I don't really know the details, but my experience as a coder is that there are a lot of slow ways to do things on a Mac.

It occurs to me that one of the things that Windows has done well is to expose layers of abstraction and optimize a ton of permutations, so when you want to go "one level deeper" you can, and you can make it as good as the function built into the OS. If you want to write your own DirectShow filter to be in the native pipeline to the hardware, you can. If you use a weird mode in Direct3D, it is often still fast. You can mostly understand the profile and what's holding you up.

Apple provides tons of options for drawing bitmaps: blend modes, color calibration, ways of drawing bits to the screen. But not many of them are fast. If you turn on the wrong color-management bits, your app can become 50x slower, and this is no good.

In the early days of graphics workstations, vendors would optimize one or two "fast path" ways to draw to the screen,. But in the world of awesome NVIDIA drivers, now a lot more of those options are fast, because we've had the benefit of 15 years to work out all the details.

MacOS X seems to have some "fast paths" and a lot of slow ones that developers are getting tripped up on. But it is one thing to make a few abstractions that do a few things well, and another thing to make a platform that does anything you want to do well.

Today, it is difficult for Flash to get the best video decoding (my 10.1 "Gala" build of Flash chews CPU like a pig while Quicktime is nearly idle), and it has taken a year for a team of really smart people at Google to get a browser to scroll almost as fast as the one Apple provides. Picasa draws its UI 10x faster on Windows. The trend is not so good, unless you use Apple's widgets all the way up and down.

Steve Jobs should very simply stop criticizing other companies' performance until he makes his platform fast by default. Whether it takes sample code or performance tuning help or improvements to the OS, Apple's own apps shouldn't be running 10x faster than other apps that do the same things.

If the other companies really were actually lazy or incompetent, you'd understand, but honestly, Netscape Navigator back in 1995 scrolled fast, on Windows 95, on XWindows, on System 7. It's not a new, hard problem for an OS to do something like this well.

It's probably time for some new benchmarks, because when some of the bottlenecks are below the level of the applications, it's hard for people to understand who's at fault.