Procrastiblog

November 18, 2008

On Emulsions

Filed under: Top Chef — Chris @ 4:49 pm

Josh Friedland arrives late to the emulsion debate, drags Alan Davidson and Harold McGee into it, and winds up getting it wrong:

Stefan was wrong. A vinaigrette is an emulsion.

The correct answer was:

Stefan is arguably right, but he’s being an asshole.

This was a drunken late-night pissing contest. The standard of proof is not, “does there exist an interpretation of the word emulsion which falsifies Stefan’s claim?” The standard of proof is, “(a) do you have a douchey beard? and (b) does Stefan have a leg to stand on?”

And the answer is, yes, you do, and yes, he does. The distinction here is between a strong or stable emulsion and a weak or unstable emulsion. It is possibly, through cunning and chemistry, to emulsify a vinaigrette to the point where it will remain stable for several days, but that’s nothing compared to butter, margarine, mayonnaise, or magma.

Get on the right side now, because the strong will annihilate the weak.

November 16, 2008

A CharBuffer is Not a StringBuffer, or Something You Already Knew If You Read the Documentation

Filed under: Tech — Chris @ 3:46 pm

A Java CharBuffer doesn’t behave the way I would expect.

CharBuffer buf = CharBuffer.allocate(8).put("foo");
System.out.println( "'" + buf + "'" );

yields

'^@^@^@^@^@'

or

'

This is because a CharBuffer is not a StringBuffer: toString() gives you everything from the current “position” to the end of the buffer. I.e., what you haven’t written yet. (Those funny symbols, or the lack thereof, are nulls.) Instead you want

CharBuffer buf = CharBuffer.allocate(8).put("foo");
System.out.println( "'" + buf.flip() + "'" );

which yields

'foo'

flip() makes the current view of the buffer what has been written to it so far.

P.S. Why can’t flip() return a CharBuffer, so that

November 13, 2008

Top Chef, Season 5

Filed under: Top Chef — Chris @ 1:09 pm

Let me take a stab at blogging Top Chef this year… though I’m not particularly excited for this season and last night didn’t get my hopes up. There’s a well-known tendency for competition reality shows to get stale after a few seasons and Top Chef is no exception. I think it’s not because the challenges have gotten repetitive (they have, but they’re usually fairly interesting), but because one grows weary of watching the cheftestants make the same mistakes over and over again.

Here’s a few quick guidelines for the cheftestants of the future.

Rule #1: Never make a salad. If it’s great, it’s just a salad. If it’s not great, you’re going home. Just ask: Lauren, last night; Carlos (Season 2). [UPDATE] I forgot Marcel (Season 2), who probably would have been the Top Chef if he hadn’t served a salad (with a failed attempt at a vinaigrette “teardrop”) in the finale.

Rule #2: Never make something you’ve never made before. Especially not some random Chinese noodle you just assume will work in your dish. Just ask: Patrick, last night.

Corollary #2.1: Don’t assume you’ll get bonus points just for trying. Daring counts for very little.

Corollary #2.2: Never make dessert. You’re probably not good at it.

Rule #3: Never be a culinary student, a caterer, or a Mom. For obvious reasons. Just ask: Patrick, Betty (Season 2), Antonia (Season 4).

Rule #4: Never make risotto. The judges can be persnickety and risotto is easy to nitpick. Just ask: Howie (Season 3).

Corollary #4.1: If you make a risotto, make it Rocco Dispirito’s way. Otherwise, his face might betray an emotion.

Corollary #4.2: Never try to be cute and call something that’s not risotto a risotto. That’s not cute. Just ask: Almost everybody last night.

Sub-Corollary #4.2.1: Don’t be cute with culinary terminology in general. Especially French culinary terminology. Just ask: Casey and her non-coq au vin (at the French Culinary Institute!) (Season 4).

Rule #5: Never be the team leader. If your teammates fuck you, you’ll probably take the fall. Just ask: Tre (Season 3), Dale (Season 4).

Rule #6: Never try to shift the blame. Aka the “under the bus” rule. It never works, and it makes you look like a jerk. Just ask: Dale (Season 4), Elia (Season 2).

In closing, I would like to attempt to unpack Stefan’s assertion that a vinaigrette is not an emulsion. (My first instinct is to say Daniel loses the argument by virtue of having douchey notches cut out of his beard. But let’s follow this through.) An emulsion is “a stable suspension of small droplets of one liquid in another” with which it does not mix. For example: mayonnaise. Although a vinaigrette is undeniably “emulsified,” it is not stable (i.e., the vinegar and oil begin to separate almost immediately if left to sit), and therefore not an “emulsion.”

So Stefan is arguably right, but he’s being an asshole. My kind of asshole.

November 6, 2008

Good job, America.

Filed under: Politics — Chris @ 1:34 pm

Probably the most historic aspect of Tuesday’s election is that it broke my four-year-old election-canvassing jinx:

  • In 2004, I canvassed for ACT NOW (not John Kerry, wink wink) in Liberty, Missouri. John Kerry lost Missouri by 196,000 votes (though he won Jackson county by 53,000).
  • In 2006, I canvassed for Lois Murphy in Pennsylvania’s 6th House district. She lost by 3,000 votes.
  • In 2006, I canvassed for Diane Farrell in Connecticutt’s 4th House district. She lost by more than 6,000 votes. Her opponent, Chris Shays, was the only New England Republican to win re-election to the House. (In fact, this year he did not win re-election. But I didn’t canvass there this year.)

