Sunday, April 29

Back from Albany. Have just read Homage to Catalonia. Shaved my head this morning.

saturday, april 28

the albany sky gets lighter
through the attic window
we drink bottles of yeungling
and pass a final pipe

Wednesday, April 25

Tuesday, April 24

tree pollution

Wednesday, April 18

It's been rainy here in Boulder County, and the landscape is as green as it seems likely to get this year. I should have learned by now, though, not to make predictions based on so little experience of a place. After 26 years Nebraska and Kansas still surprise me. 78-year-old men sit in gas stations over bad coffee talking about the weather and shaking their heads. Certainly this is a piece of deep routine, but partially it is because the weather still surprises them too.

My Grandma Bearnes must have talked to me about the weather every time we ever spoke on the phone. If you are a person who takes an interest in things, who notices the substance of what is really going on, this variation is woven all through the stuff of your life. Here, Colorado seems at first glance to offer less variation, but it is possible I am just not calibrated yet. Or maybe that I do not take an interest in real things.

When I was back to the farm for Easter, we looked at some of the calendars she kept. The kind spiral-bound on a piece of heavy stock with the logo of some elevator or co-op. She started writing small simple notes in them some time in the mid or late 1960s. There's an entire box full of them, a life in brief sentences. Livestock, church business, friends and neighbors, children and children's children. Weather.

Tuesday, April 17

WordPress sucks.

Thursday, April 12

Aristotle Pagaltzis:

My problem with GUIs is that they all blow chunks.

That is not to say that I believe this to be inherent. However, contemporary GUIs are all too obviously created to allow the user to carry out just those operations that the GUI designer foresaw.

Commandline interfaces and text editors for heavy lifting such as vi and Emacs, on the other hand, are rather abstract. They offer powerful and generic tools for manipulating text streams, leaving it up to the user to combine these tools into a chain of actions that accomplishes his task. This way, given tools free of artificial restrictions, it is possible to achieve effects never foreseen by the authors of any of the tools involved.

Artificial systems are everywhere, right? In the sense of classificatory apparatus? Yeah, I know classificatory is an appalling word, but it stuck in my head the first time I ever read the phrase classificatory mania. Let us say in the sense of ways to arrange things, and understandings of the ways that things are arranged, and the deep confusion between the two.

Yesterday I had this moderately useful moment of recognizing that broken schemata and bad abstractions are just everywhere. This isn't uniquely, or even especially, a software problem. It's just that thinking about software - or, god help you, actually using most of it for a non-trivial task - sure brings it out in sharp relief.

Human thinkers have a staggering capacity for bad empiricism. Think about design. Think about education, religion, philosophy, and the available categories of political classification. Or the actual process of science, even in fields with a tight coupling to bedrock physical quantities.

As a species, it seems like we always try first to make the data fit the model. In fact, we go to endless lengths to avoid substantially revising or discarding a bad model. It causes us tremendous pain - whether the model in question is a religion, a piece of physics, or something as (apparently) trivial as a programming language.

I think this tendency may be, after sex and death, the third essential component of the human tragedy.

Monday, April 9

Saturday, April 7

Wednesday, April 4

you all who come here for things about real life can ignore this one as well.

I spent today mucking around with JavaScript again. Actually, it didn't feel anywhere near as unclean as I would've expected. In many ways, it seems like a decent language. There's even a kind of elegance to the DOM/CSS/JavaScript stack. If the relationships you're trying to model can be handled cleanly in HTML markup, then you get lots of nice things for free.

Maybe that's a big if, but to give a concrete example, I'm putting together an interface where the items to be manipulated can be in one of three panes on the screen at a given time. They need to display and behave differently in each pane. It turns out to be cake for the same list item to change styles radically depending on the class of its containing list:

<ul class="right" id="bucket">
  <li>Foo</li>
  <li>Bar</li>
</ul>

<ul class="left" id="platter">
  <li>Baz</li>
  <li>Bif</li>
</ul>

...can render as buttons with left and right pointing arrows, for example, just by setting the styles for ul.right li and ul.left li. You have to play with it a bit, but if your browser doesn't completely suck, it'll look pretty darn ok. And then you just do something like this:

var bucket = document.getElementById('platter');
var bucketItems = bucket.getElementsByTagName('li');

for (var i=0; i < bucketItems.length; i++) {
  bucketItems[i].onclick = listHandler;
}

And write listHandler to do the right thing based on context:

function listHandler () {
  var place = this.parentNode.className;
  switch (place) {
    case 'left':
      // appropriate action here
      break;

    case 'right':
      // you get the idea
      break;

    default :  return;
  }
}

Which is way easier than doing a lot of accounting on event handlers as you move list items around to different containers. (Which is what I was doing before, using a bunch of anonymous functions. Anonymous functions in JavaScript are neat, but all of that "well, I'm putting it over here so I have to make sure that when I click it it'll move back over here" logic gets fragile in a hurry.) You even wind up with list items which do nothing when clicked in a context where, say, the entire <ul> has an onclick - without having to set all those individual handlers to null. (Or at least you do in Firefox.)

I've got no idea how correct any of this is. There may be a much smoother way to assign a certain event handler to all elements of a given class, or what have you. It's not like I know the language, and I've treated this stuff as toxic for so long that I might as well have been living in a cave since around 1998, but it could all be much worse.

Postscript: If you haven't tried Firebug, you might want to try Firebug.

Tuesday, April 3

About half of everything
Interesting there is to
Say about abstraction
Is in the Dao De Jing
The other half is probably
In the body of literature
On functional programming.

Sometimes I wonder what
It would be like to read either
In the original.

Monday, April 2

I learned a little JavaScript today for a project at work. If this is the most exciting thing that happens all week, it won't surprise me.

If you're in the market for a decent vector drawing program, Inkscape is getting much better these days.

Sunday, April 1

palm fool's sunday

It's the afternoon of Palm Sunday, and I'm sitting on the bed drinking bad Australian Chardonnay out of a plastic Salvation Army mug with the "God Loves You" and the yellow smiley face mostly worn off of the side.

I had a minor epiphany last night about the iterative, cumulative, one little piece at a time nature of the creative act. I wouldn't swear to it, but I think it initially had something to do with the idea of iterating over lists in programming languages. Anyway I sat up in bed and wrote a note for myself about for and map that no longer makes any particular sense.

The substance of the thing - and I have at least one of these moments every night, as I fall asleep trying to somehow reconcile the failures of the day with the elaborate promises I made myself the night before, so it's not as if most of them have much substance - was that anything I am ever likely to leave in my wake will be the product (the residue, perhaps) of small movements and actions accumulated over weeks, months, and years. It'll take some organic shape, because I am powerless to do a thing about it. This isn't intent. It's low-key compulsion. The things that stick at all are accidental, incidental, the result of some few habits which leave traces. The beer-bottle caps in a jar on top of my refrigerator.