The Philosophy of Computer Science (part one of a series)
“The network is the computer,” John Gage, Sun Microsystems, 1984
I have trouble throwing things away. I’m not saying that I’m a packrat, though that might be true, but it isn’t the root of the problem. I’m just lazy. I don’t want to be troubled by the idea that I should clean up after myself, and, when faced with the reality of living in a junk-filled sty, I find patches instead of solutions. My cache of useless junk finds its way into closets, tucked away into the crannies of bookshelves, hidden under tables or even just left sitting on top of the table if I don’t need the space right away. The closets are the worst, since they’re full of the boxes of crap I decided to take with me when I moved–some of it from the last move but most of it from the one before, things that I will never use and now never have to think about. I’ll admit that I’ve gotten some use out of the old computer parts. It’s nice to have a spare DSL modem or power supply lying around, but when’s the next time I’ll need a dual Pentium Pro motherboard (hint: never)? I am a hopeless slob and I should be ashamed of myself.
My computing habits are very similar to my real-life habits, perhaps most manifest in the way that I write code. I work from the command-line rather than using one of those fancy IDE things, and when I want to do something outside of the editor–grep for a function call, build the project or something else I’m more comfortable doing in a real shell–I’ll usually just hit CTRL-z to background the editor and move on to whatever else. I don’t always go back to that editor right away, however, or sometimes ever again. I’ll often find myself with a dozen terminal windows open, four of five editors running in each, each of those with who knows how many files opened in split screens. I am sloppy and forgetful and I should be ashamed of myself.
I treat files on the computer in much the same way: just dump everything wherever it’s convenient at the moment and move on. I decided to take stock of my home directory (I’m a dirty hippie Linux user, so this is basically like the desktop in the real world) recently, and I found files there that I hadn’t touched since 2002. Some of them have probably been there longer, but it appears that June 20th, 2002 was the last time I lost a hard drive and screwed up the timestamps when restoring from backup. There was a .maildir from back when I thought that using qmail was an ok idea instead of a stupidly insane idea, or even ran a mail server at home at all; config files for Netscape 4; the Neiman Marcus cookie recipe… The list goes on. Age alone doesn’t account for this, since I make a mess pretty quickly wherever I go. Taking a look at my Windows desktop at work, where I’ve been now been for about six months, I found the following:
- 23 installers for various programs
- 2 unpackaged programs just chillin’
- 2 C# dlls used by a program I deleted a while back
- 1 AVSynth script
- 4 C source files
- 7 zipped program packages (4 unpacked in same directory)
- 1 firmware upgrade zip for a TV set-top box
- 1 saved output from mplayer
- 1 source tarball for one of the zip file programs (also unpacked)
- 4 movies in various formats
- 1 .reg file to undo the mess that winzip makes and doesn’t clean up
- 1 unreadable junk
- 1 empty directory
- 1 shortcut to a program
- 1 text file with some irrelevant data
- 1 thunderbird plugin installer
- 5 network captures
- 1 directory with a single .exe whose purpose I’ve forgotten
- 1 directory with some video files
- 3 directories with standards documents
- 3 more unpacked programs (2 with source)
- 2 VC projects that don’t actually do anything
In all it was nine and a half gigamabytes. In order to try to rationalize such waste, that video directory was where I was messing around with some uncompressed 1080p videos, so that accounts for most of the space. Without those I had only 1.3GB of junk. After deleting everything I would never need again or that was already stored somewhere else I was left with 32MB.
My main problem is that I never clean anything up and I’m only barely aware of it. Looking for ways to help me fix this mess, I came across an old idea that just might do some good: store my home directory in a version control system. Besides providing me a history of file changes and possibly easy backups, it might force me to pay a little more attention to the files I fling around so freely.
David Cantrell took a look at storing home in CVS a while back, and version control systems have come a litte way since then. Most of the list of caveats–symlinks, directory management and funky filenames–is no longer a cause for alarm. Permissions might still be an issue, since version control is still designed with tracking changes to software in mind rather than keeping ssh happy about the read-bits on your keys, but workarounds similar to those used with CVS can work elsewhere.
But then I started to overthink it, as this sort of problem would encourage. Why not use a distributed version control system? Something like mercurial would be perfect. It would eliminate the need for a central server, allowing me to just move the same directory around everywhere while still making backups easy when I feel like it, and it has some nice features, like the addremove command to set the saved state to whatever the current working state is, and that could be easily scripted in a nightly job to remove my active participation from the process, giving me none of the benefits of this crazy idea except for version history, the one I don’t really care about. Whoops.
So I started thinking a little bit more. One of those pie-in-the-sky computing ideas that I actually like is the delocalization of assets. I’ve more often done the opposite, keeping everything, including this website, local, but I’ve been slowly moving in the other direction. Email was easiest, finally catching me up to 1997 or so. From anywhere I can point a mail client or a web browser to Site5 and have everything in the same state it is at home. Where’s it actually stored? Who cares? It’s somebody else’s problem now. I can’t make everything somebody else’s problem, at least not without a lot more trust than I currently have in anyone who could do such a thing, but that NAS device I bought a while back could be a surrogate. Its obvious use is as storage for the things I might have shared with the world in bygone days, but I’ve started using it for other large, semi-organized things that before I’ve kept in my home directory: photos, various documents, things that I’d like to keep handy though I don’t use them every day. Why do I even need a home directory at all?
My solution was just that, get rid of my home directory. I backed it up in case I ended up needing anything out of it and then started over. The configuration files are the most obvious absence, but it turned out to be pretty minor. There are a few files that I’ve carried around for about ever that I quickly carried over–I’d be lost, or at least very annoyed, without my .vimrc, for example–but most everything else I can just configure as I go. Somewhere back in the Peachtree days I joined the rest of the world and started using GNOME, a software suite that gives me some semblance of a real graphical computing environment, and it, like Windows, uses a central configuration database that doesn’t lend itself well to transferring back and forth, but it only took me about a day of fixing minor annoyances before I had everything matching my particular eccentricities again. Maybe this is the way to go, figure out the small handful of things I really need on any particular computer, keep the rest on the network and let everything else be blasted away on a whim.
I haven’t separated computing from locale, but I’ve at least created a more diverse location. My computer is a workstation and a file server, but mail and web files are somewhere else, and some files are on a USB drive or a handful of DVDs or a little keychain stick. The network isn’t all of the computer, but maybe I’ve freed enough computing from the computer that I can take it wherever it needs to go.