Phil Dreizen

Star Trek 2009 - Spock the killer

...but Kirk says that in order to stop Nero they must go after him first. This culminates in an argument which ends in Spock ordering Kirk's removal from the bridge. When Kirk physically protests, Spock incapacitates Kirk and places him in an escape pod and jettisons him off the ship. Kirk awakens to find himself on the snow-covered world of Delta Vega, another planet in Vulcan's system. Picking up his gear, Kirk heads for the Starfleet station fourteen kilometers away.

memory alpha Star Trek_(film)

Of all my problems with Star Trek 2009 this is the one that bothers me the most. In many ways the movie works as a servicable action movie with some clever fan service for trek fans. But this here might break it for me.

It all happens so fast, you might not have had time to think about it as it happened. Spock has an argument with Kirk and instead of doing something as drastic as throw him in the brig (jail), instead launches Kirk out of the Enterprise onto a Hoth-like icy barren hellscape - one where Kirk can only survive through, as far as I can tell, sheer luck. Before the audience even has a chance to process Spock's villainous deed, one in which he essentially condemned Kirk to hypothermia and eventual death, Kirk must escape from 2 gigantic monsters that want to eat him (I assume).

I think the movie wants to sell the relationship between Kirk and Spock as being akin to two boys fighting in a school yard who later make up with each other and end up being chums. A coming of age story. What happens instead is that a person who supposedly follows a philosophy of peace leaves another person to freeze to death over a disagreement about what to do next with the Enterprise. How...logical?

So, Kirk escapes the monsters to find Nimoy-Spock living in a cave on the Hoth planet. The stretch of believability asked of the audience here, that Nimoy-Spock was just waiting in this particular cave, is difficult to fathom (of all the caves, in all of the planet, in all the galaxy, in all the timelines, he walks into mine?). The movie's fast pacing is designed, I think, so that the members of audience don't have time to think about it much. But I ask you: if you wrote this stuff, would you be embarrassed?

But far more egregious to me is that this scene between Pine-Kirk and Nimoy-Spock is meant to establish Pine-Kirk's friendship with Quinto-Spock. Which is terrible for at least 2 reasons. The first, as I keep mentioning, is that Quinto-Spock just abandoned Pine-Kirk to die. It's a nearly unforgivable act. You could end the movie here and make a sequel. One in which Kirk, after escaping from the barren wasteland that is Delta Vega, is consumed by his thirst for revenge, and seeks to destroy Spock (he tasks me and I shall have him!) We could call it "The Wrath of Kirk".

The second reason this scene is terrible is that it epitomizes the laziness of the movie. See, the movie doesn't have to do any work to build the friendship between Kirk and Spock. Instead the Nimoy-Spock tells the Pine-Kirk about the friendship that grows between the characters Kirk and Spock in the 6 movies and 2 television series the characters have appeared in previously. That's hours of story and character building that Star Trek 2009 can now skip. Pine-Kirk, and the audience members, need all they need to know, apparently. Spock and Kirk are supposed to be friends. That's all the relationship building the movie really does. After the meeting with Nimoy-Spock, Kirk is determined to be friends with Quinto-Spock. The guy who just left him to die on an ice planet. I guess Pine-Kirk thinks it's okay, because in an alternate reality some old guy just told him about, they're bff.

By the way: it is possible that Spock knew about the Starfleet base on Delta Vega and left Kirk on the planet knowing that Kirk could find his way to the base. I suppose then that he chose not to transport Kirk directly to the base with transporters...as a joke? I have to suppose that the human devouring monsters completely eluded the Enterprise sensors because...it's really cold down there?

</RANT>

XML and JSON are for TRANSPORT

I repeat: XML and JSON are for transporting data.

Just because you received data in XML or JSON form does not mean you need to continue examining, retrieving, and accessing that data in the format your program received it. You do not need to continuously parse your JSON and XML, you do not need to keep traversing your DOM object.

What you should do is work with XML and JSON (and whatever other format for transporting data) in your endpoints only. Take the XML/JSON you receive and turn it into data structures appropriate for you language. Turn it into primitives, into objects, into arrays and maps of primitives and objects. But DON'T KEEP IT AS XML OR JSON!!!

Code that isolates the transport format will be better for several reasons. The code that actually processes your data will be agnostic to whatever transportation formats that are available. If you later need your system to receive or transmit a new data format the code that does the actual processing will not need to be modified. Instead, the code at your endpoints will just need to be able to turn NEW_TRANSPORT_FORMAT into native data structures, and native data structures back into NEW_TRANSPORT_FORMAT. The code will also be easier to read. You won't find yourself in weird XML processing land, or constantly dealing with JSON parse exceptions land. You'll be in completely normal for your language land. This is especially true for XML, which can be especially painful to work with. But it's true for JSON too.

When it comes to the serialization and deserialization of data in binary formats, programmers don't make this mistake. No one would think to deserialize binary data multiple times for the sake of accessing their data. It's almost absurd. You deserialize your binary data once after receiving it, and serialize it once before transmitting it. But when it comes to marshalling and unmarshalling data in XML,JSON this mistake seems to happen often enough. (Never seen it happen with CSV data. Maybe it's TOO painful to work with?)

</RANT>