Invading Windows boxes

slaniel | Uncategorized | Sunday, May 30th, 2004

It’s easy enough nowadays to make your Windows machine into a free-software haven. When I come to a new Windows machine, I tend to install Mozilla (a web browser), OpenOffice (like MS Office, but better), AbiWord (another word procesor that I like, which is small and fast), Privoxy (a filtering proxy that helps block popup ads, get rid of annoying HTML, and change the contents of a given web page in literally any other conceivable way), gaim (a nice instant-messaging client that offers encryption, among many other things), and vim (my text editor).

What’s left? A good MP3 player — something as good as WinAmp version 2.6 — would be a good transplant. Does anyone know of any open-source MP3 players for Windows?

A good sense of “stupid”

slaniel | Uncategorized | Sunday, May 30th, 2004

I’d also like to point out that Linux is just stupid, in the very best possible sense of “stupid.” Everything in Linux is a file, so you can go into the /proc directory, look up the process ID for a running program (using the ps command), change into /proc/[pid], and look at all the information that the operating system knows about that program — the environment variables that it ran with, the amount of memory it takes up, and on and on. The /proc directory isn’t real; there are no actual files on disk containing the stuff in /proc. They’re just “virtual” files spat out by the kernel as an interface into running programs. It’s a brilliant idea, and allows you to write scripts that will dump out all kinds of information about your programs. As much as possible, files are raw text — because raw text is the easiest to play with, search through, modify, pipe, slice and dice.

Then there’s the way configuration files work: they’re all raw text files. There is nothing like the Windows Registry under Linux (though I guess the XML config files under each user’s home directories for the various GUIs are somewhere in the same neighborhood), and it will be a sad day when there is. Whose boneheaded idea was it to put all of the system’s configuration in two files? That’s just not the Linux way. The Linux way is to put a configuration file for programName under /etc/programName, and to put any user-specific configurations under /home/userName/.programFilerc. In that regard, Linux is actually a lot like Windows used to be, back when Windows 3.1 used various .ini files like win.ini. It’s still smarter than that, because win.ini featured blocks for each program — again, centralized configuration rather than a bunch of little config files.

Moving programs from one Linux machine to another is really, really easy, and I got a great example of that last night. Driving from Boston to Vermont for Rachele and Adam’s wedding, Adam and Ken decided to pass the time by setting up an ad hoc network on their Linux laptops between the two cars in our caravan so that Ken could play some MP3s in our car. Having set up the network, Ken needed to install a program to play Ogg Vorbis files. He only had access to Adam’s machine, not to the Debian archive, so he asked Adam to repack his (Adam’s) copy of the Ogg player, then send the repacked file to him (that is, to Ken). That’s one command (dpkg-repack packageName), along with some extra work to repack all the packages that the one you want depends on; Adam has written a script that does precisely this.

I ask you two questions:

  1. I realize it’s a rare situation, but try to conceive of how difficult it would be to install a Windows software package when you don’t have access to the installation CDs, and

  2. Have you ever tried to move a Windows program from one system to another? This used to be fairly easy under DOS, because DOS programs tended to put all their files in one directory. In large part the difficulty in moving programs from one machine to another nowadays comes from the Registry: not only do you have to move the program, plus all of its files from places like c:\winnt, but you also have to move the (potentially thousands of) Registry keys. Last I knew, you had to download or buy a separate program to move the Windows application to a new machine; it’s a severe headache.

    By contrast, a quick series of shell commands will repackage every single program on my machine, which a quick remote-copy operation (we use scp below) will move to the new machine:

    mkdir ~/deb-packages cd ~/deb-packages dpkg-repack $(dpkg --get-selections | grep -v 'deinstall$\|purge$' | cut -f1); scp -r ~/deb-packages remoteHost: 

I’ll grant you that this looks arcane and hard to figure out. But again, think about what it buys you: if you buy a new machine and want it to look just like your old machine, that’s how you do it. That may not be the end of the story — you may have just moved hardware-specific configuration options over to that second machine, even though the second machine may have different hardware than the first — but that’s most of it. (And actually, I don’t think dpkg-repack will have moved over any hardware-specific options.)

