<M <Y
Y> M>

[Comments] (1) : This weblog has been silent because I was in India attending Sumana's father's funeral. I have some stuff to say about the people I met there, etc. but I'm going to think about it for a little while longer.

I want to briefly mention a weird thing I came home to. Although I don't use Twitter, I do occasionally search for people who link to my site in their Twitter feeds. Usually they're linking to Beautiful Soup. Today I saw a typical example:

Rubyist, pythonista or even php fan. We can all love http://bit.ly/7aRD8T amazing parser library #beautifulsoup

The atypical part was that this was from Paula Deen's Twitter feed. Paula Deen has a show on the Food Network, and I associate her with making food out of butter and hanging out with Jimmy Carter. I could see her tweeting about beautiful soup, but not Beautiful Soup.

I guess what happened is that, like many celebrities, Deen has a tech person who posts on her behalf, and the tech person forgot to sign out as Paula_Deen before posting to what they thought would be their own Twitter feed. The rogue tweet alarmed some people (example), and has been removed, but this follow-up that refers to Deen in the third person bolsters the "tech person" theory:

Paula hasn't gone techy, she's off today but getting ready to head to Alaska for a working vacation.

Paula Deen's tech person, I'm glad you like Beautiful Soup, and everyone makes embarrassing mistakes, so don't feel bad.

[Comments] (1) Purchase Order Equivalent: Before I left for India, someone emailed me with a random REST question. Yesterday, they re-sent the email with a kind of rude preface that implied I have some sort of SLA for answering peoples' random REST questions. Which I don't! I'm a private citizen who's free to answer a given email whenever I want, or even to never get around to it—the same right I allow the Internet pseudo-celebrities to whom I send email.

So I was kind of cheesed off at this person, but frankly the rudeness worked—I answered the question just to get them out of my hair. The question is, how do you make the creation of a new resource an idempotent operation? Imagine a factory resource that you POST to to create something new. Typically, if you send the same POST request twice, you'll get two new resources. How do you make it so that the first request creates a new resource and the second request fails?

The short answer is to use POST Once Exactly. I mention POE in the REST book, but POE never made it out of the Internet-Draft stage, and I can't even find the Internet-Draft at Mark Nottingham's site anymore. Besides which, the email message described something similar to POE as an option, but wanted something simpler. So here's something simpler, for some value of "simpler".

When you buy (eg.) computer hardware from NewEgg, they give you a space for a "purchase order" along with shipping address etc. This is for use when you're buying stuff in a commercial context. You can put whatever you want in that space. The purchase order is a key into your company's purchasing system. It's meaningless to NewEgg.

Newegg doesn't use the purchase order for anything, they just put it on the invoice for your convenience. But in theory, they could keep track of the purchase orders you've used. Since they know which orders are yours, when you place a new order the site can run a quick check to see if you've used that purchase order before. If you have, they can stop the purchase from going through, since you're probably trying to process the same purchase request twice.

So the simpler solution is. You're defining the media type or the form describing what the client is supposed to POST to the factory. Include a slot for a "purchase order". This is a random string chosen by the client whose only purpose is to uniquely identify a resource to be created. On the server side, reject a POST request that uses a purchase order already used by this client ("this client" distinguished from other clients by the authentication credentials). Now the POST request is idempotent: sending it 10 times is the same as sending it once.

I call this strategy "Purchase Order Equivalent", or POE. Thoughts?

[Comments] (4) Bully For Torosaurus: While I was gone there was an online flurry of interest about a paper in the Journal of Vertebrate Paleontology, "Torosaurus Marsh, 1891, is Triceratops Marsh, 1889 (Ceratopsidae: Chasmosaurinae): synonymy through ontogeny". The general tenor of this discussion is conveyed by this Daily Mail headline: "Triceratops 'never really existed but was just a young version of another dinosaur'". And the larger implication is conveyed by this guest post to Kottke, classifying Triceratops with Brontosaurus and Pluto as an instance of science cruely taking away a beloved childhood icon.

First off, the Daily Mail headline is inaccurate. (Shocking, I know.) It should be "Torosaurus 'never really existed but was just a mature version of another dinosaur'." Why? Look at the dates. The first Triceratops was discovered in 1899, and Torosaurus was discovered two years later. When two species turn out to be the same, the earlier name takes precedence; that's why Brontosaurus became Apatosaurus and not vice versa. The name of the paper is "Torosaurus is Triceratops", not "Triceratops is Torosaurus". So whatever happens, the name Triceratops stays.

