<M <Y
Y> M>

[Comments] (1) Star Trek vs. Batman: No need to dream, it's a filmed mashup of the 1960s Star Trek and the 1960s Batman. The Batman writing is pretty decent, but the Star Trek writing is bland and doesn't capture the feel of the series.

: Last week Sumana and I went to the launch party for N.K. Jemisin's epic "The Hundred Thousand Kingdoms". Nora founded the writing group I'm in, and I read and critiqued a draft of the novel just before she sold it. Then she left the writing group and went off to be a famous novelist.

I always have a difficult time at events held in bars, but Sumana is very good at introducing me to people. For instance, I met Saladin Ahmed, who along with Nora was nominated for a Nebula this year. And then comes this SF Signal interview with Saladin, Nora, and many other Nebula nominees. "If your work couldn't have been on the ballot this year, what work would you have liked in its place?" Saladin:

I'd also have been happy to see more two-fisted fun on the ballot. Two of the absolute best stories I read this year were "Zeppelin City" by Michael Swanwick and Eileen Gunn, and "Let Us Now Praise Awesome Dinosaurs" by Leonard Richardson. Both were ridiculously enjoyable and Nebula-worthy to my mind.

I'm encouraged!

Incomprehensible Joke:

S: "I always wondered what would happen if you put a disc in the Wii the wrong way."
L: "It shows a Koopa Troopa on its back."

Work humor:

"I will lock you and [x] in a room for a week to sort this out."
"We would spend that week planning vengeance on you for locking us in a room!"
"The scenario you put forward seems all too plausible."

[Comments] (1) : Tired of finding kitten? In Robot Wants Kitty, kitten is dangled just out of your reach for the whole game. And since there's a power-up early on that makes precision movement pretty much impossible, I never found kitten. On the plus side, hey, it's another robotfindskittenlike game.

[Comments] (2) It's All Fun And Games: Check out REDDER, the psychotropic game with the palindromic name. I'm a big fan of the strange effect that happens as you play, but I won't mention too much to avoid whatever passes for spoilers when it comes to strange gameplay effects.

