Monday, 25 June 2012

Linux on the desktop and cheap hard drives

Why isn't Linux more popular on home desktops? A question many people are asking. But I'm not going to answer it yet. Instead, I'll ask: Why are hard drives not cheaper?

Go to Officeworks, or to Budget PC, or Dell, or anywhere, and find yourself the cheapest new computer you can get. How much does it cost? Probably about $300. How much was a cheap computer last year? What will a cheap computer cost next year? Probably about $300. Why?

Cut it down to one simple component: primary storage. A while ago, you could buy a decent new 500MB hard drive for about $75-$125, and that was quite a decent size. (Windows 98SE, for instance, wanted to enable "large disk support" because I was putting it on something >512MB.) A couple of years ago, a 20GB drive was a decent sized piece of storage, and it cost... about $75-$125. Today, I can pull up MSY's price list and see drives ranging from 500GB to 2TB, and the cheapest of them is a 500GB for $72. Same at Budget PC. (There will always be more expensive drives available if you want high speed, high capacity, SSD, etc. I'm looking at the bottom end.)

So why can't I buy a 100GB drive for less than $72? Why can I not build an entire low-end computer for a fraction of what they cost five years ago? Because it's just not practical to do that. It's far more efficient to keep the cost where it is and give you more for it.

When you use a computer, there are costs, too. Back in the earliest days of programmable computers, the user was the programmer was the technician. Then we got real UIs, then graphical systems with cool video effects that don't improve anything, and finally now we have a world in which Microsoft, Apple, and Adobe compete to make the most stunningly useless visual appearance. (How else can you explain Aero?) So much work has gone into user interface construction. Surely by now they ought to be so easy to use that any idiot can use them? Well, yes they are, but that's a separate problem. But no, computers haven't exclusively become easier to use; mainly they've become more powerful. You still need to grasp certain concepts, like the mouse (sometimes you have to grasp the mouse literally, too) and the notion of a button that you can click on.

This phenomenon is even more pronounced when you try to shift from Windows to Linux. On Windows, the predominant philosophy is that one application should do everything. You get a program for burning CDs, and you expect it to be able to make a burnt copy of a set of directories off your disk. It should do the whole job by itself; you configure it through a set of menus and hit a button and it goes. Very nice. What if you want to compress your 1GB of emails so you don't need to put them onto a DVD? (Or if you prefer, your 5GB of emails so you don't have to use blu-ray.) You poke around in the menus and hope that the author thought of that. Scheduled, automated backups? It might have that too. What if you want to retrieve stuff from another computer? Set up file sharing, with the security implications thereof. Want to take a stable snapshot of your database? Out of luck.

The Unix philosophy, in contrast, is that a program should do one thing and do it well. The one that burns CDs isn't responsible for making ISO images (though they're a definite pair and are generally installed together). Simple glue code in the form of shell scripts or pipes can marry that with compression (gzip, bzip2), network transfers (ssh/scp), database dump (mysqldump, pg_dumpall), anything else, and scheduling can be done with external tools (cron). Each piece does its own job and nothing else. You want better compression? Replace gzip with bzip2. No other component needs to know or care.

It takes work to get to know an application. That work does not change, whether you're on Windows, Linux, or some other platform altogether. There's an inherent complexity to the task, and unless you already know the program's interface, there's going to be some that you have to learn. This is a big cost of switching to Linux; partly because there's a whole lot of already-known interfaces that are now different, and partly because there's so many little tools to learn.

But for the same cost, you're given far far more. Instead of knowing how to make your burned CDs use compression, you now know how how to make _anything_ use compression. Instead of just knowing how to run your backup automatically, you can now run _anything_ automatically. Your investment in tool knowledge pays off in myriad ways, some of them quite unexpected.

You're never going to get that $10 hard drive, nor that instant-learn UI. But learn the philosophy of a new system and it'll reward you well.

No comments: