2008 in Review

I know, it's a month and a half into 2009, but... well, better late than never.

The following is a list of the most popular posts on this blog and on my web site in 2008. Numbers 1, 3, and 5 hit Reddit. People mostly found the other articles by searching.

  1. Top Ten Essential Emacs Tips.
  2. Scrolling with the Thinkpad's TrackPoint in Ubuntu 8.10 Intrepid. Who knew a little X.org tweak could cause so much trouble?
  3. A million lines of Lisp. Apparently, people will read anything about Lisp.
  4. Emacs in Ubuntu Hardy now has anti-aliased fonts. And it is beautiful.
  5. Stupid screen tricks. GNU Screen has changed the way I work and the way I interact with computers.
  6. Instructions for setting up Emacs on a variety of platforms.
  7. Towards using the FreeRunner as my primary phone. Which, I am happy to say, I have been now for months.
  8. Writing a raytracer from scratch. Why, you ask? Why the hell not? It was a lot of fun and I learned a thing or two about software and math.

(Google Analytics helped me make this list. Interesting tidbit: among the browsers that people typically use to read this blog, Firefox has a commanding lead with 75%. The runner-up is Safari with 7%, followed by IE with 5%.)

Highlights of the past year:

  • I wrote a thesis and got some papers published. In the course of my work, I also learned a few things about software development and tools, which I'll share shortly.
  • I traveled to New York, Las Vegas, Germany, and Switzerland (with passage through Spain, Liechtenstein, Austria, and the UK). All of these were a lot of fun.
  • I got a new phone (some would say, a mobile computer with a phone in it), one capable of running only free software. It's glorious.

2008 was a great year. Except for the collapse of the global economy, but remember, now is the time to buy. Here's to 2009!

The Ubuntu netboot/network installers

The Ubuntu netboot (network) installers are fantastic, and for how good they are, they are hardly ever publicized.

The idea of just downloading your OS whenever and wherever you need to install it is kind of astounding. It makes the Windows/Mac experience of having to dig up some DVD and type in a 25-digit number seem positively archaic. It's the difference between walking across the street to buy bottled water, and turning on the tap and just having water appear. It completely changes the economics of the game when you no longer have to think of your operating system as a scarce resource.

As I understand it, there are three ways to do a netboot install. I've previously written about installing Ubuntu by booting from files downloaded to your hard disk. It's also easy to do a netboot install from either a CD or a USB key, and the procedures are very similar.

All three methods are nice because they have small initial downloads, about 10 MB; they then download the rest of your OS (and only the latest version of each package) at install time. It's a waste of time to download a ~700MB CD image if you're going to upgrade half of your packages right after installation. (Software is usually out of date by the time you install it! Especially during the development period for each release.) The installer is small enough that you can even burn it to one of those business card CDs.

The netboot installers are also versatile. They will install, at your request, any (or all!) of the following: Ubuntu desktop, Ubuntu server, Kubuntu desktop, Xubuntu desktop, Edubuntu desktop, and many more. They also support installing to encrypted LVM for full-disk encryption. (The netboot installers are based on the ncurses Debian installer.)

The hard disk method has the advantage that, of course, you don't need to use any external media. However, in my experience, the CD and USB key installers are a little less flaky. Unlike a hard disk installation, they also work even if you don't have Grub already installed.

For either the CD or USB key methods, you can find the appropriate files here:

http://archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-i386/current/images/netboot/

(This is for Jaunty/i386. If you want a different release or have a different architecture, like amd64, adjust the URL accordingly.)

For CD installation: download mini.iso and burn it to your CD.

For USB media installation: download boot.img.gz and follow the instructions here. It will boil down to doing something like this:

# zcat boot.img.gz > /dev/sdX1
# aptitude install mbr
# install-mbr /dev/sdX

Then boot from your new media into the installer.

"Being Productive With Emacs" Redux

This past IAP I taught a short class on Emacs ("Being Productive With Emacs") at MIT. It was similar in content to the class that I taught in 2007, although I pared down the material a bit.

I've posted the slides online. You may use the slides under the terms of the GFDLv1.3+ or the GPLv3+.

(I made the slides using S5, which is pretty sweet. It lets you make moderately professional looking DHTML slides in a text editor without much pain.)

A command-line substitute for gitk

gitk is indispensable for viewing repo histories and understanding the relationships between different branches. However, using a GUI is a bit heavyweight if you are working remotely or only need to see the last few commits. Under these circumstances, git log --graph, introduced in git 1.5.6, is a pretty good fake.

My preferred invocation is

git log --graph --abbrev-commit --pretty=oneline --decorate

which I've aliased to gl in my shell.

The subsequent options, respectively: only show short commit names, for compactness; only display one line per commit, for compactness; and show where your branches are. Here's some sample output:

* f95f34e... (refs/remotes/origin/master, refs/heads/master) Acknowledge Alexey.
* c691bc7... Allow unmarking the marked commit.
* 7640638... Fixed visualization of marked commits
* c3830ed... Make it work better on Windows.  Thanks to Jeff Dik.
*   3433556... Merge commit 'fdr/sign-off'
|\  
| * 68344a2... Add signoff customization option
* |   3e29059... Merge commit 'cymacs/master'
|\ \  
| * | 45fb865... Fix incorrect diff hightlighting of lines beginning with "+" or "-".
| * | b7fe745... Disable undo in all magit-mode buffers.
| |/  
* | 10fe99a... Ambiguity in call to git log fixed
* | 3d34a7c... Make buffer saving behavior customizable.
* | 64b8265... Removed unused threshold machinery.
* | b430add... Make sure that point never ends up in an invisible region.
|/  
*   b30faeb... Merge commit 'voins/voins'
|\  
| * 7386af1... Use "medium" git log format when visiting commit
* | 5fb7327... Mention autogen.sh
* | f055b18... Typo.
|/  

One small step for freedom

Today, Apple announced that it is phasing out DRM in its music store. By the end of the quarter, Apple says that all songs in the iTunes music store will be DRM-free.

This is good news.

However, I hope that a victory for users in this battle does not lead people to believe that the war is over, or that DRM is just about music. Let's not pretend that this is the end of DRM at Apple. Let's not even pretend that this is the end of DRM in iTunes, as has been widely and erroneously reported.

I'm not holding my breath, but if I have a shred of optimism about this whole situation, it's because Steve Jobs has publicly disparaged DRM in music. DRM elsewhere is no less pernicious.

Disabling Firefox's yellow plugin bar

I hate Flash. But that is a rant for a different post.

I don't have Flash installed, and I don't want to have Flash installed. That means I get Firefox's yellow "Additional plugins are required to display all the media on this page" informational bar on many pages with Flash content. Here are instructions for disabling it in Firefox on Ubuntu 8.10.

[Update: much easier way to do this, apparently available on Firefox 3.0+: in Firefox, simply go to about:config and set plugins.hide_infobar_for_missing_plugin to true. Thanks, Rakhun!

The more complicated way I originally suggested doing this follows.]

In Firefox, go to about:config and set plugin.default_plugin_disabled to false. By itself, this suppresses the yellow plugin bar and replaces it with a dialog, which is even worse! In order to disable this dialog, you'll also need to delete the file /usr/lib/xulrunner-addons/plugins/libnullplugin.so.

(The "null plugin" or "default plugin" is responsible for rendering a blank box and prompting you whenever Firefox encounters content it doesn't have another plugin for.)

If you ever regret this decision, you could keep libnullplugin.so somewhere safe and just move it back to that directory—or, just reinstall xulrunner-1.9 with aptitude reinstall xulrunner-1.9.

On other systems, you can identify the location of the default plugin by setting plugin.expose_full_path to true. Then go to about:plugins and look for the "Default plugin". Firefox should show you the path to the plugin file. Delete that file.

A holiday plea

Shortly before the holidays I made donations to three organizations: the Free Software Foundation, Wikipedia, and Creative Commons. If you'll kindly indulge me for a minute, I'll explain why I think the work of these organizations is so important to an open internet and a free and properous society. Consider giving whatever you can spare (whenever you can spare it) to one of these groups.

1. So much of our everyday lives—both work and play—depends on the operation of software that we cannot really claim to be free people unless we are using free software. I'm donating to the Free Software Foundation both as thanks for the GNU operating system and in support of their campaigns. The GNU OS—from ls to emacs, and everything in between, and beyond—eclipses, in terms of power and productivity, pretty much any other OS you can buy. But peace of mind is even more valuable than technical power. As someone whose livelihood directly depends on software, it would be foolish in the extreme for me to compromise my autonomy and financial security by using proprietary software and "giving the keys to someone else."

The FSF also promotes awareness of a number of threats to freedom and innovation, like DRM (vile, vile stuff) and proprietary document formats (which are antithetical to the democratic idea of the free interchange of information).

2. I'd say that being able to learn about anything, anytime, on Wikipedia has been a pretty life-changing experience. I don't need to explain what this is like to most of you. But Wikipedia isn't valuable just because it satisfies my idle curiosities. One of the hats I wear is that of "teacher," and I love sharing knowledge. The dissemination of knowledge is one of the surest ways to produce prosperity. I'm donating to Wikipedia on behalf of children and other curious people everywhere.

3. Creative Commons is creating a body of actually useful creative works, as well as encouraging people to rethink copyright law. I feel like I've discovered a gem every time I find an ebook I can copy for offline reading, or music I can share with friends, or a comic or photo that I can put on my blog. What is perhaps more valuable is that CC is planting the idea in people's heads that maybe we can be more prosperous as a society if authors allow their work to be used in more ways rather than fewer.