Much of this simplicity, I think, comes from the fact that you have absolute control over your software: the Linux community doesn’t want you to be limited to just one copy of the OS. They want you to copy Linux to as many machines as possible, for free! Why make it difficult to do this, when they’re not making any money off each additional copy? Certainly proprietary software companies have a financial incentive to make this sort of copying hard.

In time, I think people will see all the benefits that flow from unencumbered access to data. I hope that this general philosophical fluorishing will lead people to reject “solutions” such as Digital Rights Management that give the consumer nothing but give everything to the publisher. Openness is the wave of the present.

Schultz on Chomsky’s blog

slaniel | Uncategorized | Sunday, May 30th, 2004

I agree with EFF superstar Jason Schultz: it’s a little odd that Noam Chomsky has a blog. I’ve been subscribed to it for a few months now, and I have to say that I’m underwhelmed. If you were to judge the man only by his blog, I think you’d have to agree that the web is filled with more incisive writers; the people at Crooked Timber, for instance, regularly outpace him, and Eugene Volokh uses the medium a lot better than Chomsky does: his pieces tend to be long and really examine a single issue in-depth. Give Chomsky anything less than a book — or at least a long lecture — in which to develop an idea, and the results are kind of bland. The man is really quite radical, but his bloggy ideas are not.

You can do more with it

slaniel | Uncategorized | Sunday, May 30th, 2004

Today’s little Linux thought: if it’s hard to configure (and again, I don’t think it is), that’s in all likelihood because you can do a lot more with it. Without much difficulty at all, I

  • am running a web server on a crappy little piece of hardware at home
  • run a mail server;
  • am currently signing into my machine from Vermont over an SSH server; I signed into this machine from Internet cafés all over Europe using PuTTY;
  • serve MP3s over a server while the MP3s themselves reside on a second machine
  • never, ever have viruses on my machine, and I can’t really conceive of how I’d ever get one;
  • funnel every single email message I send through a program that my friend wrote, and
  • can send any email message through nearly any program if I want to;
  • get virtually no spam anymore, now that I use spamassassin, which
  • is one of the filters that my mail goes through because of procmail. I could use procmail to slice and dice incoming email in any way that I want.
  • have provided accounts to a number of my friends, and I host my friend Jon’s site. There’s not terribly much extra security to worry about for each additional user — mostly just controls on the /home directory.

All of these items come to me after only a moment’s thought. I’m sure I’d think of more with more time. And this list is just the more tangible features; it excludes things like strong security that you get by default with Linux. (The next time a Windows security hole allows administrator access to a Windows box, take a look around and try to find the last Linux security hole that did the same.) How much work would it take to configure all of this under a Windows box?

Unix users would never accept any lower level of service and features than what the OS already gives them. With this kind of feature-set and rock-solid security, it’s not surprising that we’d have to learn a little bit about, say, shell scripting in order to make it all work. The question is: does the marginal labor justify the marginal reward? Also, will improvements in the Linux UI (I repeat that Mandrake is really, really good) reduce the marginal labor to zero? I think it will. When that happens, it will take no extra work to get an OS that’s miles ahead of Windows. All it takes is time, which we have in limitless supply.

Some contradictions in Ebert

slaniel | Uncategorized | Saturday, May 29th, 2004

I’ve never been able to understand how Ebert can love some really awful movies and hate others. His standard, as he repeats often, is that a movie is “not about what it’s about — it’s about how it’s about it.” In other words: the movie can say whatever it wants, as long as it says it well. A movie that has virtually no content can still be great if it has style. I’m sure there’s more nuance, but that at least seems to be his justification for loving movies like The Day After Tomorrow.

But then he goes and hates Raising Helen because it’s formulaic. Isn’t The Day After Tomorrow just another rehash of the disaster-movie formula? So it has better special effects; yay. As my friend Stevie pointed out a while back, special effects are cool for about ten seconds: the state of the art is always improving, and if special effects are what holds a film together, the film will be forgotten within a year. To really stand up, a film has to have something other than just flash.

Which is why I think Ebert’s position has to have more nuance than how I’ve characterized it. A building that’s ornate but non-functional is a space that’s nice to look at but that no one would bother to live in. A speech that has lots of inspiring phrases but is ultimately contentless is  . . .  well, it’s George W. Bush. Style without substance is what modern life means, in a lot of ways.