"Frankly, I do not feel this hatred.": The Israeli fanzine Bli Panika (Don't Panic) has published an awesome Hebrew translation of Let Us Now Praise Awesome Dinosaurs by Ehud Maimon. Google Translate translates the title back into English as "Mention dinosaurs and glory", and Tark and Entippa's names are transliterated Tariq and Antipathy. Pretty fun!

Back when I first heard about this project, I mentioned to editor Rami Shal'heveth that the story's title is a riff on a phrase originally in Hebrew, but he probably already knew that. Actually, no: "Ben-Sira's book is one of those canonical texts that everybody knows of, but nobody reads."

[Comments] (2) The Long Joke: In 2001 my sister Susanna sent me the birthday card you see before you. It said "Whee! You're 3 22!" I thought this was hilarious, and I kept the card.

Then Susanna had a daughter, and I had an idea. Recently Maggie turned three, and I gave my niece the birthday card Susanna had sent me eight years earlier. "Whee! You're 3 22 3!" The payoff was worth it. "I laughed for like 5 minutes," said Susanna.

Recently I was doing a video chat with Susanna and I mentioned:

L: So I'm jogging for an hour every day, and I realized I wasn't doing enough reading, so I decided I also needed to read for half an hour every day. And I also want to devote half an hour to games, though that's not as much of a problem. And I think I should also allocate at least half an hour for writing. But if I keep dividing up my free time like this then my whole life will be...

S: Organized?

Hmm.

: Evan: "You really need to watch Summer School on the original rental VHS. It's like listening to the Beatles on LP."

: Speaking of Evan, he's started a new weblog, walltype, where he curates photos from Flickr that fit his own baroque categorizations. I think it has explodingdog-esque potential.

Speaking of new weblogs by my friends: Pat Rafferty's Raffertyesque. Now you have something to read while you look at Evan's curated pictures.

[Comments] (8) Alternate ETag Validation Functions: Yes, months after driving away everyone who read this weblog hoping I would talk about RESTful topics, here's some REST stuff. This is an idea I got from my co-worker Björn Tillenius. I hope someone else has come up with the same idea and given it a better name.

Here's the problem, on a high level of abstraction. Consider a representation (#1):

<p id="1">Forklift</p>
<p class="read-only" id="2">Green</p>

And let's say the ETag of this representation is the string "x".

According to the protocol governing this media type, you can modify the text in any paragraph unless its class is "read-only". So maybe you can PUT a document like this (#2):

<p id="1">Hovercraft</p>
<p class="read-only" id="2">Green</p>

Or PATCH a document like this (#3):

<p id="1">Hovercraft</p>

OK, that's easy. Now suppose that the read-only text changes randomly according to conditions on the server. Let's say the read-only text suddenly changes from "Green" to "Red". If I were to GET the document again, I'd get this document (#4):

<p id="1">Forklift</p>
<p class="read-only" id="2">Red</p>

And let's say the ETag of this document is "y". If I sent a conditional GET with an If-None-Match of "x", I'd get 200 and a new representation instead of 304 ("Not Modified").

OK, but I don't send a conditional GET. I don't get the document again at all. Instead, I PUT document #2, with an If-Match of "x", and the request fails with 412 ("Precondition Failed"). Maybe it should fail anyway; maybe the server is very strict and thinks I'm trying to change a read-only paragraph from "Red" to "Green", which would probably be 400 ("Bad Request"). But we don't even get to that point because the ETags don't match.

The request also fails with 412 if I PATCH document #3 with an If-Match of "x". But there's nothing really wrong with that request. The point of If-Match in conditional writes is to avoid conflicts with other clients, and there are no other clients here. The ETag is different because a read-only paragraph changed on the server side.

One obvious solution is to calculate the ETag only from the read-write portion of the document. This fixes conditional writes, but it breaks conditional reads. A client that requests document 1 and then makes conditional requests will never get document 4. The ETag is no longer a strong validator (update: actually, it's not any kind of validator); the document might change significantly without the ETag changing. So that's no good.

The solution Björn came up with is to split the ETag into two parts. The first part is derived from the read-only portions of the document, and the second part is derived from the read-write portions. The ETag is a totally opaque string to the client, but the server knows what it means. On a conditional read, the server checks the entire ETag. On a conditional write, the server only checks the second half.

In this example, the ETag for document #1 might be "1.a" and the ETag for document #4 might be "2.a". A conditional GET of document #4 with If-None-Match="1.a" would fail, but a conditional write with If-Match="1.a" would succeed. When the write went through, the document's ETag would change to "2.b", and "1.a" would not be good for either conditional reads or writes.

From the client's perspective everything just works: your conditional read returns 200 iff the representation has changed, and your conditional write returns 412 iff someone else is messing with the resource. But is this okay from a standards perspective? Section 13.3.3 of RFC 2616 says "The only function that the HTTP/1.1 protocol defines on [ETags] is comparison." That doesn't seem to prohibit me from defining another one.

If "x" is a strong validator then so is "1.a", but the new comparison function ignores some of its information about the resource state, effectively treating it as a weak validator (update: or as something that's not a validator at all). Is that okay? Would you believe the following definition of a strong validation function? "In order to be considered equal, the second halves of both validators MUST be identical in every way, and both MUST NOT be weak." (cf 13.3.3 again)

I'm interested in your thoughts on this. Smartass comments like "you should have two resources" will not be dismissed out-of-hand but also will probably not convince me. If you're curious, here's the real-life bug that spawned this thinking.

: More REST stuff, this time outsourced to Martin Fowler. In the embarassingly-titled "Richardson Maturity Model: steps toward the glory of REST", Fowler talks about the maturity model I set out at QCon in 2008, and shows examples of services at the different maturity levels.

[Comments] (1) Tiny Youtube Party: In honor of Bach's birthday, an animation showing how the Crab Canon works.

In honor of awesome things, a 17-minute infomercial for the Univac. (Univac!) They're especially proud of having invented the numeric keypad. Also check out the enormous machine that reads from magnetic tape and writes to punch card, and the equally enormous machine that reads punch cards and writes to magnetic tape.

Camping It Up: Going to try to go camping this spring/summer with Sumana, Beth, and Lucian. Since Sumana has never been camping I thought we might start off with something simple, like camping in Brooklyn. Floyd Bennett Field is an abandoned airport that got turned into a campground. You can camp out in the woods, and you can walk around on the tarmac until that gets boring (probably just a few minutes, honestly). It's like the post-apocalyptic future, but nicer!

I kind of envy Sumana's campingless youth. If this works out, 2010 will be the first year I go camping voluntarily. I always got dragged along with family or church or Cub Scouts.

[Comments] (2) End Of An Era: It used to be that movies would advertise using taglines that made puns on the phrase "kick some ass". A quick IMDB movie tagline search (possibly the coolest specialized search engine ever) reveals "It's time to kick some glass" (Glass House), "Kick some ice" (Blades of Glory), "Time to kick some asteroid" (Armageddon), "Kick some grass" (Shaolin Soccer), "Kick some Ash" (My Name Is Bruce), and "Kick some past" (Hot Tub Time Machine). The two taglines I specifically remembered ("Kick some shell" from a TMNT movie and "Kick some asphalt" from who knows what) turn out not to have been official taglines, but I'm pretty sure I've heard them used in advertising.

See, it's funny because you can't say "ass" on a movie poster. (Dishonorable mention to Slap Shot 3: The Junior League, whose tagline "Get ready for a rough-and-tumble comedy that knows how to kick some serious puck!" is a) as long as the movie itself and b) can only bring itself to make a pun on "butt".) But that fig leaf has fluttered away, because there's a movie coming out called Kick-Ass and they've got a huge subway-visible ad in Queens that doesn't have a tagline at all, just the name of the movie with its three-story "ass".

Now that the taboo has fallen, the only thing standing in the way of an epidemic of the word "ass" on movie posters is the fact that, formally speaking, a tagline has to be a joke, and "kick some ass" isn't a joke. I'm sure they'll figure out a way, though, and when that day comes I'll be waiting and vengeful. It's time to kick some "ass"!

Modern Life:

S: Yes!
L: What is it?!
S: Just navigating this phone tree.
L: Oh.
S: Agent!

: When I have one link to share, it goes on del.icio.us. When I have a lot of links, it goes into NYCB.

And I still have a bunch of stuff in my browser tabs.

[0] I don't usually link to Wikipedia to explain concepts, but the "Shanzhai" entry hasn't been buffed to the personality-free NPOV sheen typical of Wikipedia entries for things like "Forest" and "Giant (mythology)", and itself somehow seems like a good example of the shanzhai spirit, insofar as I understand it.

[Comments] (1) Micro Matzah: Sumana and I went to Beth's Passover Seder yesterday. More about the Seder later, but I wanted to mention this matzah thing. See, I was in charge of making the chicken soup, and I decided to make a lot of small matzah balls instead of ~1 huge matzah ball per person. Because when I get soup at a deli I hate having to carve off a bit of that matzah bolus with every spoonful of soup I eat.

I told Beth about this plan and she said that matzah balls are traditionally made small. You only find huge matzah balls in delis (we decided this was for ease of portioning). I didn't know this because I'd only had matzah ball soup from delis, and from my mother, who'd probably only had it from delis. My crankiness unwittingly led to the fulfillment of tradition. So take a tip from Beth and me: small matzah balls means better soup.

Also, the Hillel sandwich is surprisingly good for something that sounds like a theorem in topology.

<M <Y
Y> M>

[Main]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.