Friday, 7 July 2017

NullPointerException in Java when using null values in a switch statement

Fuck Java! Just fuck it! I have been trying for half an hour to understand why a NullPointerException is returned in a Java code that I can't debug. It was a simple String object that was null inside a switch statement. According to this link states that The prohibition against using null as a switch label prevents one from writing code that can never be executed. If the switch expression is of a reference type, that is, String or a boxed primitive type or an enum type, then a run-time error will occur if the expression evaluates to null at run time.

Friday, 30 June 2017

Central Station, by Lavie Tidhar

Book cover Central Station describes a very interesting cyberpunk style of future, where amazing yet commonplace technology mixes with the traditional and with the local culture in a world in which the Solar System has been colonized. And then the book ends. Lavie Tidhar manages to imagine all of this creative world, but doesn't succeed on making the book more than the collection of short stories it actually is. That doesn't mean the book is not worth reading or that other works from the author will not benefit from the world building in it, but it feels like a missed opportunity. The book is short, it describes interactions between a surprisingly small and somehow related people and then it just ends with none of the threads in it being resolved in any way. The main character remains as the background city of Central Station, former Tel Aviv.

The writing style is also a bit heavy. It is descriptive, a little pretentious, but it might have felt like that because I was reading in the subway or when going to sleep and I wasn't in the mood for intellectual work. Even so I believe that a lighter style with more attention to story development would have benefited this book.

Bottom line: I liked the story immediately and felt betrayed after it abandoned me right when I was intrigued enough to seek closure. It is worth a read and I hope Tidhar expands the world in other stories beyond the insular location of the book. I am also looking forward to reading other things from the same author.

Thursday, 29 June 2017

Blood Drive, the perfect combination of Mad Max and Wacky Races, via Z-Nation

Oh, SyFy does it again with a show that is wild, totally over the top and really really fun. Post-apocalypse, hot rod cars that use human blood for fuel, cannibals, wild sex, murder sprees, wild people, Colin Cunningham, corporate overlords, awakened psychotic robots, making fun of corporate overlords, ridiculously attractive people surrounded by ridiculously ugly people... Blood Drive is just too silly to care and too wild to not enjoy. I am watching the third episode already and I am laughing my ass off: "Praise synergy for it provides us with low hanging fruit!", you gotta love that.

Update: of course something truly fun can't last. Blood Drive has been cancelled after just one season.

Monday, 26 June 2017