So I just don’t see how someone could like a movie that’s entirely predictable, empty of content, yet flashy. That seems like a license for the worst of the world’s excesses.

Love Me If You Dare

slaniel | Uncategorized | Saturday, May 29th, 2004

Roger Ebert hated Love Me If You Dare, but does his review make anyone else want to go see it? I totally want to, having now read it.

Slowness

slaniel | Uncategorized | Friday, May 28th, 2004

If my site’s been especially slow recently, it’s probably because I’m using both my available computers to rip all my CDs. I have a very old and very slow machine that I should probably configure with Debian or somesuch and use as a dedicated ripper, but until then I’m using ye olde Laniels.org for that purpose. Pardon the slowness in the meantime.

(It’s really pretty cool, though: I just recently got around to installing an 80-gig hard drive that my parents gave me as a Christmas present. All this space is liberating, like switching from tighty whities to boxers.)

Simple Heuristics That Make Us Smart

slaniel | Simple Heuristics That Make Us Smart | Friday, May 28th, 2004

Per Cosma’s recommendation, I got Gigerenzer et al.’s Simple Heuristics That Make Us Smart out of the library, and after slogging through Herb Simon’s Administrative Behavior I’m on to the much more vibrant Simple Heuristics.

First, just a quick note about Simon’s book. I love Simon’s writing style, and having witnessed a public debate with the man during a philosophy class I took at Carnegie Mellon, I can testify that the guy hadn’t lost a step well into his eighties. I’ve now read three of his books, including Administrative Behavior, and AB is the least-well-written of the three. I’m inclined to write that off to the book’s age: Simon wrote it well before he had formulated many of his ideas in cognitive science, and before he apparently had found a voice. After each chapter in Administrative Behavior is a postscript from the Nineties, incorporating 50 years of Simon’s wisdom; the postscripts are by far the best-written parts of the book, and the most profound — from the perspective of someone who’s really intrigued by bounded rationality and artificial intelligence.

(more…)

A good day with Linux

slaniel | Uncategorized | Thursday, May 27th, 2004

My friend Adam pointed me to a nonprofit that was rather keen on installing Linux, so we agreed on a flat fee for me to help them and I’ve been going over for a few hours a week. It’s a nice arrangement, at least for me: the flat fee means that I’m not going to overcharge them as I try to learn how Linux deployment in organizations works, and in the meantime I’m getting paid to do something that I ought to be doing anyway. It’s a good time. They’ve got a couple Macs, now a couple Linux boxes, and a dual-boot Windows/Linux box, all connected to DSL through a Mac AirPort router. They’ve got printers attached locally to all the operating systems.

And today was really a good day for my Linux excitement. I set up Network Information Services so that people would only need to change their passwords on one machine; the passwords would then propagate out to the rest of the network. This also addressed some problems I’ve been having on my own home network, where I can’t write to a directory on a remote machine; Linux sees that the Steve Laniel on Machine 1 has user ID 1000, and the Steve Laniel on Machine 2 is UID 501, and it won’t let the former do anything with the latter’s files. Storing userIDs in one place solves this problem.

With that taken care of, I set up all their machines with the Network File System (NFS), which allows multiple machines to share files without knowing where they’re located; I rhapsodized about it the other day. Today it came in handy after setting up common user IDs; now that everyone only has to change passwords once, it would be handy if they also saw the same graphical desktop every time they signed in. NFS allows this; instead of signing into a local home directory, we can just mount the remote home directory. That’s the virtue of a virtual filesystem: I just changed one line, and suddenly ‘/home’ stands for something completely different than it did the moment before.

I ran into a few snags, among them an odd little quirk in the Mandrake Linux distribution (I had to add one line into a specific file in order for NIS to work correctly across reboots) and some puzzlement over automount. With those out of the way, it went fairly smoothly. And this from a total novice at configuring Linux on networks.

I think it’s absolutely essential that we be honest about what’s sitting right in front of our faces: amateurs (in the original sense of the word) have created an operating system that is — whatever else you might say about it — at least damned good. It is a world-class operating system. Microsoft is so scared of Linux that it is apparently structuring its next operating system just to kill us off. And all of this from amateurs! All of it for free! I just installed a full corporate network for $0 (except for my installation fee). I’ve said it many times before: all other facts about Linux pale in comparison to its essentials. And the essentials are astonishing. It’s like Neal Stephenson analogized years ago:

