Thursday, July 1

nerd density

I started this entry by typing

  mv 1 essayattempt
  head -1 essayattempt > 1
  vim 1

I'd been trying for about an hour to write an entry explaining a command I'd been writing to replace some text in files. Or rather, I'd been trying to write a longer piece that seemed natural when I realized I had been assuming on the one hand that my reader might not understand HTML, and on the other that my reader could pretty much grasp a one-liner.

The first almost-working version of my one-liner looked like this (nerds may immediately recognize that it is a bit silly):

find . -type f -print0 -regextype posix-extended -regex '\./[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}.*' | xargs -0 -n 1 grep '<h3>'

Here are three different commands, two kinds of output redirection, two dialects of regular expressions, a couple or three basic Unix filesystem concepts, and the perpetual nuisance of shell quoting mechanisms. If you don't know what any of that means, you shouldn't feel bad, because I just failed spectacularly at figuring out how I would explain it to you.

What I thought was roughly: ok, can I make this whole process I'm engaged in comprehensible to a casual user of desktop computers? Someone who maybe runs Windows to browse the web and work with a few local documents? Can I actually explain what I'm trying to do and why these are the tools I'm using, without assuming too much or lapsing into a version of Bad Popular Press Science Writing?

I expected that I'd fail in the attempt, but I was surprised by how hard it turned out to be. To give an example, I started writing a plain English description of what an HTML tag is, and found myself trying to articulate, on one hand, the idea of a "text file", and on the other what it is that we usually mean by "semantics".

There's a remarkable depth to things.