Ninefox Gambit (The Machineries of Empire #1), by Yoon Ha Lee

book cover Finally, a fresh, unapologetically sci-fi story with so many interesting ideas and cultural innovation that I can barely wait for the second book in the series to come out.

Yoon Ha Lee creates this far into the future universe in which everything from social structure to space travel and military technology is run by rigid doctrine that uses a particular calendar. Certain battle formations, using certain weapons, doing specific things leads to "exotic effects", carefully manipulated through higher mathematics, that power society and military expansion. Of course, there are multiple possible calendaristical configurations, but they interfere with each other, so after choosing one, any deviation is considered heretical. Add to this an Asian view of hierarchy and politics and you get the most delicious book I've read in a long, long time.

Ninefox Gambit is, unfortunately, merely the beginning of the story. While one could consider the entire thing a standalone book that leaves the rest of the story to the imagination of the reader, the rich universe that it creates makes followups inevitable. In this case, I can barely wait for them. There isn't much else to say about the book other than urge you to read it. As with any good writing, the plot is simple, but the individual scenes give its flavor. It is an almost unspoilable story, since it doesn't rely much on twists, but on bringing value in every chapter, through rich characterization and original scenecraft.

Sunday, 25 June 2017

The Mist is now a TV series... a bad TV series

The Mist is a novella by Stephen King that has been adapted into a great horror movie. I mean, I rated the movie 10 out of 10 stars. So when the TV show The Mist came around I was ecstatic. And then... I watched three episodes of the most insipid and obnoxious series I've seen since Under The Dome. Nay, since Fear of the Walking Dead.

Imagine they removed most of the monsters and replaced them with mostly insects, then they enhanced everything else: small town politics, family matters, teenagers, etc. OK, the original Mist was great because it showed the greatest ugliness was not the interdimensional creatures, but the pettiness of humans. However, it was the right balance between the two. Now, in a TV show that censors words like "fuck", you get to see teenage angst, drug rape, power hungry egotistic policemen, one of the most beautiful actresses from Vikings relegated to the role of an overprotective mother, husband and wife interactions - lots of those, junkies, amnesiac soldiers, priests, goth kids, nature freaks, old people... oh, the humanity! Three episodes in which nothing happened other than exposition, introduction of lots of characters no one cares for and that's about it.

I am tired. I really am tired of hearing that price is driven by offer and demand - which is quite true because that's the definition of price, it has nothing to do with actual value. Same with stories: they are all about people, because people care about people and most people are people. No need for anything too exotic when all you need to do to please most people is to show them other most people. Grand from a marketing point of view, but quite pointless overall, I would say. But who's gonna listen to me, I am not most people after all.

Bottom line: lately there has been a lot of effort invested into TV. HBO and Netflix have led the way by caring about their productions enough to make them rival and even beat not only film productions, but also the original literary material. This has led me to hope against hope that The Mist will be the best horror TV show out there, one that would maybe last two or three seasons at most, but burn a bright light. Instead it is a dying fire that wasn't properly lit and is probably going to take two or three seasons just to properly die out without anyone noticing it is gone, yet managing to poison the legacy of the film forever.

Tuesday, 20 June 2017

Children of Earth and Sky, by Guy Gavriel Kay

book cover The only fantastical element in this book, except for a ghost that makes a short appearance, is a change in location. The rest is historical fiction in some place that feels exactly like Renaissance Europe, only it has another name and other gods. Worst than that, the story is boring and the writing mediocre. I couldn't finish it.

The story in Children of Earth and Sky follows a few chosen characters while they navigate the treacherous waters lying between warring (and spying) nations. I mean this both metaphorically and literally, since it is also about ships crossing the sea. Guy Gavriel Kay has been writing published works since 1984 which is why I was surprised to see such an amateurish writing style. He uses several tools again and again and again, without much effect. The worse, for me, was describing the same scene from different viewpoints, one after another, even if it did nothing to enrich the story or develop characters. Another is a certain repetition of a phrase for emphasis, something like "He didn't like the book. He didn't." OK, emphasized enough! Also I felt that the author coddled his characters too much. Instead of making them suffer in interesting situations, he just lets them off easy with crises that they can easily handle or at least manage with heroic skill. In one of the most important scenes, one of a battle, he kills off a major character, at which point I was thinking "OK, it's getting started", only to resurrect them immediately after. Ugh!

So beside being a boring historical drama (I mean boring even for a historical drama!), it really nagged me that it was marketed as fantasy. Maybe I am just getting fed up, considering I've just read a western and a heist story, both included in the fantasy and sci-fi genre because they happened in the future or in spaaaaaace. Bottom line: I can't in good conscience recommend this book and I am quite amazed that it has such a high rating.

Sunday, 18 June 2017

Realm of the Damned, an improbably entertaining animated motion comic

At first I thought Realm of the Damned would be boring. It was a series of comic book images animated via moving them around or deforming them, while a narrator was speaking on the background. The story also had the seeds that have been used so many times with little success: Van Helsing, vampires, werewolves and so on. But it was only one hour long, how bad could it be? And as the story progressed I really enjoyed the experience. And it wasn't because of the gory graphics or the strong voices or the heavy metal music as much as it was the story. Surprisingly deep, it explores not only a world that is dominated by undead monsters, but the inner turmoils of the last defender of humanity. The ending was gripping and terrible and funny at the same time.

I recommend it highly. Here is the trailer: