Saturday, March 27, 2010

The Pros and Cons of Open Source Software

Many people wonder why people like me spend so much time and effort configuring Linux. I used to have a Macbook, which worked pretty well, ran all the programs I needed, and required little maintenance, but I sold it and use Linux almost exclusively again. A naive question would be: aren't the days of my time I spend dealing with problems in Linux worth more than the comparatively small cost of the Macbook? (That was my reasoning at one time.)

I think there are 2 big reasons I use Linux despite the greater time investment.

First is that nobody can get it right. I can recall very few instances of someone selling or producing a piece of technology where they built it properly - it seems to always have some problem. In the case of a technology as complex as a computer system, this problem is compounded to the point where people are not getting nearly as much out of their computers as they could. Many think that Macs are well-designed, and though they aren't too bad, they still have many, many problems. In the face of such poorly designed technology, I'm forced to build things myself.

Indeed, the appropriate response to bad, complex technology is to piece together smaller bits of technology until you have a system that does what you want. This is what I can do with Linux that I can't do with any commercial operating system. The small, simple programs you can get for Linux are among its greatest strengths. The cost is that you have to figure out how to put the small pieces together yourself.

For example, I hate the integrated nature of a desktop environment, and all they extra junk they put in your way. A "desktop" is just a view of one folder on your computer that's always open, but I don't need it to be always open. I can just go there when I need it. I don't like screensavers, or a login screen, or a "Start" menu. When you buy a commercial operating system, you have no choice but to have these things. When you put the pieces together yourself, you can avoid them, but it involves figuring stuff out: like what window manager you like and how to configure it and hook it up to the X windows server. I also don't like windows that you drag around and that start with their own sizes, but prefer Tiled Window Managers (I'm currently using XMonad, and I have yet to determine whether it works well). Tiled window managers are pretty much unheard of with commercial operating systems.

The second reason I prefer Linux is that there are inherent problems with a single company writing the software that controls your computer. You have to trust them not to do malicious things with your computer, such as send themselves information on your computer via the Internet. You can't tell whether they're doing so, because they don't release the source code. With Linux, everybody can look at the source code, so people wouldn't be able to get away with such activities, because people would see it. Another problem is that computers don't last forever, so whenever you get a new one, you'll probably be confined to upgrade to the newer version of the commercial operating system you use. But what if you don't like the interface of the new version? Or what if it goes too slow, or does something else you don't like? With Linux, it may have taken me a while to configure it, but I can now copy my configuration to every computer I use in the future, and use the same software, and it will behave the same. I'm not constrained to the whim of any company.

I'd especially recommend Linux to anyone who just uses a computer to browse the Internet - it's great for that. It's also great for programmers. For more complex non-programming tasks, it may be questionable whether it's the best option. (Although these days, I'd ask people to consider whether it's really worth their while to own a personal computer at all - for just using the Internet, a small handheld device combined with public computers probably make a lot more sense for many people.)

Thursday, March 11, 2010

Surpassing Quicksilver

A few weeks ago, I was looking at the list of programs running on my computer, and contemplating the memory they were using (when I had no apps open) and the percentage of them whose purpose I actually understood. I then decided I'd had enough. So I ditched Ubuntu, installed Gentoo, and set it up to run plain X windows with just a window manager. (I'm overjoyed with the results.)

One program I used to use was Gnome-Do, a somewhat weak clone of the excellent Quicksilver program for the Mac. The thing I really liked about it was I could push Windows+Space and start typing the name of a file on my computer, and it would suggest matches as I type so I could open the file. This is much faster than browsing through your filesystem, if you can remember any part of the filename. But I was ticked off that it used 40MB of memory when I wasn't using it. So I wrote a trio of scripts to do essentially that same thing, which you can get here.

The crux of my script is a really, really great program called dmenu. dmenu is a menu that lets you choose one of many (often thousands) of options by typing parts of the options, and it narrows down your choices as you type. It's way better than even Quicksilver. All it does is take the list of options in standard input, lets the user choose one, then prints the option chosen to standard output. So it can be used to do all kinds of Quicksilver-like things (I happen to mostly only care about being able to open files easily).