But it is just a name. There's not some platonic form of Triceratops that can be taken away from you. Nothing changed about the universe. Pluto is still out there and these animals did exist. But we come up with abstractions like "planet" and "Triceratops" to help us manage the complexity of the universe, and abstractions are always leaky.

All three of the incidents in that Kottke guest post have this in common: you learned to give a name to something, and then the people responsible for names changed the name on you. Here's a 1989 New York Times editorial quoted by Steven Jay Gould in the title essay of Bully for Brontosaurus:

The Postal Service has taken heavy flak for mislabeling its new 25-cent dinosaur stamp, a drawing of a pair of dinosaurs captioned ''Brontosaurus.'' Furious purists point out that the ''brontosaurus'' is now properly called ''apatosaurus.'' They accuse the stamp's authors of fostering scientific illiteracy, and want the stamps recalled.

Apparently there was backlash against this, even though Brontosaurus was formally retired in 1903, so there's no reason except pop culture that anyone in 2010 (or even 1989) should even remember the name "brontosaurus". And people got really angry about the redefinition of "planet" to exclude Pluto. But if scientists made some discovery that shattered our preconceptions, like discovering that Triceratops was a carnivore or that Pluto is actually the size of Jupiter, no one would be angry. There'd be no one to be angry at.

People get angry when they see the social constructs of science being refactored to be simpler. It looks like the scientists are cheating, because the refactoring has no basis in physical reality. But the constructs themselves—"planet" and "species"—are just tools we came up with to make thinking easier. This is why two species can be discovered to be the same species, and why the name of the combined species is chosen according to arbitrary rules. The rules are all there are.

Incidentally, you know how the Apatosaurus/Brontosaurus thing happened? Well, in 1877 A.O. Marsh described Apatosaurus in a "typically rushed note" (Gould), and then two years later he described Brontosaurus. As I mentioned, the distinction lasted until 1903. Quoting Gould again:

When [Elmer] Riggs restudied Apatosaurus and Brontosaurus, he recognized them as two versions of the same creature, with Apatosaurus as a more juvenile specimen. No big deal; it happens all the time.

That's exactly what happened with Triceratops! A.O. Marsh really loves taking credit for discovering species. He describes some juvenile specimens as Species A, and two years later some more mature specimens as Species B. Still later, some other paleontologists restudy the specimens and call him on it. Same story both times. It's just that in the case of Apatosaurus it took about twenty years, and in the case of Triceratops it took a hundred and thirty.

At the Museum of the Rockies there's a line of Triceratops skulls from juvenile to adult. Jack Horner, one of the authors of this paper, is the paleontology curator at the MotR and probably worked on that exhibit. I wonder if there was some moment where Horner looked at that line of skulls and thought "Maybe that should keep going..."

[Comments] (1) : On the plane back to New York I watched The Good, The Bad, And The Ugly. It was listed in the in-flight entertainment system as "Good, The Bad, And The Ugly, The." They should have gone all the way and called it "Good, Bad, Ugly, The The And The."

: Hey there. I've been writing a whole lot, but it's all been work on Constellation Games. None for immediate consumption by you. It's a really strange feeling—now that I'm no longer worried that I'll flake out before reaching the end of the novel, I can really concentrate on flexing my dramaturgical powers, bending reality to my will for the sake of a smoother narrative.

It's a mixed bag. I like slipping in a new scene where there was no scene before—the secret history of the second draft!—and I really like fleshing out a sparse exposition-heavy scene into a full drama with characters and dialogue and jokes. But I really don't like when the thing I need to say next is scattered across three chapters throughout the book, three chapters that are ultimately pointless because they don't significantly advance the plot. Such that I have to come up with a brand new framework and then snip off bits from those three chapters to decorate my tree, discarding everything else.

But, once I finish this bit, the revision will be about one-quarter done. And once we get to the halfway mark, we'll see about finally making it possible for you to start reading this sucker...

Bonus link: REST Fest 2010. I don't think I'll be going, but it looks cool.

[Comments] (1) : Susanna told me about Contemporary Masters, a big installation piece at the Salt Lake Art Center that's a playable miniature golf course inside the gallery. Awesome! Here are pictures of Susanna, John, and the kids playing the courses.

