Monday, December 2, 2013
Star Trek plot holes that annoy me
Probably obvious, but spoilers follow the jump.
All of TNG: Riker is always and forevermore Picard's XO.
Commander William Thomas Riker was the executive officer (XO) on the USS Enterprise for seven series of TNG and four movies (in Star Trek time, from 2364 to 2379, 15 years). That's a long time, even in Star Trek lore. Various people mention how long he's held the position and that it's kind of weird. He'd been offered commands three times and turned them down each time. Was Picard's Enterprise really that amazing to serve on? The answer the show/movies give is "yes", but I've got a better answer.
He's an asshole who only Picard really tolerates.
Let's look at the times he is given command. When he's commanding the Enterprise against the Borg, he constantly clashing with his XO, Shelby, to the point of treating her like crap. He even shouts her down a few times. Not particularly captain-esque behavior, eh? What about when Captain Jellico is temporarily given command of the Enterprise? It took Riker all of 10 minutes to get him dismissed as XO.
When he's in command, do you ever see him confer with the senior staff? That is, aside from Best of Both Worlds, when it's already become clear he needs help.
It would have made so much more sense for Riker to have been a difficult-to-work-with asshole than for him to constantly refuse promotion like a 24-year-old hanging around his high school.
Star Trek: Generations: Crusher explains a joke to Data; Data pushes her into the water.
This is a really minor thing, and yet it bugs the crap out of me.
Star Trek XI: Alternate Universe Kirk opens fire on the mid-black-hole Nerada.
This is just dumb. The Romulan ship Nerada is caught in a black hole. Anyone who knows anything about black holes knows you cannot escape them, particularly if they form in the middle of your ship. Why waste a single torpedo? Further, why risk your ship? They almost get sucked into the black hole themselves.
I get that Kirk was a punk kid and Spock was too angry to think straight. But, you know, there were a few other officers on the bridge who could have piped up. It would have taken nothing away from the movie to have the Enterprise turn tail as soon as Nero turns down the offer of help.
Star Trek: Generations: Kirk dies on Veridian III after a fist fight with Dr. Soren.
This one is the worst. Captain James Tiberius Kirk, the man who thwarted General Chang's plot to incite war between the Federation and the Klingon Empire, the man who outdueled Khan in the Mutara Nebula, ends up dying on an essentially meaningless planet. Not only that, but Kirk left the Nexus, a place that literally gives you whatever you want. So he gives up a literal heaven because Picard decided that two is better than one in a fist fight.
Gah! What a disgraceful way for the writers to send off Kirk.
Here's what should have happened. If you recall, Picard had agreed to a prisoner exchange; himself for LaForge, as long as the Duras sisters sent Picard to the surface first. Once in the Nexus, Picard taps Kirk and brings them back to the moment Picard confronted Soren.
What a dumb move by Picard. He could have gone anywhere, at any time, and he chose to only go so far back as to have a two-on-one melee with Soren. He should have gone back to before the prisoner exchange with the Klingons (I assume he's not going to super-blatantly violate the temporal prime directive and go back WAY farther). He'd already agreed to the exchange, and so couldn't send a random old dude (it's highly unlikely the Duras sisters would recognize, let alone accept who Kirk was). So Picard would have Kirk go back to the bridge with his legendary combat experience to aid Riker and crew fight the Klingons. Picard would do what he could to stall Soren while Kirk and Riker attempted to gain the upper hand against the Klingons.
Picard would have instructed Riker to work with Kirk, but it would become clear once the Klingons fired that Kirk was the better tactician, and Riker would cede command. The same pitched battle would ensue, with the Klingons firing through the Enterprise's shields. However, instead of exploiting some weird cloaking shenanigan to force the Klingons to cloak, Kirk would come up with some badass maneuver to give the Enterprise the upper hand.
However, mid-battle, something would happen that would force most of the bridge crew to evacuate (and let's say data was already off the bridge for whatever reason). But Kirk would stay, leading the ship to victory, and give his life in the process.
There are plenty of problems with Generations, but Kirk's death is by far the worst.
Tuesday, November 26, 2013
A Long Post for a Simple Rule
Ryan: so say I have three lists of (different) objects in a helper class to deserialize JSON toAs I mentioned in my post on the XY problem, I needed to get more into the details about the problem:
Ryan: then these objects get saved to a database
Ryan: in the current version of our platform, all three of these lists will be populated, but in the previous version only two lists get populated
Ryan: would it be better to create a new helper object just for the backwards-compatible API call? or use a variety of if statements to check whether that one list is null or not and update the DB accordingly?
Ed: ummAt this point, I was pretty sure what it was he was trying to do. He was rewriting a service with a new API, but it had to be backwards compatible. But we were still talking about a problem one level removed from the important issue at play: changing the API.
Ed: depends?
Ed: you're adding a new list to this object?
Ed: or was it always there, but is sometimes filled?
Ryan: basically JSON data from a HTTP request is automatically deserialized into an object, and depending on API version a client will either send 2 or 3 arrays of objects
Ryan: would you create two different objects to deserialize to or use one object and just check whether one of the lists has been populated
Ed: is the api changing? is the client changing?This is a sneaky issue. One might think that changing an API to send additional data back is not really a breaking change. I mean, if they're still getting X and Y, who cares if they get Z as well?
Ryan: the API is changing, but the client may not change
Ed: So the question you have is, On the backend of the API, do you create separate classes to represent data for APIv1 and APIv2?
Ryan: right
Ed: what does APIv1 send
Ed: right now
Ed: 2 arrays or 3
Ryan: v1 sends 2, v2 sends 3
You should care! You can't predict how someone else will use your API. Maybe they'll write some terrible code that would throw exceptions if there are three arrays returned. Even if the consumers of your API are your coworkers, you have to expect that your consumers will rely on every single thing your API does.
And so, I began to dissuade Ryan of his folly:
Ed: so if you use the same object, you'd change APIv1?
Ryan: no, v2 only extends on v1, doesn't change it
Ed: but v1 sends 2 arrays now. if you make it send 3 arrays, you are changing v1
Ryan: I'm deserializing to the same object via two different controllers in two different namespaces
Ed: doesn't matter. Don't change v1
Ed: and changing the return value, even if it means adding an always-empty array, is changing the API
Like I said, this one's sneaky. We as programmers tend to think about how we would use our own code. But an API, even if only available to a limited set of people, is a public interface, and people will do dumb things with it.
Conclusion:
Ed: a good rule of thumb is Never change the API
Ryan: yeah I guess I would be changing it, wouldn't I
Ryan: damn
Ed: yes
Ed: that concludes today's lesson
Thursday, November 21, 2013
Two Cents is Too Much: Ender's Game
* And if you haven't read the book, go read it. Now. It's the only book I've bought multiple copies of solely to loan out to people to read. All of my copies are out at the moment, so you'll have to ask someone else.
I wish I got the Federal Network with my cable package. |
* Posnanski** took the name "Plus-Minus" straight from the Fielding Bible, which makes sense, as he writes a sports blog. I prefer to call it the "Hype-O-Tron".
** Whenever you see an asterisk followed by an italicized comment on this blog, it's a Posterisk, and I totally stole it from him. The guy is brilliant, if not for his sports writing, then for his writing style in general.
The other axis is quality vs. enjoyment. Sometimes we really enjoy terrible things. Other times, we look at world class works of art and say, "Eh, I'd rather clip my toenails" (I'm looking at you, Citizen Kane). For example, Starship Troopers is not a quality movie*. The acting is sub par, parts of the plot make no sense, and the execution of all the actors (save NPH) it pitiful. Yet I can watch that movie anytime. It's definitely a comfort movie for me.
* If you get a chance, read the book. It's so much better than the movie in terms of quality, yet it's still eminently enjoyable.
Two axes, you say? Sounds like a job for a graph!
No one ever accused me of being good at graphics. |
Now, on to Ender's Game (after the jump, you know, to hide them spoilers).
Thursday, October 17, 2013
Upcoming Blog Posts
- Media Swap
- Nation of Criminals
- Star Trek Plot Holes That Annoy Me
- Sneaky API changes
- Positions on X
- Student Loans and You
- My Withdrawal from Caffeine
- Quantifying Customer Service
- Games and Narrative
- Books, Media, and Loss
Wednesday, October 2, 2013
Funeral Arrangements
The wake will be at Vander Plaat Funeral Home on Thursday, October 3rd, from 2-4PM and 7-9PM.
We'll be holding an open house/celebration at my folks' house on Saturday, October 5th, from 3-7PM.
Dad didn't believe in big church services for funerals; he just wanted people to have a good time.
Here's his obituary, if you're interested.
Tuesday, October 1, 2013
All Good Things...
Thank you all for your wonderful words and support.
I'll be sure to post here when the funeral arrangements are set.
Monday, September 30, 2013
Death Smiles at Us All. All a Man Can Do is Smile Back
How we deal with death is at least as important as how we deal with life, wouldn't you say?
Monday, September 23, 2013
Lighting the Batsignal
public class EditSort_ItemAdded { public void OnItemAdded(object sender, EventArgs args) { if (args == null) return; var item = Event.ExtractParameter(args, 0) as Item; if (item == null) return; SetSortOrder(item); } protected void SetSortOrder(Item newItem) { var parent = newItem.Parent; var children = parent.Children.ToList(); int minSort = Convert.ToInt32(children.Min(c => c.Appearance.Sortorder)); using (new Sitecore.SecurityModel.SecurityDisabler()) { newItem.Editing.BeginEdit(); newItem.Appearance.Sortorder = minSort - 10; newItem.Editing.AcceptChanges(false, true); } } }
Sunday, September 22, 2013
After All, Number One, We're Only Mortal
I wanted to share this publicly because I know that I've been acting different lately, and people have begun to notice. Dad wanted to keep this quiet because that's the kind of guy he is. But I think at this point, it's worth letting everyone know.
Before anyone asks, I can say there's not much that anyone can do to help out. If you're near my folks, I'm sure they'd appreciate a visit. Other than that, please keep dad in your thoughts and (if you're religious) prayers.
Thank you to everyone who has been helping us out already; the level of support we've received has been wonderful.
Dad's been an incredible father to us all; we love you and will miss you, old man.
Tuesday, September 3, 2013
Star Trek's Best Non-Captains
I've got every crew position listed here, as well as some other non-positions that exist in most of the shows. I'll be looking at the five main shows that got significant airtime (so I'm not including the Animated Series or Final Frontier), as well as the movies: Star Trek: The Original Series (TOS), Star Trek: The Next Generation (TNG), Star Trek: Deep Space Nine (DS9), Star Trek: Voyager (VOY), Star Trek: Enterprise (ENT). It's worth noting that TOS and TNG have an unfair advantage, having by far the most screen time.
N.B. Sometimes I had to make assumptions as to who was in charge of a particular position. In these cases, I italicized the character's name to make it clear they are not a clear choice.
XO: Spock, Riker, Kira, Chakotay, T'Pol
Is there any contest?
There is an old Vulcan proverb: Only Nixon could go to China. |
I'd give Kira the nod for second place. She makes an excellent counterpoint to Sisko's emotional wrangling and firm commitment to the principles of the Federation.
Science Officer: Spock, Data, Jadzia Dax, Kim, T'Pol
Believing oneself to be perfect is often the sign of a delusional mind. |
Chief Engineer: Scott, La Forge, O'Brien, Torres, Tucker
I love Geordi. Love him to death. I love LeVar Burton too. I mean, look at this tweet:
Amazing, right? The problem is, La Forge is a fairly one-dimensional character. I blame the writers for this. There are only a few times when he gets an actual story for himself. He has the Brahms storyline, the bit with his mother, and a few other notable story moments (his eyes on the Ba'Ku planet). Interestingly enough, one of his best episodes is where he teams up with our winner, Scotty.
I'd like to get my hands on her "ample nacelles," if you pardon the engineering parlance. |
RIP, James Doohan. |
This was a tough one, but not because they are all great. Really, they all are pretty meh. They all have their perks. McCoy is a great ornery bastard and has the classic line: "Dammit Jim, I'm a doctor, not a ____
In the end, the doctor that I'd most want treating me is the EMH.
Please state the nature of the medical emergency. |
Tactical/Weapons: Checkov, Worf/Yar, Kira/O'Brien/Worf, Tuvok, Reid
If you were any other man, I would kill you where you stand! |
Helm: Sulu, LaForge/Ro/Crusher/Redshirt, N/A, Paris, Mayweather
OH MY |
The only Starfleet officer to go topless (beside, you know, the dozens of times Kirk loses his shirt) |
Security Officer: ??, Worf/Yar, Odo, Tuvok, Reid
Only one of these people has the sole responsibility of security, and he's our winner.
Doctor, if a Klingon were to kill me, I'd expect an entire opera on the subject. |
Counselor: McCoy, Troi, Ezri Dax, Neelix, ??
I grew up with Counselor Troi, but she seemed more useful to the ship with her empathic abilities than with her actual counseling. One of these made a very important contribution to their crew in the counseling field...
As they say on Talax: "Omara s'alas - Good news has no clothes." |
Communications Officer: Uhura, Sato
I guess Starfleet's universal translator tech improved such that communications officers were no longer necessary by the time of TNG. Makes sense; the universal translator was improved to the point where a dedicated communications officer was no longer required. I'm throwing a curveball here:
Math is just another language. |
You're speaking with Empress Sato. Prepare to receive instructions. |
OK, real dregs here, but this category must be addressed. As much as I love Wil Wheaton...
But I'll always remember it as something more - as the place I learned that the line between courage and cowardice is a lot thinner than most people believe. |
Comic Relief: Checkov, Barclay, Quark/Rom, Neelix, Trip/Phlox
This is a real tough one. Really tough. I was all set on my choice before I spoke to my friend/best-trekkie-bro Joe, and he almost convinced me to change. Almost.
Doctor! My capillaries are shrinking! |
Non-Spock What-Does-It-Mean-To-Be-Human Character: Data, Odo, Seven of Nine/EMH, T'Pol
It seems that every series after the original had a character who struggled with humanity. The struggle was more prominent in a few of these characters, but in the end, it was always Data.
0.68 seconds, sir. For an android, that is nearly an eternity.* |
* Of all the images I got for this post, this one was by far the hardest to source. Normally, between Google Images and Memory Alpha, I had no problem getting the picture I wanted. However, I was only able to find two versions of this shot; one that was badly distorted, and one that had anti-hotlink text pasted all over it. In the end, I had to get out my DVD (it was still in the shrink wrap; I hope it wasn't valuable) and take my own screencap. Though, as I type this, I just realized I get the movie for free through Amazon Prime. Oh well.
Non-Kirk/Picard Captain: Sisko, Janeway, Archer
Hey, the other captains need some love, too! These three all have great traits. Sisko embodies the moral philosophy of DS9 (more Kantian than the others) by being willing to do the dirty work to get the right outcome. Janeway is the exact opposite; she never betrays her moral compass on the way back to the Alpha Quadrant (though she does lose it when dealing with the Equinox). And, though he gets a lot of flak, I have to give Archer credit for being a truly dynamic character. He starts off as this starry-eyed captain, thinking about how great the world is. Then the Xindi come and bust down humanity's door, and he transforms into a badass dude willing to do anything to save earth.
There's coffee in that nebula. |
Sex symbol: Uhura, Troi, Mirror Dimension Kira, Seven of Nine, T'Pol
You know I had to go here, right? Well, here it is. Who's the best sex symbol on all of Star Trek? Well...
One or both? |
Tuesday, August 27, 2013
Testing, Testing, Can You Hear Me Now?
My mother gave me her old Kindle Fire (first generation) a few months back, and I've been trying to find new ways to use it. I removed the default OS and installed Cyanogenmod (as it was the only mod I had any experience with). First, I just used it as a sort of phone extension; I'd read my RSS and reddit on it on the train. Then I started reading comics on it (Komik is a great app for that). But I got to thinking: shouldn't I be able to do more with a tablet?
So I looked into getting a keyboard case for it. Turns out, this became a far more complicated affair than I originally thought (I may detail this process in a future post). However, after much pain and suffering and swearing, I finally got a keyboard case working!
And, as you may have suspected, this post was authored entirely on the tablet. I hope that this will help me blog more, as I should be able to write stuff while on the train.
Monday, May 20, 2013
The XY Problem and the Five Whys
What is it?
The XY problem is asking about your attempted solution rather than your actual problem.
That is, you are trying to solve problem X, and you think solution Y would work, but instead of asking about X when you run into trouble, you ask about Y.
The ProblemIt comes up a lot, and it's something you should try to recognize both in yourself and in others. I recently encountered it with a coworker of mine:
This can lead to frustration by people who are trying to help you solve the problem because by the time you ask about it, the solution that you need help with might not have any obvious connections to the problem that you are trying to solve.
Coworker: Have you used the HtmlAgilityPack?I was perplexed at this point. HTMLAgilityPack is an assembly included by default in Sitecore installations. In fact, Sitecore itself relies upon it and will not work without it. So I probed a little deeper:
Ed: a little
Coworker: I can't get it to work.
Ed: what part of it
Coworker: Sitecore apparently has it included?
Ed: it does
Coworker: But I can't reference it.
Ed: the project should already include a reference to it
Ed: ok
Ed: so, when you reference it with the using statement, its just not available?
Coworker: Oh.
Coworker: It looks like the sample code I got needs a later version?
Ed: do you need the latest HTML agility pack?
Coworker: Probably.
Coworker: At least, the one included doesn't have methods I need.
Ed: what are you trying to do
Coworker: So, I'm trying to take a substring of content, to display in a "Featured Pages" section.
Coworker: But if there are any tags that open in the substring, but close after, the formatting breaks.
This whole exchange reminded me of the Five Whys:
To reach this sweet spot, we borrowed an idea from Sakichi Toyoda, the founder of Toyota. He calls it Five Whys. When something goes wrong, you ask why, again and again, until you ferret out the root cause. Then you fix the root cause, not the symptoms.
- I can't get the HTMLAgilityPack to work.
- Why? It won't compile.
- Why? The compiler says the methods I need from sample code I found aren't there.
- Why? The sample code was using a different version of the HTMLAgilityPack.
- Why? I don't know, man, ask the author of the sample code!
- Why? I can't read the man's mind! I don't even know him!
- I can't get the HTMLAgilityPack to work.
- Why? It won't compile.
- Why? The compiler says the methods I need from sample code I found aren't there.
- Why? The sample code was using a different version of the HTMLAgilityPack.
- How do we fix this? Let's upgrade the version of the HTMLAgilityPack.
- How would that solve the problem? It would give me the methods I need to solve my problem.
- Are the methods all you need? Well, yes...
- Is there another way to get the methods? We could disassemble the newer version of the HTMLAgilityPack and monkey-patch in the methods we need
- Profit!
Wednesday, January 16, 2013
Potpourri
I spent about two hours shoveling snow the other day. My neighbors all have snow blowers, but I kind of prefer to do it myself. Part of it is definitely machismo crap; I'm the youngest father on the block, so I can be all "Look at me, the young strong man." But I think the greater part is the serenity I get while shoveling. The task is sufficiently mundane that my brain can wander freely. It's like when I used to drive places with my family when I was a kid, I would love to just stare out the window and just look. Sometimes my mind would wander to the point where I was totally dazed out; I'd snap back to reality and wonder what I was thinking about. I don't really have those moments anymore, but shoveling snow gets me close to them.
The big three games (for me) that came out at the end of last year (Call of Duty: Black Ops 2, Halo 4, and Assassins Creed 3) so far have been a mixed bag. BO2 is good, H4 was mediocre, and I've barely played AC3. I've probably played more FTL than all of them combined.