Imagine a crossroads where four competing auto dealerships are situated. One of them (Microsoft) is much, much bigger than the others. It started out years ago selling three-speed bicycles (MS-DOS); these were not perfect, but they worked, and when they broke you could easily fix them.

/p>

The big dealership responded by rushing a moped upgrade kit (the original Windows) onto the market. This was a Rube Goldberg contraption that, when bolted onto a three-speed bicycle, enabled it to keep up, just barely, with Apple-cars. The users had to wear goggles and were always picking bugs out of their teeth while Apple owners sped along in hermetically sealed comfort, sneering out the windows. But the Micro-mopeds were cheap, and easy to fix compared with the Apple-cars, and their market share waxed.

Eventually the big dealership came out with a full-fledged car: a colossal station wagon (Windows 95). It had all the aesthetic appeal of a Soviet worker housing block, it leaked oil and blew gaskets, and it was an enormous success. A little later, they also came out with a hulking off-road vehicle intended for industrial users (Windows NT) which was no more beautiful than the station wagon, and only a little more reliable.

 . . . [R]ight next door It’s a bunch of RVs, yurts, tepees, and geodesic domes set up in a field and organized by consensus. The people who live there are making tanks. These are not old-fashioned, cast-iron Soviet tanks; these are more like the M1 tanks of the U.S. Army, made of space-age materials and jammed with sophisticated technology from one end to the other. But they are better than Army tanks. They’ve been modified in such a way that they never, ever break down, are light and maneuverable enough to use on ordinary streets, and use no more fuel than a subcompact car. These tanks are being cranked out, on the spot, at a terrific pace, and a vast number of them are lined up along the edge of the road with keys in the ignition. Anyone who wants can simply climb into one and drive it away for free.

Customers come to this crossroads in throngs, day and night. Ninety percent of them go straight to the biggest dealership and buy station wagons or off-road vehicles. They do not even look at the other dealerships.

Of the remaining ten percent, most go and buy a sleek Euro-sedan, pausing only to turn up their noses at the philistines going to buy the station wagons and ORVs. If they even notice the people on the opposite side of the road, selling the cheaper, technically superior vehicles, these customers deride them cranks and half-wits.

/p>

The group giving away the free tanks only stays alive because it is staffed by volunteers, who are lined up at the edge of the street with bullhorns, trying to draw customers’ attention to this incredible situation. A typical conversation goes something like this:

Hacker with bullhorn: “Save your money! Accept one of our free tanks! It is invulnerable, and can drive across rocks and swamps at ninety miles an hour while getting a hundred miles to the gallon!”

Prospective station wagon buyer: “I know what you say is true . . . but . . . er . . . I don’t know how to maintain a tank!”

Bullhorn: “You don’t know how to maintain a station wagon either!”

Buyer: “But this dealership has mechanics on staff. If something goes wrong with my station wagon, I can take a day off work, bring it here, and pay them to work on it while I sit in the waiting room for hours, listening to elevator music.”

Bullhorn: “But if you accept one of our free tanks we will send volunteers to your house to fix it for free while you sleep!”

Buyer: “Stay away from my house, you freak!”

Bullhorn: “But . . . ”

Buyer: “Can’t you see that everyone is buying station wagons?”

The complexity of the Russian language

slaniel | Uncategorized | Thursday, May 27th, 2004

I emailed the Language Hat weblog a little while ago to ask about a possibly apocryphal story I heard years ago:

I wonder if I could toss a little linguistic trivia question your way. I remember hearing years ago a little story about the Russian language (which I don’t speak), and haven’t ever gotten enough detail about it to confirm. The story goes that almost no one speaks perfect Russian, and that Alexandr Solzhenitsyn wrote a story parodying this fact. I guess in perfect formal Russian, there is a case for one of an object, a case for two of an object, and a case for three or more of an object. In the Solzhenitsyn story, a man wanders all around a town trying to buy two fire-stokers (I believe it was fire-stokers), but no one knows how to say ‘two fire-stokers’. So he ends up buying one fire-stoker from one guy, and then another from the same guy. Linguistic problem averted.

