A. Jesse Jiryu Davis

Category: Uncategorized

The Chuang Tzu

I had a Zen and the Art of Motorcycle Maintenance moment today at the bike shop, watching the guy fix my tire. He hadn't worked on a Brompton before so he took apart the shifting assembly thoughtfully, then he pulled off the rear wheel and the [ ... ]

I had a Zen and the Art of Motorcycle Maintenance moment today at the bike shop, watching the guy fix my tire. He hadn't worked on a Brompton before so he took apart the shifting assembly thoughtfully, then he pulled off the rear wheel and the tire from it, and ran his hands all over the tire to see if the glass that had punctured it might still be hidden there. It reminded me of a passage from Robert Persig:

He sparks the torch, and sets a tiny little blue flame and then, it’s hard to describe, actually dances the torch and the rod in separate little rhythms over the thin sheet metal, the whole spot a uniform luminous orange-yellow, dropping the torch and filler rod down at the exact right moment and then removing them. No holes. You can hardly see the weld.

...which in turn reminded me, deliberately I'm sure, of the passage from Chuang Tzu:

Cook Ting was cutting up an ox for Lord Wen-hui. As every touch of his hand, every heave of his shoulder, every move of his feet, every thrust of his knee — zip! zoop! He slithered the knife along with a zing, and all was in perfect rhythm, as though he were performing the dance of the Mulberry Grove or keeping time to the Ching-shou music.

Faceless Killers

The fall games are out and New York City is plastered with promos, like for Halo 4: For Black Ops 2: Assassin's Creed 3: And this arresting poster for Borderlands 2: You surely see the same pattern I do: they're all faceless. (They're all men [ ... ]

The fall games are out and New York City is plastered with promos, like for Halo 4:

Halo 4 poster

For Black Ops 2:

Black Ops II Poster 2

Assassin's Creed 3:

Assassin's Creed III poster

And this arresting poster for Borderlands 2:

Borderlands 2 poster

You surely see the same pattern I do: they're all faceless. (They're all men holding weapons, too. I have nothing new to say about that, although the Borderlands poster is a novel variation.) To be clear, I think these are all gorgeous works of art, but I can't help noticing how strict the formula is. In fact, every image in the slideshow on gamespot.com, as far as I can see, is a masked man holding a gun. Why are they all faceless?

Years ago I got my mind blown reading Scott McCloud's Understanding Comics. He notes how comic books tend to place a sketchy, cartoonish protagonist in a richly specific landscape. Tin Tin's face is little more than an icon, although he wears period-appropriate knickers and dodges highly detailed German tanks. McCloud writes that when we look into the faces of others, we see them as specific, detailed objects, but our own faces seem more cartoonish to us:

Understanding Comics 036

It's a compelling argument. So I propose an interesting axis along which to place any work of art: are you intended to observe the protagonist, or identify with the protagonist? Flat-faced Tin Tin is clearly supposed to be us, like Calvin or Charlie Brown. Graphic novels more often render their characters in detail, like Bruce Wayne in The Dark Knight Returns or Morpheus in Sandman, but this is not a rule for graphic novels: Jimmy Corrigan is no more detailed than Calvin. I think we can look at the degree of detail with which an artist renders the protagonist, and use it as a clue, hinting at the degree to which we're intended either to observe or to identify.

(TVTropes has noticed this too, calling it the No Cartoon Fish Principle.)

My best argument for this is superhero comics. They have some of the most detailed drawings, and yet the heroes are usually masked: Spiderman, Batman, Ironman, and so on, all have their faces partly or completely hidden. (Women's faces in comics are less often covered than men's, presumably so we can identify with the men and observe the delectable women.) I'd argue that superhero's faces are covered because the joy of reading superhero comics is not in watching a character, but in inhabiting that character and exercising his might.

So this fall's game posters are canny. They don't show me a human face, as a movie poster does; they don't invite me to encounter a distinct person. Instead they cover the protagonist's face so that I can imagine his face is my own. They invite me to be incarnated in him, possess him, and explore his world.

Hurricane

CREDIT: NOAA/NASA/GSFC/SuomiNPP My girlfriend Jennifer and I survived. We live in Stuyvesant Town at 14th Street and Avenue B, a few blocks from the famous exploding Con Ed power station. Like most of Manhattan south of 40th Street, we [ ... ]

Hurricane sandy oct 25

CREDIT: NOAA/NASA/GSFC/SuomiNPP

My girlfriend Jennifer and I survived.

