Archive for March, 2010

My new movie-watching mode

Wednesday, March 31st, 2010

The DVD drives in the last few years’ Mac models are quite loud. When watching a movie from a DVD, it sounds like I have a very-high-speed fan only a few feet from me, only without the cool breeze.

This is a problem because I keep my sound volume cranked way down (to the benefit of my hearing), so the DVD drive effectively drowns out the movie. I don’t have this problem when watching a video from a hard drive or the internet.

So here’s what I do:

  1. Copy (straight across—no decrypting) the DVD to my media hard drive on my desktop machine.
  2. Eject the DVD, put it back in the case, and put the encased DVD away.
  3. Watch the movie in VLC.

Yesterday, I successfully tried a new variation on this procedure:

  1. Copy the DVD to my media drive on my desktop machine.
  2. Eject the DVD and put it away.
  3. Make the Movies folder on the media drive a shared folder.
  4. With the desktop machine downloading stuff from the internet or maybe seeding a (legal) torrent, go on my laptop in another room and mount the desktop’s Movies folder on the laptop.
  5. Watch the movie (in the mounted shared Movies folder) in VLC.

You’ll notice that I did not copy the movie to the laptop. I opened the copy on the mounted local share, so VLC on my laptop was effectively streaming the movie from my desktop.

This requires a bit of tweaking in VLC’s Advanced Preferences. The default settings waited too long to read more data from the “disk”, so the movie was jerky. I fixed this by appending a couple of zeroes to the latency fields for the three relevant “access modules”: DVD without menus, DVD with menus, and file. (You may only need to set the last one; it didn’t work right until I set that one, and once it did, I didn’t do any further investigation.)

Once I’d made those small changes, the movie streamed fine over the local network.

Now in a permanent place: My sources of free music

Friday, March 26th, 2010

Having a succession of aging blog-post lists of sources is going to get old fast, so I’ve written down my current list of free-and-legal-music sources in a new permanent web page.

From now on, if you ever want to tell somebody just how much music is available for free, that’s the place to send them.

Bubble Trouble’s high-quality music

Tuesday, March 23rd, 2010

Does this sound familiar to you?

That’s the full version of “Coconut Island” by Matt Swoboda. You may know it better as this shorter version, which is the version used as the alternate level-set-1 background music in the original Bubble Trouble.

Curiously, the Mac OS X version of Bubble Trouble omits that music, although it does include the four other music tracks as ‘snd ‘ resources. All five tracks originally came as MAD files; here’s an archive of the MAD files, rescued from the original Bubble Trouble’s Mac-OS-only installer, for your listening/converting pleasure.

Among the five tracks are two others by Swoboda, composed specifically for Bubble Trouble. The other two are by Yannis Brown. The full song list is:

  • Level set 1: “Bongalonga” by Brown
  • Level set 1 (alternate): “Coconut Island” (Bubble Trouble edit) by Swoboda
  • Level set 2: Composed specifically for Bubble Trouble by Swoboda
  • Level set 3: “Chunga-babe!” by Brown
  • Level set 4: Composed specifically for Bubble Trouble by Swoboda

You’ll need PlayerPRO to play or convert the MAD files; Vox, which I normally use to play and convert modules, does not support MAD. Also, you may find that PlayerPRO doesn’t work under Mac OS X; I used 5.10.0rc2, and it did nothing but crash when I tried to load a module file. (UPDATE: It’s mostly fixed in trunk@r110—no crash, but oversampling now distorts the audio.) I had to run 5.9.8 under SheepShaver (which is also how I installed the original Bubble Trouble, which is otherwise locked away in that Mac OS installer).

Enjoy.

Dickey’s Barbecue Pit

Saturday, March 20th, 2010

I ate at the Dickey’s in Huntington Beach for the first time tonight, and decided to write up my observations.

(ADDED 2010-07-04: The Dickey’s in Huntington Beach has closed.)

The place is very obviously a chain. The first thing you notice upon walking in is that the decor is not the burned-wood-and-horseshoes type you usually see in barbecue restaurants. It looks more like a fast-food restaurant, and, in fact, that’s what it is (slogan: “Slow cooked, served fast”).

If I were to describe it pithily, I’d call it the KFC of barbecue. Like KFC, it serves a type of food that most fast-food chains don’t touch; the main difference is which type: fried chicken vs. barbecued meat. One particular similarity is their acknowledgements of their founders in messages on the walls: for KFC, it’s the famous Colonel Sanders; for Dickey’s, it’s Travis Dickey.

Here’s their drinks menu:

  • Big Yellow Cup (32 oz.), $1.99

That’s it. That’s the only size, not counting the smaller size included with the kid’s meal.

Both sizes are a hard-plastic yellow cup, similar to what you used to be (maybe still are) able to get at AM/PM and some other convenience stores. The cup calls itself a “souvenir cup”, but otherwise looks like it’s intended to be refillable. I don’t think you get a discount for that, but you can at least feel good about not throwing away cup after cup.

One nice touch: At every table is a roll of paper towels.

You can buy meat by the plate or by the pound; the former option, which is what I went for, comes with two sides and a roll.

Curiously, the baked potato counts as two sides. It’s a large potato, and comes with a full suite of toppings: Two individually-wrapped four-triangular-sided thingies (what do they call those?) of sour cream, a cup of chives, a cup of bacon bits, three tubs of “whipped spread” (essentially margarine), and I think one or two other things. All of that occupied an entire second plate, next to the one that had my brisket on it.