Does the outline here ring any bells? I’ve tried various googles for it, and nothing has worked. If I do find the full details on this story, I’m going to post them on my weblog so that some future googler has better luck than I’ve had.

I got a great response back:

sounds more like Zoschenko than Solzh, and indeed the former wrote a short story (Kocherga: http://www.saslib.ru/ref/arh/materials/liter/zoshenko/story013.html) that remotely resembles your correspondent’s account. Turns out he got the key detail right: the plural of kocherga is a pain to inflect.

Too bad you can’t read the story, which is quite funny, but the situation is that a provincial “establishment” heated the old-fashioned way, with stoves, decides to get five more pokers so they will have one for each of their six stoves. But when the director starts dictating the letter he gets as far as “request five . . . ” when he realizes he doesn’t know how to finish the sentence — what is the genitive plural of kocherga, anyway? “Tri kochergi — yasno. Chetyre kochergi - - tozhe ponyatno. A pyat’? Pyat’ chevo?” He asks his secretary, who doesn’t know either. Finally they wind up calling the typist’s mother, who says they should write “pyat’ kocheryog. Ili pyat’ kocherg.” (Giving two alternate forms, the first of which is the one found in dictionaries, the “correct” one.) The kicker is that when they finally write the request, the answer comes back that there are no pokers in the warehouse. But by then it’s spring, so they can put off worrying about it. Zoshchenko finishes: “In general, it’s high time to change over to steam heat.” (The story is from 1940.)

The fact that it took almost no labor (on my part, anyway) to get in touch with the people who would have this tiny little obscure bit of knowledge, and that they’d give me such a full answer, is a crystallized example of why I love the Internet.

It is  . . .  The Dogblog

slaniel | Uncategorized | Wednesday, May 26th, 2004

Awake at 3:30 a.m. with a nasty cough that I hopefully can write off to allergies (I just took an Allegra; if it works, it’s allergies), I visit my friend Jon’s DogBlog and instantly I am a happier man. Thank you, Jon.

Jarmusch, Coffee and Cigarettes

slaniel | Uncategorized | Tuesday, May 25th, 2004

I agree with my newly bloggy friend Chris: Coffee and Cigarettes has its moments of intense boredom and subpar acting, which are characteristic of some of Jarmusch’s earlier films (I’m thinking here of Night on Earth and Down by Law). But it has so much to recommend it, including some really quirky and funny scenes (GZA and the RZA drinking herbal tea — love it!), that I can’t help but love it. Jarmusch was taking a chance, and it paid off.

What I fear

slaniel | Uncategorized | Friday, May 21st, 2004

 . . . is that U.S. antiterror laws will turn us into Israel.

Unixy filesystems

slaniel | Uncategorized | Friday, May 21st, 2004

Every now and then I have a big ah-ha moment with Linux: I see some fundamental design that just makes sense. One that’s always sort of confused me is why device files are different from filesystems. For instance, the hard drive I just installed on a new machine exists as the device file /dev/hdb — “/dev” being the directory where devices fall, and “hdb” signifying that it’s the second hard drive. But then I have to specify a “mount point” also — a place where I’ll actually access any of the files on /dev/hdb. For this, I chose to mount it under a directory called /mnt/newdisk.

What’s cool about this is that it means I never have to know where a file is physically located in order to access it. This only became important a moment ago: I now have two machines, and I want to be able to access the files on machine 2 from machine 1, and I want to make this process as seamless as possible. In particular, I’m moving all the MP3s that used to be on machine 1 over to machine 2 (which has a larger hard drive), but machine 1 still hosts this website, and people expect my MP3s to be in a specific place. The Linux approach is to move the MP3s to machine 2, then use NFS (Network File Services) to mount the MP3 directory on machine 1. And this is where the filesystem-device file distinction really shines: the files are physically located on machine 2, but I mount them from machine 1, then provide a symlink (like a Windows shortcut, but simpler and in many ways better) to the new location for people who visit my webserver. Voilà: no one in the world will know that the files are in a new location, because Linux doesn’t care where they’re located. All Linux knows is that the files on machine 2 are under a certain mount point, and Linux has to access that mount point using NFS. The next layer up from the kernel doesn’t need to know the details of how it gets the MP3s.

Carnegie Mellon, where I went to school, took this to an extreme. It uses the Andrew File System for all its students’ data: my home directory was something like /afs/andrew.cmu.edu/usr11/laniel; the /afs signified that we were using the Andrew File System, then /andrew.cmu.edu specified the domain name under which all the files were located, and so forth. I remember visiting a high-school friend’s home directory under /afs/umich.edu; very neat stuff.

From what I can tell, Windows isn’t really built for this sort of thing. I think it’s possible to hack all of this onto Windows, and the Windows net use command will mount network volumes for you. But the filesystem-device file distinction doesn’t really exist: C:\ is not only the main hard drive, it’s also the mount point for the main hard drive. I need to dig into this more, but it seems as though Linux is designed from the ground up with a smarter filesystem. But then, I’m just a newbie at this stuff, so I’m probably wrong.

Regardless of who else does what else, the Linux approach is very, very neat. Highly recommended.

Awesome!

slaniel | Uncategorized | Thursday, May 20th, 2004

Thus spake the Boston Globe:

The state Senate yesterday voted overwhelmingly to repeal a 1913 law that Governor Mitt Romney is enforcing to prevent out-of-state same-sex couples from marrying in Massachusetts.

The repeal measure passed by a vote of 28 to 3, but it was uncertain the House would follow suit because Speaker Thomas M. Finneran does not want the contentious issue tied up in state budget negotiations.

This is a nice response to an earlier post.

Gay-marriage opponents are, I think, getting handed their asses. Either that, or they will soon. I love it.

isPermaLink

slaniel | Uncategorized | Thursday, May 20th, 2004

Those of you viewing my site through RSS readers may notice that every post has been labeled ‘unread’; different readers may behave differently, but that’s a pretty reasonable response to a small change I just made. The RSS feed validator informed me that isPermalink="true" was not a valid attribute to the guid XML tag; turns out that the proper spelling is “isPermaLink” with a capital L. I made the change; now my RSS feed validates, but I suspect a lot of RSS readers will cry foul. My apologies if yours does this.

Random whee

slaniel | Uncategorized | Thursday, May 20th, 2004

I feel it necessary to pass along a little bit of JavaScript that my rockin’ friend Seth sent my way. It’s pretty funny.

Abu Ghraib roundup

slaniel | Uncategorized | Wednesday, May 19th, 2004

Kevin Drum has a grim roundup of the latest news about American torture of Iraqis (my cache). The story is spiraling out of control. I almost can’t bear to read any more news about this, but I feel I have to.

Marshall on Safire

slaniel | Uncategorized | Wednesday, May 19th, 2004

I stopped reading William Safire in the New York Times months ago. The guy is a dolled-up conspiracy theorist with no respect for facts that stare him dead in the face. Best to read his “On Language” columns and leave the politics aside. Josh Marshall does a nice quick takedown of Safire’s latest inanities.

The Times’s regular op-ed columnists are underwhelming. Brooks and Safire are, of course, nearly unreadable. Kristof has some good stuff. Tom Friedman has been apologetic and hopeful about the Bush administration since the beginning, and only recently has he come around to realize that “Hey, wait a minute: I don’t think these guys have noble intentions!” To be that far out of the loop, in so august a publication as the Times, is rather shocking. Oh, and the people at Crooked Timber do a pretty regular job smacking down Friedman’s take on globalization. Again, I long ago gave up reading Friedman. Oh, and then there’s Maureen Dowd, who I used to think was clever, but who I eventually realized made her beat by trivializing complex events, mocking the political focus on soundbites, then reveling in those soundbites herself. Her articles are mashups of soundbites.

Which leaves Kristof and Krugman. Kristof hits you in the gut, Krugman in the brain. Am I missing anyone?

Out-of-state marriages in Massachusetts

slaniel | Uncategorized | Wednesday, May 19th, 2004

I’ve felt endlessly proud of my state — particularly Somerville, the city in which I live — for its stance on gay marriage in recent days. It’s running into some roadblocks, and there’s a long legal process to go before the road seems clear. But I’m 75% confident that gay people married in Massachusetts this year will still have the legal right to stay married five years from now. My fingers are crossed.

I’ll write more about this soon. It’s a phenomenally exciting time.

Next Page »

Bad Behavior has blocked 845 access attempts in the last 7 days.