Category Things I’ve Learned

Different Ways of Looking at Sound

I’m in the middle of ripping my cassette collection to MP3, and using Audacity to clean up the recordings, split them into individual tracks, and so forth.

One thing I’ve learned is that displaying a track as “Spectrum” rather than the default “Waveform” can be very useful in figuring out where one track ends and the next one starts, especially when the first track fades out and the next one fades in.

Here’s a perfect example I just ran across: Read More

The Pun Is the Most French Form of Humor

I’ve often been struck by how much French humor relies on puns and wordplay. I suspect that this has to do with how easy it is to make puns in French vs. English. For instance, every time I pass the canned foods aisle at the grocery store, I think of how “ravioli” in French is a near-homonym for “delighted in bed”. And I just ran across the song “Aux sombres héros de l’amer”, meaning “To the dark heroes of bitterness”; but as TehPedia points out, this can also be heard as “O Sombrero of the Sea”.

Read More

Is Ungrammatical Text Really Harder to Read?

I’m in the middle of Steven Pinker’s How the Mind Works. He talks about experiments in which subjects are shown letters in random orientations, and have to figure out whether the letters are mirror-flipped or not. What was found was that people have to mentally rotate the letters they see, so that they’re right-side-up, at which point they can tell whether the letters are mirror-reversed or not. This rotation takes time.

I wonder if similar work has been done with respect to words and text. It seems that when I’m reading text with a lot of typos, or 1337-speak, or poor punctuation, or inappropriate homonyms (e.g., “who’s” when it should say “whose”), it takes me longer to read than to read text with proper sentence structure, punctuation, and spelling. I wonder whether this is just an illusion, or whether it actually takes more mental work to read the text as written and translate it into proper English.

How Not to Lose Disks

Have you ever upgraded a machine, only to find that during the upgrade, your device names got rearranged, so that your filesystems aren’t where they used to be, and you can’t mount anything?

This happened to us at work: we upgraded a fileserver with a hundred or so filesystems on a SAN. The driver software silently shuffled the devices around, so after the upgrade, nothing got mounted where it beloned. We had to ask the users to look through the filesystems and tell us where they should have been mounted.

To prevent this sort of thing in the future, we adopted a simple trick: on each filesystem, create a file called mountpoint that says where the filesystem ought to be mounted.

Yes, this is pretty much the same as labeling each partition, as some OSes allow you to do. Except that it’s arguably more robust, because you don’t need to rely on different versions of the OS being able to read the partition label. Besides, it’s simpler, and survives backups, replication, and so forth.

Automating all of this is left as an exercise for the student.

Word O’ the Day

Pomaceous: pertaining to apples. A nice autumnal word.

Pattern Substitution as Funky Iterator

I have a project in which I have a row of cells, and a number of segments of given lengths, and I need to try out all of the ways in which the segments can fit into the row. If you like, think of it as: how many ways can “eye”, “zygote”, and “is” be placed, in that order, on a row of a Scrabble board?

I’m doing this in Perl, so naturally I’d like to play to Perl’s strengths (pattern matching and substitution) rather than its weaknesses (arithmetic). And I’ve discovered a nifty little hack.

Read More

Why Name A Newspaper After an Insect?

One question that’s been bugging me (sorry for the pun) is why any newspaper would call itself the “Town Name Bee”. Thankfully, the Sacramento Bee has an explanation (summary: the bee represents industry, as in “busy as a bee”).

Naturally, if I point out that there’s a town in Arkansas called De Queen, you won’t be surprised to learn that its newspaper is De Queen Bee.

Truncated Songs on iPod

Every so often, I’ll update the MP3 file for a given song. For instance, if I record an LP to MP3, then buy and rip the CD, I’ll just update the MP3 file on the back end and tell iTunes to reread it (with open -a itunes /path/to/file.mp3, for those who care).

Unfortunately, when I do this, I’ve noticed that iTunes plays the new file properly, while the iPod tends to hang a few seconds befor the end of the song, or, in more extreme cases, reset itself.

Read More

Making Emacs Do Stuff at Startup

Like many users, I start an emacs session in .xinitrc and use it throughout the day. Since I’ve recently started using Emacs Planner, I wanted it to start up automatically in that first Emacs session (but not subsequent ones, if I just want to edit a file).

Read More

How to Prevent Lines from Wrapping in Emacs

By default, Emacs’s buffer list truncates lines at the right edge of the screen: if you’re editing a file with a long name, it doesn’t wrap around; you have to use C-x < and C-x > to scroll the viewport left and right.

I’d always wondered how to do that, since it can be useful when editing files like ~/.ssh/known_hosts, where the useful information is at the beginning of the line, and the wrapped keys get in the way.

Now I know:

(setq truncate-lines t)