Retro Spec Now Available: Retro Spec, the 20th-century-themed specfic anthology, is now available for purchase! (Amazon, B&N)

This anthology includes my short story "The Day Alan Turing Came Out", which Locus described as "A moving vision from a happier world." This is probably the only time anyone will ever describe my fiction that way, so act now.

[Comments] (4) Pac-Man vs. Fever: After Sumana bought the Wii for our household, breaking my long sojourn away from the world of closed-source video games, I did some catch-up work. I looked online to see which Gamecube games people had really liked, and bought a bunch of used games cheaply. My research was cursory, involving the application of simple heuristics like "are the words in this top-ten list spelled correctly?" and "is this not a one-on-one fighting game?"

Which is how I ended up buying Pac-Man vs. (heuristic: a Pac-Man game designed by Shigeru Miyamoto?!?!!) before learning about its draconian hardware requirements. It's best as a four-player game, so you need four controllers. But only three of those controllers are Gamecube controllers. The fourth controller is another computer: a Game Boy Advance connected to the Gamecube (or, in this case, the Wii) with a special cable.

So that's a) a Game Boy Advance, b) a special cable, c) three Gamecube controllers (I had one), d) three other people nerdy enough to put up with all this for the sake of a Pac-Man game.

OK, it's just a game, I'm out five dollars, no big deal. (The disc I got is actually the bonus pack-in bundled with Pac-Man World 2, a game so awful that its main purpose in life is to drive down prices of the bundle for people who want Pac-Man vs..) But then I met Pat Rafferty. One day Pat was browsing through my Gamecube games looking for stuff to borrow and never give back. When he saw Pac-Man vs. he mentioned that he had played it, and that it had been one of the greatest gaming experiences of his life. What's more, at his parents' house in upstate New York he had a Game Boy Advance and the connecting cable.

I treated allegations of these "parents" who had exactly the now-obsolete hardware necessary to play Pac-Man vs. with the kind of skepticism I usually reserve for supposed Canadian girlfriends (and the supposed American girlfriends of my Canadian friends). I mean, if Lake Ontario had formed a little to the south, upstate New York would be Canada. Why wouldn't Pat show me his birth certificate?

It didn't help when after Pat's next visit to his "parents' house" he conveniently "forgot" to bring back the goods. But, recently, he reported that he'd made another trip, and this time he had the hardware. Pat also owns two wireless Gamecube controllers to my one, so now it was just a matter of finding two other players.

After some false alarms, we finally got it set up yesterday, at the Manhattan apartment of Pat's friend Kevin. By this time Pac-Man vs. had acquired Lucky Wander Boy-like status in my mind due to the difficulty of even playing it. But unlike Lucky Wander Boy, Pac-Man vs. is a really well-designed game.

Here's how it works. The player with the Game Boy Advance plays Pac-Man on the Game Boy Advance. Looks just like regular Pac-Man, except instead of four ghosts (or whatever), there are three. The other three players look at the television and each controls one of the ghosts.

On the television, each ghost sees a rendered isometric view of their part of the maze. The person playing Pac-Man can see the whole maze, because that's how you play Pac-Man. The ghosts have to coordinate to trap Pac-Man and clobber him.

In an event with great implications for Pac-Man continuity, the ghost who's able to clobber Pac-Man becomes Pac-Man for the next round. Whoever made the kill gets off the couch and swaps places with the person who has the Game Boy Advance. Eventually one of the players plays a good enough game of Pac-Man to exceed some point threshold, and they are dubbed the winner. Then you immediately play another round because it's real fun.

Was it worth it? Well, I don't know whether it would have been worth buying all this gear, but it was definitely worth patience in waiting for everything to come together. Now, if I could only get Four Swords to work...

[Comments] (3) : There's this stanza in "Chattanooga Choo-Choo":

Leave the Pennsylvania Station 'bout a quarter to four
Read a magazine and then you're in Baltimore
Dinner at the diner, nothing could be finer
Than to have your ham and eggs in Carolina

This promised timeline has been bothering me ever since April, when I took a trip on this very route, Penn Station to 'Carolina'. A Harper's or something similarly dense might occupy you from New York to Baltimore, but your ham-and-egg dinner would take place in the middle of the night. But maybe there are two trips to the dining car, with ham and eggs being breakfast the next day? It is kind of an odd dinner.


[Main]

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