Horsepower

Today's post is about my computer. I use a Chromebook, quite possibly in ways the manufacturer did not intend. From a distance the marketing for these things seems to imply "browser with attached keyboard". However, there is enough going on under the hood to make this a rather viable development machine for a person like me.

Glorified Intenet Applicance?

The term "internet appliance" conveys to me images of coin-operated web kiosks in bus stations, or perhaps something with a remote control marketed to grandparents. Certainly not something that looks like an ultrabook. Granted, it's not in that league, but it does give a good first impression. Google's intention with this OS and hardware combination is, undoubtedly, to get more people to use the web. That's Google's whole thing. But at the same time it's a gamble, because computers are sold the same way as cars.

1024px-VTech_Model_80-36447_Internet_Appliance.jpg

Figure 1: I want one!

When I tell people about Chromebooks, invariably they react with some common fears. "What if I have to edit an Excel file?" "What if the internet goes out?" The answer is, you're pretty screwed. But wait, come back! Is that a reasonable fear? How often do you edit Excel files? How much work do you really get done if the internet goes out? I would argue that the limitations of a Chromebook are similar to the limitations of a car with a small engine. In most cars, if you were to make use of all the available horsepower, braking force, cornering grip, etc. you would quickly be arrested for reckless driving. For most cars, if you're using more than 60 horsepower you're either driving a truck or you have a lead foot.

More horsepower is better, right?

Now, the reason you can't buy a new car with 60 horses is because it would feel weak. You're used to pushing the pedal down about halfway and feeling your weight shift back into the seat and the landscape begin to blur. But there's a whole science to making the car feel more powerful than it really is. In most cars, if you push the pedal beyond halfway you get diminishing returns, and a distinct "that's it?" sensation. If your car only has 60hp you're going to need to floor it at every on-ramp, and the engine will make an awful racket.

It's common, when considering the merits of both laptops and cars, to think about things you "might need". Maybe you think you'd rather "have it and not need it than need it and not have it". But I tend to look at this from a different perspective. Any power you're not using is wasted. If you buy a 240 horsepower car and only use 60, then you're wasting 75% of it's capability. Or, you bought 3x more engine than you can sanely use. And for some reason that wastefulness makes me cringe. With cars the trade-off between power and economy is widely known. You don't buy a sports car expecting good fuel economy, just as you don't buy an economy car expecting powerful acceleration. But technology and appetites are ever-increasing. Today's "subcompact" cars are bigger than "compact" cars from 20 years ago. The humans that go inside them are slightly larger today too, but the cars are growing faster. Mostly this is a combination of hedonic adaptation and an increasing ratio of leasing to buying (which makes it easier to take on more car than you can afford).

It's a similar issue with laptops. Faster CPUs, more cores, more pixels, more storage space. Although it's much easier to use all these resources without irking law enforcement, a similar fear of scarcity goes into the purchasing decision. "It's only $50 more for twice as much SSD… yes please!" And then if you never use that extra space, no harm done, right? Wrong! Did you buy "peace of mind"? I think not. Indulging a fear of scarcity does not increase your mental health in the long term. Money spent on a feature you never use is, in fact, money wasted. And the waste goes beyond money. The whole time you use the device it's consuming more resources than it needs to. It may not be as painful as lower fuel economy, but it's still real.

A development machine for… what exactly?

This has been a moving target. I do a variety of development things for fun and for work. Lots of C and C++ for work, plus managing things in our enterprise GitHub account. For fun I play around with Elm, J, Chrome Apps, JS, Python, VimScript, and of course the humble Bash Shell.

How does one do local development on a machine marketed as "just a browser"? Crouton. Enough said.

Using an ARM-powered machine for serious, or even "just for fun" development work will quickly educate you about the myth of "cross platform" software. When you see a download page with links for Windows, OSX, and Linux, you may be tempted to believe that it will run everywhere. But what it generally means is it will run on an Intel x86 CPU. Maybe x86-64 if you're lucky. The fact that someone compiled it for (or built installers for) several mainstream operating systems says more about the target market for a piece of software than the capabilities of the program or the machine running it.

That said, the plucky little Chromebook has fared well. Haskell was a problem between GHC 7.3.1 and GHC 7.4.3 or whatever the current version is, because during that window they were sorting out ARM support for their interpreter, and as a result the projects I wanted to try would not build. But other than that it has handled everything I've thrown at it. Both Java's JRE and JDK can be had in Oracle and OpenJDK flavors. GCC is but an apt-get install away. But even pre-release nowhere-near-mainstream projects like Nim work great. Clojure has, so far, been too much of a hassle to set up, so I can't give it an honest evaluation.

With crouton, there are a lot of options for what kind of system you want to install alongside Chrome OS. I experimented briefly with Ubuntu's Unity desktop (performance wasn't great) and XFCE (fast, ugly). But I found a sweet spot in installing the OS without a window manager. Restricting the chroot to a command-line interface makes it easy to let Chrome's window manager do all the graphics. Not having to context-switch from one look-and-feel to another makes a more enjoyable experience as well. Right now I'm typing in Vim in a window with minimal decorations, and I have my browser open next to it.

One type of development that's really suited to this setup is (naturally) web development. You can do front-end HTML/CSS/JS quite easily with a stock Chromebook, but being able to fire up an HTML server to localhost is even better. I've discovered that I really like this arrangement for general-purpose programs.

Where it falls short

At the moment I couldn't replace my work computer with a Chromebook. There, I really do have to edit the occasional Excel file, but more importantly, I need to download and run the latest version of something, quickly, with minimal fussing around. And that something changes constantly.

But I don't hesitate to recommend Chromebooks to people. They work great 90% of the time, and if you accept that, you'll find that you can get the other 10% done with an alternative method, or by doing it on a "real" computer. For me, that 10% gradually dwindled to less than 5%. At this point, if my Chromebook stopped working, I'd replace it with a newer Chromebook.