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.)
Showing posts with label computers. Show all posts
Showing posts with label computers. Show all posts
Saturday, March 27, 2010
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).
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).
Friday, January 22, 2010
Vim as IDE
I've discovered that it seems quite feasible to set up the VIM text editor as an Integrated Development Environment for C++ programming. This is exciting because it's a lot smaller and faster than most full-featured (i.e. bloated) IDEs, is the best programmer's editor (in my opinion), and allows me to do programming in Linux without using Eclipse (which takes an enormous amount of resources). The software you need to put this together is as follows:
gvim, of course.
gcc, of course, to compile C++ code.
make, for writing a "project" that lets you add your source files and get compiled into your program with one command.
ctags, so that you can jump from a variable's use to its declaration with Ctrl+] (and then jump back with Ctrl+t), and as a prerequisite for code completion (see below).
yavdb and gdb. yavdb lets you do debugging in vim by attaching gdb to an existing vim window. Then you can use the function keys in your code to set breakpoints and step to lines of interest, and press F10 to see the value of the variable under the cursor. When you want to examine more complicated information, go to the terminal you started yavdb from and use gdb commands. Simple and quite effective.
omnicppcomplete, which does code completion in vim by using your tags file generated by ctags. There are some slightly involved (but straightforward) instructions involved in setting it up, but I had no trouble getting it to work. Once it's set up, you get a list of member choices whenever you press ., ->, or ::.
Finally, you'll probably want to set / remap some shortcut keys so the function keys do what you want. For example, to set keys for building the project, and going to the next / previous compilation error, add lines like these to your ~/.vimrc file:
which sets F4 to build your project, and F6/Shift F6 to go to the next / previous compile error.
gvim, of course.
gcc, of course, to compile C++ code.
make, for writing a "project" that lets you add your source files and get compiled into your program with one command.
ctags, so that you can jump from a variable's use to its declaration with Ctrl+] (and then jump back with Ctrl+t), and as a prerequisite for code completion (see below).
yavdb and gdb. yavdb lets you do debugging in vim by attaching gdb to an existing vim window. Then you can use the function keys in your code to set breakpoints and step to lines of interest, and press F10 to see the value of the variable under the cursor. When you want to examine more complicated information, go to the terminal you started yavdb from and use gdb commands. Simple and quite effective.
omnicppcomplete, which does code completion in vim by using your tags file generated by ctags. There are some slightly involved (but straightforward) instructions involved in setting it up, but I had no trouble getting it to work. Once it's set up, you get a list of member choices whenever you press ., ->, or ::.
Finally, you'll probably want to set / remap some shortcut keys so the function keys do what you want. For example, to set keys for building the project, and going to the next / previous compilation error, add lines like these to your ~/.vimrc file:
map <F4> :make<Return>
map <F6> :cnext<Return>
map <S-F6> :cprevious<Return>
which sets F4 to build your project, and F6/Shift F6 to go to the next / previous compile error.
Saturday, December 26, 2009
How to block the Wikipedia banner
Wikipedia has recently gotten a large, annoying banner at the top asking for donations. This is sad, but it can be blocked by getting AdBlockPlus and adding the following filter rule to it:
wikipedia.org#div(siteNotice)
There might be a better way to do it, but that's the only one I've found that works for me.
I hope these banners serve as a wake-up call to people who invest a lot of time into putting information into services run by organizations that are beyond their control. The hundreds of millions of hours volunteers have spent getting rid of their encyclopedias and contributing to Wikipedia can be seen to be a waste. How long do we have before they find a way to force us to listen to their pleas before we can get our information, or before our information is lost entirely? We should keep our information we care about, on our own computers, rather than trusting in "the cloud" to keep it for us. (The same goes for blog posts - I save posts on my computer before posting them.)
wikipedia.org#div(siteNotice)
There might be a better way to do it, but that's the only one I've found that works for me.
I hope these banners serve as a wake-up call to people who invest a lot of time into putting information into services run by organizations that are beyond their control. The hundreds of millions of hours volunteers have spent getting rid of their encyclopedias and contributing to Wikipedia can be seen to be a waste. How long do we have before they find a way to force us to listen to their pleas before we can get our information, or before our information is lost entirely? We should keep our information we care about, on our own computers, rather than trusting in "the cloud" to keep it for us. (The same goes for blog posts - I save posts on my computer before posting them.)
Subscribe to:
Posts (Atom)