We live in Stuyvesant Town at 14th Street and Avenue B, a few blocks from the famous exploding Con Ed power station. Like most of Manhattan south of 40th Street, we lost power at 8:30 last night, but we at least had water (cold) for a few hours. We read by candlelight, blithely used the bathroom, and noticed that we were losing water pressure. I filled up every container we had as the water pressure dropped, until the last few drops came from the faucet and I heard the water draining back down the pipe. Saddest gurgling I ever heard.

This morning we had water again. We went out and found that the bodega across the street was very surprisingly open. Their staff were letting people in to its dark interior two at a time to pick the shelves and pay in cash. We walked north to 40th Street and there found a paradise: shops were open, the lights were on. We bought three bottles of wine at a liquor store.

At the Hallmark Store we found an unguarded power outlet in an upstairs corner and charged our phones. This required a longer tarry in a Hallmark store than I would otherwise have tolerated. After twenty or thirty minutes in a Hallmark store, one learns more about what bachelors' friends buy them for prenuptial parties than one would like to learn. A card that seems to show a woman's cleavage, but when you open it, it's actually a man's ass! Hilarious! In any case, Jennifer picked out some unscented candles and we walked home from the paradise north of 40th into The Unpowered Zone, where we The Unpowered live.

Sixth-floor apartments in New York don't actually have water without power, evidently. I don't know why we had water pressure that morning, but we didn't have it any more that afternoon. We'd walked up the stairs by flashlight all giddy. We have wine! Our phones are charged! Our giddiness died gurglingly when we tried the faucets.

We packed up and walked through the mild disaster of the Lower East Side. Jennifer remarked that our Autumn had come all at once: The fall leaves came down, and also the rest of the leaves, and also the trees. Almost all the stores were closed. A coffeeshop had a sign: "We're open! But out of coffee. We have milkshakes." We walked across the Williamsburg Bridge. Below, the FDR Drive was submerged. We walked into Williamsburg, which was untouched. It was a paradise, just like midtown Manhattan—cafés were serving cappuccinos, vintage clothing stores sold bowler hats, the modern-furniture store was open for business. A mile later we got to our friend Chris's warm, watered, powered apartment with FiOS, through which I'm posting this.

Mongo profiling hacks

Two interesting things about MongoDB. Primary thing: Mongo introduced a $comment option to queries in version 2.0.0. The comment shows up in the profiler log. Try this on the Mongo shell: > db.setProfilingLevel(2) > [ ... ]

Two interesting things about MongoDB.

Primary thing: Mongo introduced a $comment option to queries in version 2.0.0. The comment shows up in the profiler log. Try this on the Mongo shell:

> db.setProfilingLevel(2)
> db.my_collection.find()._addSpecial("$comment", 'my comment')
> db.setProfilingLevel(0)

The '$comment' value is stored in the profiling data, where it's easy to search for:

> db.system.profile.find({'query.$comment':'my comment'})
{
    "ns" : "test.my_collection",
    "query" : { "query" : { }, "$comment" : "my comment" },
    "millis" : 3,
    // lots of other info ...
}

You could use this to tag queries with any data you want. An obvious use is to store the file and line of the source code that made the call. In Python:

import pymongo, inspect

def find(collection, query):
    frame_info = inspect.stack()[1]
    comment = '%s:%s in %s' % (frame_info[1], frame_info[2], frame_info[3])
    return collection.find({ '$query': query, '$comment': comment })

def my_function():
    db = pymongo.Connection('localhost').db
    print list(find(db.foo, {}))

my_function()

Everywhere you call the function find() I defined above, Python will send to Mongo the filename, line number, and name of the function that made the call. (As long as Mongo's profiling level is set to 2.) You could query later for, say, the slowest call to find():

> db.system.profile.find({'query.$comment':{$exists:1}}).sort({millis:-1})[0]
{
    "ts" : ISODate("2011-11-18T22:45:21.938Z"),
    "op" : "query",
    "ns" : "www.foo",
    "query" : {
        "$comment" : "/Users/emptysquare/.virtualenvs/tmp/add_comment.py:16 in my_function",
        "$query" : {

        }
    },
    "nscanned" : 3,
    "nreturned" : 3,
    "responseLength" : 125,
    "millis" : 0,
    "client" : "127.0.0.1",
    "user" : ""
}

Neat, right?

Secondary thing: There might be a time when you want to simulate a very time-consuming Mongo query, but you don't have enough data to actually slow Mongo down. Add a busy loop to the query's $where clause:

> // This will pause 1 second per row
> db.my_collection.find({
$where:'function() {'+
       'var d = new Date((new Date()).getTime() + 1*1000);' +
       'while (d > (new Date())) { }; return true;}'
})

Of course, you can combine this busy-wait clause with any regular find() filter.