This year:

  • I canvassed for Obama in Northeast Philly. Obama won Pennsylvania by more than 600,000 votes. He won Philadelphia country by more than 450,000 votes. (I knocked on about 200 doors, at most.)
  • I did Election Day phone-banking for Obama into Miami-Dade County in Florida. Obama won Florida by more than 194,000 votes. He won Miami-Dade by more than 139,000 votes. (I made maybe 100 phone calls… By around 4:30PM, there were no voters left to call who were willing to pick up the phone.)

Barack Obama has taught me an important lesson about democracy: A really good candidate with an overwhelming advantage makes all the difference. And I make no difference at all.

AN ALTERNATIVE THEORY: LC’s brisket and Stroud’s fried chicken on Election Eve are bad for Democrats. Chink’s cheesesteaks? Electoral gold.

November 4, 2008

Seriously, People: Vote

Filed under: Politics — Chris @ 6:01 am

If you live in a Blue State: Vote.

If you live in a Red State: Vote.

If you live in a “battleground” state: Vote.

Tell your parents: Vote.

Tell your siblings: Vote.

Let your born-again uncle slip your mind.

Tell your slacker friends who think they’re too fucking cool: Vote.

Tell your yuppie douchebag friends who think they can never leave work: Vote.

Tell your cat: Vote.

Tell your dog: Vote.

Tell Mickey Mouse: Vote.

Then: Vote.

Vote, vote, vote.

To find your polling place, visit VoteForChange.com.*

* If you are uncomfortable asking Barack Obama where your polling place is: Don’t Vote.

November 2, 2008

Notes on Canvassing, 2008

Filed under: Politics — Chris @ 10:23 pm

It’s often said that Democrats need to work harder to attract rural and suburban voters. As a campaign volunteer, I say: More urban voters. More apartment complexes. More row houses. Fewer front yards. Fewer side fences. Let the rich people with the long driveways figure out when the election is on their own.

I leave you with some wise words from the old people of Northeastern Philadelphia:

  • “I may burn in hell for it, but I think I’ll vote for Obama.”
  • “You keep knocking on my door and calling me by the wrong name! I’m sick of it! I’m not going to vote!”
  • “Be of faith!”

October 30, 2008

This is your post for October

Filed under: Waste of Time — Chris @ 8:54 am

Just because I don’t like to see gaps in the archives… Twitter has been doing an astonishingly good job gobbling up the raw dough of my thoughts before they become half-baked blog posts.

September 7, 2008

Monotonix

Filed under: Music — Chris @ 10:54 pm

I’ve never seen a band try harder or better succeed at re-contextualizing rock and roll as a visceral experience and forcing an audience to respond in kind than Monotonix tonight at the Bowery Ballroom. We’re talking serious any-more-and-you’d-be-GG-Allin stuff, here. They got New York indie rock nerds to mosh. It looked something like this, only much more crowded:

Oddly, they were opening up for the Silver Jews, who were resolutely un-rock-and-roll, un-visceral, and dissapointingly uninteresting.

September 2, 2008

WINE Paths

Filed under: Linux — Chris @ 11:02 pm

If you try to run a Windows command-line app on Linux under WINE, you may find that filename arguments yield errors like the following:

$ wine z3.exe -smt /tmp/smtlib2b129a.smt

Error: invalid command line option: /tmp/smtlib2b129a.smt
For usage information: z3 /h

The problem here is that the ‘/’ at the beginning of an absolute path can be interpreted as the beginning of a Windows-style command-line argument. The following script takes a Windows command-line and Windows-ifies Unix path arguments.

#! /bin/bash

if [ "${1+set}" != "set" ]
then
  echo "Usage; winewrap EXEC [ARGS...]"
  exit 1
fi

EXEC="$1"
shift

for p in "$@";
do
  if [ -e "$p" ];
  then
    p=$(winepath -w "$p")
  fi
  ARGS="$ARGS $p"
done

wine "$EXEC" $ARGS

The script can be used thus:

$ winewrap z3.exe -smt /tmp/smtlib2b129a.smt

Which will execute

wine z3.exe -smt Z:\tmp\smtlib2b129a.smt

P.S. You can also just use the WINE drive mapping (in this case / == Z:\), but I’d rather keep my Unix mindset and let the script do the work.

August 29, 2008

Using lp/lpr with CUPS

Filed under: Linux — Chris @ 4:12 pm

Ubuntu provides the traditional Unix lp/lpr commands via the cupsys-bsd package, but they annoyingly don’t pick up the CUPS default printer.
How do you identify your current default printer from the command line?

lpstat -d

How do you set your preferred default printer?

lpoptions -d PRINTER_NAME

Ah, yes. But how do you find the names of your installed printers?

lpstat -a

What’s all this good for anyway?

lpr [-P PRINTER_NAME] PS_OR_TXT_FILE
-OR-
enscript [-P PRINTER_NAME] TXT_FILE

« Newer PostsOlder Posts »

Blog at WordPress.com.