They offer six types of meat: Beef brisket, Polish sausage, pork (two kinds), chicken breast, and turkey breast. I had beef brisket. It was good. It cut easily, sometimes a little too easily (falling apart under my fork). I eventually settled on scooping it onto my fork with my knife.

The sauce is not too spicy, but you will want to alternate between the meat and either the roll or cole slaw, or else the heat will accumulate. It’s not unbearable, but it drowns out the rest of the flavor. They also have a “hot ‘n’ spicy” sauce.

I will go again sometime.

My Amadeus Pro sonogram preset

Monday, March 15th, 2010

When I do audio editing in Amadeus Pro, I find its Sonogram command useful. That command gives me a three-dimensional graph of frequency distribution through time:

Where x = time, y = frequency, and z = amplitude.

The default setting shows the z axis with a color gradient of white through orange through blue to cyan, which I found hard to read. What you see above is my variation on the built-in “Greyscales” preset: Just like a printout, white is dead, black is maxed.

The difference with my preset is that the original is linear, whereas mine is a curve. Here’s the preset editor, showing my preset:

The “Grayscale Nonlinear” preset.

Sampling the swatches in that screenshot will tell you that the five equally-spaced gradient stops are:

  1. White
  2. 50% gray
  3. 25% gray (at the halfway point)
  4. 12.5% gray
  5. Black

I’ve found that these settings make the spectrogram clearly readable without my having to fiddle with the “range” and “gain” sliders.

Capture Cursor

Saturday, March 13th, 2010

Most people don’t know how to get the cursor that’s currently on the screen—a useful ability, especially if you’re writing screenshot or screen-recording software. I’ve written an app that demonstrates the technique, or at least tries to.

It’s a bit flaky. The API it uses, IOFramebuffer, doesn’t tell me how many frames there are or what format they’re in, so the app assumes ARGB in native byte-order and doesn’t worry about frames. This gives wrong results more of the time than I like.

I’ve filed a request for a higher-level API, which would make the task much easier and the app much shorter.

I’ve posted a build in the repository’s downloads area, in case you’d like to see it in action. If you want to build it yourself, you’ll need to download SGHotKeysLib and put the source where the Capture Cursor Xcode project expects it to be.

UPDATE 2010-08-28: I’ve pushed a change, [9cbec7dd5169], that deletes the IOFramebuffer-based category method and uses Snow Leopard’s new, far more reliable [NSCursor currentSystemCursor] instead. I suggest you do the same.

The Green Checkmark of Acceptance

Saturday, March 13th, 2010

Here’s how answers to a question on Stack Overflow appear to the questioner:

Every answer has, below the helpful/unhelpful buttons, a hollow checkmark button.

When the questioner clicks on one of those checkmarks, it marks the answer as the accepted answer to that question, and changes the checkmark from a gray stroke to a green fill.

Everybody else reading the question will see, below the questioner’s name, an indication of how many of their questions have accepted answers. Today, for example, my questions have:

Peter Hosey
23.1k 2 14 28
67% accept rate

This indicates that I have accepted answers on four-sixths of my questions.

Sometimes, I see a comment like this semi-fictional example (written by me, based on several real examples I’ve seen) on a question whose author has a low or zero acceptance rate:

0% accept rate? You really should accept answers on your questions, or people may not answer any further questions from you.

This is a bad reason to accept answers.

The real reason to accept an answer is that you believe it’s the correct answer.

Sometimes questioners choose bad answers (deprecated APIs, hacky solution, etc.). When that happens, it’s a problem because it may lead future readers astray—they may think that this is the correct answer (because the questioner said so), without reading the other answers or the comments and finding out that this way sucks and/or there is a better one.

The same problem happens when a questioner accepts an answer because they think they have to, out of some sort of social obligation, rather than because they truly believe it is the correct answer. They may not have the correct answer yet, or there may not be a correct answer yet, but they feel like they have to accept something, so they accept the best answer they have, however good or bad it is, solely to raise that all-important number.

That sucks.

Questioners: About a day after asking a question, you should return to it, read all the answers, try them in descending order by votes, and accept the one that works and is the least hacky, for the benefit of other people who have the same question you asked. Take comments into account—something may not look hacky, but a comment may point out the hackiness.

And if there is no good answer, you don’t need to accept anything. For the same reason (the benefit of future readers), you should leave the question open.

It’s OK to have an acceptance rate that is below 100% or even low, as long as you are accepting answers that you find work and are non-hacky, on as many of your questions as you can. As long as you’re making that effort, you’re doing it right.

People who post comments like the one above: Why are you so desperate for karma? It’s not like it’s scarce or valuable. Net scores on answers are meaningful (usually), but your personal total, like mine, is next to meaningless. It’s a reward, yes, but an empty one, so I don’t see why you get all hurt when you perceive a risk that someone may not give it to you.

In summary: Don’t worry about it. Accept correct answers, write correct answers, and don’t worry about your acceptance rate or anyone else’s.

Cocoa and Cheesesteaks, March 2010

Saturday, March 6th, 2010

CocoaHeads Lake Forest is this Wednesday, the 10th, at 7 PM. If you’re attending, let’s have dinner at 6 PM at Philly’s Best in Lake Forest:


View Larger Map