Monday, December 22, 2008

An Avocado in the Snow

An avocado
An avocado, found in the snow near Portland St and Broadway, Cambridge, MA

An avocado in the snow.
Who left it there? I do not know.
Not Father, Son, nor Ghost so holy,
Rebirths you into guacamole.
Did leaping from some wretched fate
Allow you to feel special, great?
Or did, cast down like ancient foe,
You weep from terror, weep from woe?
But lie here now, near Portland Street,
And rest, green flesh and tasty meat.

Saturday, December 20, 2008

I've Had It With...

Well, well, well... it looks like we have another airline adopting movie plot security tactics. From JetBlue's page on service animals (emphasis added):

Certain unusual emotional support animals (i.e. snakes, other reptiles, ferrets, rodents and spiders) pose unavoidable safety and/or public health concerns and will not be allowed to jet with us. The release of such an animal in the aircraft could result in a direct threat to the health or safety of customers and crewmembers.
No word on whether they've hired Mr. Jackson as a consultant.


Monday, December 1, 2008

In The Beginning, There Was Goo

Wolfire Blog has a neat analysis of the design of World of Goo (which, if you haven't played it, is a rather fun game.)


Wednesday, October 1, 2008

Rice is Nice

Today's Times has a great article about rice cookers.

1. I want to try toasted rice ice cream.
2. I think that this should be our national loaf.
3. I want to stick a spoiler on my Sanyo, turning it into a rice rice cooker.


Tuesday, September 30, 2008

Lede By Example

Here's a lede I never thought I'd see:

A spokesman for the pirates ... said that so far, in the eyes of the world, the pirates had been misunderstood. Somali Pirates Tell All: They're in It for the Money, New York Times, 2008-09-30

Wednesday, July 30, 2008

Snarkiest Review Ever

The New York Times reviews a trendy fashion boutique in delightfully snarky fashion. The place truly does sound bizarre; the sales clerk at the store was disappointed that they'd sold out of the dress that came with an instruction manual.


Monday, June 30, 2008

Now That's Social Engineering!

A federal agent strolls into a small Missouri town and helps clean up their meth problem, spearheading a string of arrests. The only problem is that he wasn't really a federal agent, or any kind of law enforcement officer at all. Monica Davey for the New York Times writes:

Those whose homes were searched, though, grumbled about a peculiar change in what they understood, from television mainly, to be the law. They said the agent, a man some had come to know as “Sergeant Bill,” boasted that he did not need search warrants to enter their homes because he worked for the federal government. Sergeant Bill, it turned out, was no federal agent, but Bill A. Jakob, an unemployed former trucking company owner, ...

Comics I Don't Understand

Comics I Don't Understand finally re-did their site so that it's actually readable. One of their latest entries is a particularly fine "Garfield" cartoon, although I'll confess that I wouldn't have got the reference without the explanation.


Monday, June 16, 2008

Unsafe At Many Speeds

Do street signs make us less safe? This article argues that they do, by making excessive demands on drivers' attention and training them to not think. It makes the case for, amongst other things, roundabouts over four-way stops, on the grounds that at a four-way stop, drivers look at signs off to the side of the road instead of looking in front of them; at roundabouts, on the other hand, focus remains on traffic.

I've also seen the argument that roundabouts are better because traffic proceeds through them more slowly. Also, I think they have better failure modes. If you don't notice a stop sign, it's easy to drive through an intersection at or near full speed, whereas it's pretty hard to miss a roundabout entirely. If you don't notice traffic that you're supposed to yield to (or vice versa), you've probably at least reduced speed somewhat.

(Via AgBlog.)


Tuesday, April 8, 2008

Alpacas are Awesome

While doing research for an upcoming trip to Peru (more details on that later), I discovered that alpacas are awesome. Check out the photo of an unshorn alpaca, grazing and the description of alpaca sounds, both courtesy of the also-awesome Wikipedia. I will not attempt to do the latter justice in an excerpt here, but let's just say that they purr, and they orgle. Usually not at the same time.


Monday, March 31, 2008

The All Ighty Ollar

Encyclopedias, human genomes... YAWN! The internet finally proves it's good for something, now that classic Mad Magazine fold-ins are online. (Via dad.)


National Geographblech

The Harvard Lampoon regularly does "parody" issues, where they spoof another magazine. The Boston Globe reports that their victims are in on the act, to the extent that "USA Today printed the Lampoon's version on its press in 1989."

The Globe article centers around the National Geographic spoof hitting newsstands tomorrow; the cover isn't on the Lampoon's site yet, but Folio (a publishing industry periodical) has it.


Tuesday, March 25, 2008

First, They Came for the Bees

First bees, and now bats. Dear faunæ: We're trying to stop killing you. Please stop dying. Sincerely, Us.


Monday, March 3, 2008

Hey, you got monkey in my cowboy!

This primary season has raised many important questions, but a post in the Times blog today raises the most important one yet — how have I been to Texas multiple times without seeing Whiplash, the Cowboy Monkey, a monkey who, dressed in a cowboy costume, rides a border collie?


Thursday, February 28, 2008

McCain a Panamanian Sleeper Agent?

John Noriega McCain is foreign-born! What if Panama considers him a citizen? His loyalties could be dangerously divided! How can we trust this man to not be a Panamanian sleeper agent? Look at him, proudly embracing the costume of his true homeland:

John McCain, in the costume of his native land

Maybe all of these zealots who are swayed by his fancy speeches and claims of patriotism are willing to elect this dangerous man to be our commander in chief, but I am not! Spread the word...


Friday, February 15, 2008

Delegates are Dele-great!

Some charts from the New York Times presenting data from the Democratic primary battle. I'm not sure what conclusions, if any, can be drawn from the first chart, which shows that out of the states which Bush won in 2004 that have held their primary contests already, Obama's gained 96 delegates net over Clinton, while in Kerry states, Clinton netted 15 — too many other variables correlate with "red" vs. "blue" statehood.

The other two are informative, though; they show that superdelegates not deciding this race is about as likely as Huckabee's "miracle", and that this race would be just as close if the primaries were winner-takes-all, either by state or by congressional district.

Wednesday, February 13, 2008

In a World Where Bail Costs $200...

As reported by Chad, Ridley Scott is making a movie based on
Monopoly
. Chad pooh-poohs the idea, but I see a few interesting directions this could take:

  • "What do you expect me to do, Race Car, mortgage Baltic Avenue?" "No, Mr. Thimble, I expect you to die."
  • "Pop quiz hot-shot: You've just rolled your second doubles. If you roll doubles again, the bus explodes. If you don't roll doubles, I kill every man, woman, and child in Marvin Gardens. What do you do? What do you do?!"
  • "Ye can take our hotels, but ye'll never take our FREEDOM!!"

Saturday, February 2, 2008

God Save the Queen

LanguageLog describes the havoc wreaked by journalists' inattentive use of spell-checkers. For instance, the following from a Reuters article:

With its highly evolved social structure of tens of thousands of worker bees commanded by Queen Elizabeth, the honey bee genome could also improve the search for genes linked to social behavior.

Friday, January 18, 2008

Wham-O Co-Founder Dies

Richard Knarr, the co-founder of Wham-O, died today. Wham-O was responsible for the Hula Hoop and the Superball, and for popularizing the Frisbee.

Their first marketing idea was a slingshot; they had been using one to hurl meat to their pet falcons to train them.

Saturday, January 5, 2008

Switching Finks

One of the open-source projects I contribute to is Fink, a package manager for OS X; if you've used apt-get or yum on Linux, it provides a similar facility, allowing you to install, say, GnuPG by running fink install gnupg. It installs things into its own directory tree, rooted at /sw by default, to avoid interfering with things shipped by Apple (/, /usr) or manually installed by the user (/usr/local.) That is, if you have Fink installed, your system will have /sw/bin, /sw/lib, /sw/etc, /sw/share/man, &c.

So that you can run things installed in these nonstandard locations, Fink provides some shell commands in /sw/bin/init.sh which edit environment variables like PATH and MANPATH to include the /sw/* directories. Most Fink users have . /sw/bin/init.sh in their ~/.profile, so these commands will be invoked when their shell starts.

Having my shell automatically pull in Fink at startup doesn't work for me, though. It's important to me to have a clean environment available. For instance, when I'm contributing to non-Fink open-source projects, trying to help someone who doesn't have Fink installed troubleshoot something, or submitting a bug report for a program that interacts with other programs where I have the Fink version installed, but Apple ships a different version with the system. (Note that this is only an issue if program A interacts with program B by invoking it as a standalone process without using an absolute path.)

Also, as a Fink developer, I actually have multiple Fink installations at different paths, and I only want one loaded at a time; I don't want to activate /Volumes/SandBox/fink/dev-sw in an environment where /Volumes/SandBox/fink/sw has already been pulled in!

It's much easier to pull Fink stuff in later when I need it than to undo the changes that /sw/bin/init.sh makes to my environment. My solution for making it easy to activate a particular Fink installation was to add the following to ~/.bashrc:

if [ -n "$SW" ]
    then export CFLAGS="-I$SW/include"
    export LDFLAGS="-L$SW/lib"
    export CXXFLAGS="$CFLAGS"
    export CPPFLAGS="$CXXFLAGS"
    export ACLOCAL_FLAGS="-I \"$SW/share/aclocal\""
    export PKG_CONFIG_PATH="$SW/lib/pkgconfig"
    export PS1="[$SW_DISPNAME \\W@$(hostname -s)]\\\$ "
    . "$SW/bin/init.sh"
    export PATH=~/bin:"$PATH"
fi

What this does is arranges it so that if I start a new shell with SW and SW_DISPNAME set, it'll pull in the Fink installation rooted at the directory $SW and put $SW_DISPNAME in my shell prompt so that I can see which environment I'm using. The extra environment variables before . $SW/bin/init.sh set things up so that if I compile things by hand, they'll find and link against Fink-installed libraries; the PATH setting at the end is because init.sh places the Fink bin directory at the front of the PATH, and I want my personal bin directory to come before it.

I run the following script (saved as ~/bin/finkinit) when I want to pull in Fink:

#!/bin/bash

FINK=${1:-main}

case "$FINK" in
    main)
        SW=/Volumes/SandBox/fink/sw
        SW_DISPNAME="fink"
        ;;
    dev)
        SW=/Volumes/SandBox/fink/dev-sw
        SW_DISPNAME="fink-dev"
        ;;
    *) echo "Unknown fink install '$FINK'" >&2 ; exit 1
esac

export SW SW_DISPNAME
exec /bin/bash

This gives me a subshell with Fink turned on, which I can exit out of when I want to return to a clean environment. If I run it as finkinit, I get my main Fink installation, or I can run finkinit dev to get an alternate Fink.

Tuesday, January 1, 2008

For All Your Finger-Pointing Needs

While working with a large codebase, I often want to find the origin of a particular line. Subversion offers a tool, annotate (aka blame, aka praise), which displays the author and revision for every line in a file, indicating who made the last change to a line. However, the last change is often not very useful; it was a minor change as a result of some other change you're not interested in, or the code was moved around due to refactoring, and you need to go back even further.

When I need to do this, I find myself doing a sequence of:

1. svn blame FILE | less; find the revision N where the line was last changed
2. svn log -rN FILE | less; if the change is interesting, read the commit log for the file
3. svn blame FILE@N-1 | less; using Subversion's little-known pinned revision syntax, find the previous time the line was changed
4. Using N-1 as the new N, return to step 2.

: Pretty much any Subversion command that takes a path argument can be given PATH@REVISION instead to use the version of the path at a particular revision. This is great for diff and cat as well as blame. I use it for working with deleted files and branches and diffing a branch against trunk.

I've put together a rough version of a tool to make this easier; it's at /trunk/blamegame in my repository, which is here for browsing with ViewVC, or it can be checked out with svn co http://zevils.com/svn/trunk/blamegame blamegame . It still needs some fine-tuning and documentation, but invoke it like blamegame FILE LINE (where FILE is a URL or the path to a file in a Subversion working copy) to start looking at a particular line of a file. You can navigate and search the file using a less-like interface. To drill down to the previous change to a line, hit r and then enter the line number. l, o, n, and m switch between viewing the commit log, the changed parts of the old file, the changed parts of the new file, and (the default) the diff. If you need to change the path you're looking at (for instance, to jump inside a branch), use the p command. h will show the available commands.

Let me know what you think.


Pretty Mushrooms

The Washington Post has a nifty gallery of mushroom photos by Taylor Lockwood.