Jeff Kaufman  ::  Blog Posts  ::  RSS Feed  ::  Contact

Responsible Transparency Consumption

People don't usually volunteer details about why they decided to do something, how they did it, or how it turned out, unless they have another goal in mind. You see people and organizations writing about cases where they've done better than expected, in the hope others will think better of them. You see writing that explains already-public cases of failure, casting it in a more positive light. You see people writing in the hope they'll be seen as an expert, to build up a reputation. Additionally, while most real decisions are made in people's heads as the output of a complicated process no one really understands, if you look at decision writeups you'll typically see something easy to follow that only contains respectable considerations and generally reflects well on the ones publishing it. If you're trying to learn from others, or evaluate them, this isn't much to go on.

Efforts to change this generally go under the banner of "transparency", and this is one of the components of the effective altruism (EA) movement, especially for EA organizations. GiveWell is especially known for putting this into practice but basically all EA organizations value transparency and prioritize it to some extent. Individual EAs do this as well; for example, as someone earning to give I keep a donations page and have posted several spending updates.

This puts the members of the EA movement in a position as consumers of transparency: people and organizations are releasing information because it benefits the broader community. This is information that they could easily keep to themselves, since as a practical matter everything is private by default and requires effort to make available. Writing a report requires taking an enormous amount of detail and deciding what to communicate, which means it's very easy through selective inclusion to hide mistakes and present yourself or your organization in an artificially posititive light. And not even intentionally! It's very easy to subconciously shy away from writing things that might make you look bad, or might reflect badly on people you on the whole think highly of.

So imagine an organization makes something public, and voluntarily reports some kind of failure that people outside of the organization wouldn't have known about otherwise. If people react critically and harshly to this failure, it makes them much less likely to be willing to be so transparent in the future. And not just this organization: others will also see that sharing negative information doesn't go well.

When people react negatively to an organization sharing an instance of failure one thing they're doing is putting pressure on the norm that organizations should be sharing this sort of thing. If the norm is very strong, then the pressure is not going to keep people from sharing similar things in the future, and it also means that seeing a failure from this organization but not from others is informative. On the other hand, if the norm is weaker we need to be careful to nourish it, not pushing it harder than it can stand.

full post...

Bash Argument Parsing and Quoting

There are many ways in which bash is an awkward language, and handling of arguments is certainly one of them. Here are two things you might like to do in a shell:

  • quoting: turn an array into a string, using shell-style escaping
  • unquoting: turn a string into an array, interpreting shell-style escaping
For example, consider the following set of strings, separated by line breaks:
argument1
argument two
argument  three
argument='four   and'
There are multiple ways you could quote these as arguments, so here's one example:
argument1 "argument two" "argument  three" "argument='four   and'"
Basically, I want Python's shlex, with its quote and split, but I want it in bash. Unfortunately, bash can't do this easily. What can you do?

Quoting you have to do yourself, but it's pretty straight-forward. Replace \ with \\, ' with \', and wrap each argument in 's if it contains anything suspicious. Here's something that does this:

function quote() {
  first=true
  for arg in "$@"; do
    if $first; then first=false; else echo -n " "; fi
    if echo "$arg" | grep -q '[^a-zA-Z0-9./_=-]'; then
      arg="'$(echo "$arg" | sed -e 's~\\~\\\\~g' -e "s~'~\\\\'~g")'"
    fi
    echo -n "$arg"
  done
  echo
}

Going the other way is both simpler and kind of evil. It turns out that the way you do this is:

eval unquoted=("$quoted")
A warning though: if quoted contains things like $(echo foo) then they will be run. In many cases this isn't a problem, but it's something to be aware of.

(I needed both of these when writing the automated installation script for ngx_pagespeed. You need to be able to give it arguments to pass through to nginx's ./configure, and I wanted people to be able to enter them exactly as they would on the command line. This means I need to parse them into an array first. On the other hand, if you're just using the script to set up ngx_pagespeed it needs to print out a string that you should paste as ./configure arguments, which means I need quoting as well.)


[1] Which would actually need to work like read and be passed the name of a variable to put the array in, since you can't return arrays in bash.

full post...

Hexagonal Keyboard Layout Survey

The piano keyboard is surprisingly poplar for how awkward it is. It puts all the keys into effectively a single row, which means you often need to move your fingers a very long way:

A four foot single-row keyboard is kind of nuts. We could get it down to 3.5 feet or 3 feet by going from piano key spacing (23mm) to accordion (20mm, or 18mm for a "ladies model") but that's still pretty big. [1] Putting in multiple rows for multiple octaves, however, can adramatically increase how many notes are under your fingers:

It turns out there are quite a few systems for laying out notes onto a hexagonal grid like this, so here's a survey of which instruments use which systems. I'm only looking at isomorphic keyboards, which are key-independent. more...

Time Usage

I just tracked my time for the past three days to try to understand better how I spent it. These were relatively standard workdays: wake, eat, commute, work, commute, time with family, sleep. Total times:
getting ready 0:17(1%)
commuting 1:30(6%)
home 5:27(23%)
sleep 7:16(30%)
work 9:28(40%)
more...

Things to consider doing

There are several things I do that I think are very positive in my life, yet I don't see other people doing them, or even discussing them. Some possible reasons:

  1. They're good for me, because of me-specific reasons, and they wouldn't be good for most other people.

  2. They're not actually good, I'm just deluded.

  3. Other people haven't heard of them, it takes time for ideas to spread.

more...
Tune Freedom

There are two common ways to handle the music for social dances:

  • Caller picks a dance, which has a tune.

  • Caller picks a dance, musicians pick a tune.

Well, really, it's a bit of a continuum:
  • In old time square dancing, the band plays something good and the caller calls to it.

  • In modern contra dance, the caller chooses a dance, tells the musicians what it's like, and they pick some music that will fit the dance reasonably well.

  • In Scottish Country dance, the caller chooses a dance, which specifies what tune to start and end with, and the musicians choose other tunes to play in between.

  • In English Country, traditional contra dance, and several other forms, the caller chooses a dance, which has a specific tune that the musicians are expected to play.

Each end of the continuum has something going for it. At the coordinated end, you get music that can fit the dances really well. If the dance has some fun twiddle a third of the way in, the music can as well. Over many evenings dancers can learn to associate the music tightly with the dance, helping them remember it and building memories of specific dances that reach across decades. At the uncoordinated end, it's a lot easier for new bands to get started. They can work up a few great sets, practice them for months, and know they'll get to play all their solid stuff regardless of what dances the caller chooses. more...
More Posts


Jeff Kaufman  ::  Blog Posts  ::  RSS Feed  ::  Contact  ::  G+ Profile