iPhone haiku

Two days ago

fell into water
with iphone in my pocket
sometimes things get wet

This morning

with my fingers crossed
tremulous, phone cased in rice
power on. it works.

Whew!

Harper’s Index and Underwear

Via Harper’s index:

Japanese astronaut Koichi Wakata revealed that for a month in space he wore the same underwear, which was flame-resistant, controlled odors, killed bacteria, and absorbed water. Wakata said that he also ate a number of curries. “My station crew members never complained,” he said, “so I think the experiment went fine.”

pushd, I hardly knew you

From a tech/geeky point of view, this is embarrassing enough that I probably shouldn’t mention it. There is hope, however, that some other soul will benefit from my pain.

If you use the *nix (or OS X) command line, you probably know about pushd. It and its companion popd let you push and pop (duh!) a stack of directories so that you can jump from place A to place B and then quickly jump back. Cool.

The embarrassing part is the way in which I was using pushd. I thought that I had to push the directory I wanted to come back to before I went there. So I would:

> pushd .
> cd /someplace
> ... do stuff ...
> popd

This works, but it (obviously) looks sort of, well, dumb. Somehow, when I learned about pushd, I never learned that it acts just like the change directory (cd) command. I.e., that the argument to pushd was the directory to which you want to move and that it saves your current directory automatically. Thus, the correct (more efficient) way to use pushd is:

> pushd /someplace
> ... do stuff ...
> popd

It only eight fewer keystrokes but it’s conceptually much cleaner. The morass of the story: use pushd but use it correctly. Alternately, keep reading the manual, you’ll probably still learn something!