Open and closed operating systems

· technology ·

I've been reading a really interesting article by Neal Stephenson called In The Beginning Was The Command Line. It was published in 1999, so some of the conclusions are a little dated, but it is certainly worth a read. Neal longs for an OS with a nice GUI, multi-threading, and a terminal window to interact with Unix command line applications — like BeOS, but not doomed to obscurity. I think that MacOSX has filled that role fairly well, but many of the other points he makes about interacting and tinkering with the innards of the system are well made.

I first started using Linux several years ago. It was before MacOSX was released, and I decided to have a bit of a play with this Linux that I was hearing so much about. I set up my iMac to dual boot, and installed SuSE PPC. I had a lot of fun finding out (often the hard way) how to work with Linux, install applications from source and so on. I enjoyed it so much that I bought a PC laptop with RedHat pre-installed. Coming straight from MacOS 9, I was amazed by the stability of Linux. It's a bit like finding a great lover after years of suffering incompetent and selfish ones. Once you know what you've been missing all those years, you can't go back.

You get a wonderful feeling of control and power using an open system like Linux. Neal makes comparisons between cars and operating systems, and that's not a bad analogy. If something serious goes wrong with a modern car, you often have no choice but to take it to a garage. Modern cars are heavily reliant upon electronics — in a literal 'black box' — and if something malfunctions there, you are powerless to fix it. In contrast, my old Hillman Imp was laughably simple. If something went wrong, it was usually obvious what the problem was (when you saw the part bouncing down the road in the rear view mirror). An hour or so of skinned knuckles and swearing with a socket set was generally all it took to put things right.

However, that was both the strength and the weakness of Linux for me. Because I could adjust everything exactly to my needs and liking, I found it hard to restrain my inner geek from continually tinkering with things. You often find similar tendencies with people who run classic cars. It runs fine, but because they can, they can't stop themselves from replacing the trim here or tuning the performance a bit there. I found that I was spending so much time messing with .rc files that I wasn't getting much actual work done. The other problem was that — for someone from a Mac background — the lack of standardisation of interfaces, keyboard shortcuts and so on was a bit disturbing.

Once MacOSX came out, I jumped to that, and my experience with Linux gave me a great head start. I feel that I'm getting the best of both worlds now; there's a beautiful, standardised GUI, and it's generally very easy to use peripherals, but you also have access to the Unix innards, and can therefore install lots of great command line applications to fill the holes left by commercial software. Oh, and you can use wonderful hardware. I never liked my PC laptop, but my TiBook is a thing of beauty.

I would guess that I use GUI applications about 75% of the time, and command line (CLI) alternatives for the rest. CLI applications are great when you need a quick and precise way to interact with your data. I use LaTeX for writing documents in Vim when I don't need to share the document with other editors, I might start using beamer for presentations, and I frequently use other small tools (like wc) to do particular jobs. The ability to 'pipe' the output of one command to the input of another is an enormously powerful tool, and allows you to construct your own temporary solutions on the fly for munging text files or other tasks that are typically a bit tedious with other applications.

The weakness of the CLI is that there are no visual prompts to how the application works. With a GUI, even if you don't remember the hotkey to do something, you can click a button on a toolbar or pull down a menu to find a command. Of course, with CLI applications you have man pages, but they can take some time to sift through. If you don't use a CLI app frequently, it can be hard work reminding yourself of the commands and switches involved. The other problem is the text interface itself. When I was investigating beamer, I read about pgf — a system for drawing graphics within LaTeX documents, by specifying the coordinates of the vectors you want to draw. I don't know about you, but when I want to draw a triangle, I think of the shape, and where I want it to be on the page. Unless you naturally think in Cartesian coordinates, it's very hard to translate that visual image into the code needed to specify the vectors making up the triangle. I prefer to let the computer deal with the maths. That doesn't mean that pgf is bad; it's enormously powerful and precise, and very convenient for embedding graphics in LaTeX documents. But it is very hard to use. There's a time for typing text commands, and a time for drawing pretty shapes with a mouse, and I think that a modern operating system needs both.