tom thinks

date 2000-12-24:18:11
Software There is something deeply nonsensical about software. Part of it is simply that programmers, myself included, almost never pay attention to the context in which their stuff operates, yet that context is all-important. Maybe I should be trying to develop a theory of contextual design.

See, it doesn't matter that the machines we run stuff on are Turing complete, so they can compute anything that can be computed. Software is only incidently a mathematical discipline--when I first got into commercial software development I didn't see a floating point number for nearly three years. One day I'll get around to writing down in detail what's wrong with Z as anything more than an sometimes useful but necessarily peripheral tool in the development of software.

The important aspects of software design--the things that wind up biting us--are how a particular program interacts with its context. The case in point is the behavior of the various vi clones out there, which I've been messing with for the past two days.

I'm writing this using vim. w3m uses an external editor to deal with textareas, which I think is a great idea. Why build an editor when we have lots already? vi isn't my favorite editor, but it has the nice feature of dealing with long lines sensibly--it wraps them visually without inserting its own line breaks. Given the way Caro's journalling program does things, this is a very convenient feature, and one that I could turn on in jed (which is the editor I use for most stuff, as emacs is just to bloated to bother with) if I could be bothered to take the time to figure out how.

So using vi looked like a good idea. But as near as I can tell vi doesn't exist--it's a myth started by Bill Joy, who told people what it did but didn't let them see it, instead encouraging them to write clones. He gets the credit for writing vi, but in fact there is no vi, only clones!

Every clone behaves differently. elvis, in particular, doesn't display long lines the way vi does--it scrolls them the way emacs and jed do. I hate this, and so don't use elvis. vim wraps the lines properly, and so I loaded it on my linux box at home yesterday, only to find that when run from w3m it doesn't recognize the backspace key! This is the usual unix backspace nonsense, so it turns out after a bit of mucking about, if I configure w3m to run the command:

stty erase '^?';/usr/bin/vim

as the external editor, everything works fine.

The curious thing is that vim does recognize the backspace key when run out of the shell, and the call is made by system(3), which ought--I thought--to pick up the environment of the calling process, and w3m is being run out of a shell where backspace is set up to erase!

I don't get it--software passeth all understanding.
Creatures The squirrels are out in force just now. Maybe it's the time of year, or that the weather has gotten colder, but they seem to need to top up their tanks. Squirrels aren't true hibernators, although they do lower their activity level a lot in winter. But they still need food.

Yesterday morning there was a little gray squirrel, who happened to be black, who was clearly a late member of this year's young, trying to climb onto our bird-feeder. It would leap up to the post, grab on, scramble a few feet, and then slide down. I flung a bit of bread and a handful of birdseed out to it, which of course scared it away, but it did eventually come back and over the course of the day learned to climb first the post, and then the feeder itself, which dangles down from the post and wobbles when a squirrel jumps on it. The first time the little guy jumped on it, it wobbled, and he immediately jumped off again and ran for it. He came back and tried again, and eventually sat down in the trough of the feeder and feasted on some prime birdseed.

Other squirrels showed up over the course of the day, one running along the back fence through the snow, sending up plumes of powder on all sides, and pausing at one point to wipe the stuff off her head. She was running along with her head down, digging into the snow, for no other reason that I could tell except that it was fun.

I watched her with a big smile on my face, thinking what a good and natural thing fun is.

Find Enlightenment