Wednesday, October 18, 2017

Monday, October 16, 2017

The False Admiral (Evagardian #1), by Sean Danker

Book cover Imagine a space pulp "escape from a room" story and you get The False Admiral (also known as simply Admiral). Sean Danker writes a short and fast paced story about three Evagardian space navy members that find themselves on a derelict ship on an unknown alien planet. From start to end the hero of the story, helped by the other younger three, must solve problem after problem in order to keep them alive. It's a short, fun and simple book.

At first I was convinced that this was not the beginning of the story. The main character mentions previous events that are not described in the book and he makes efforts to hide his real identity from the others, to the point where they have to choose between trusting him or arresting him as an enemy spy. But no, that part of the story is not written yet. A second book in the Admiral series has been released, called simply Free Space, but I will probably not read it. And this is not because I did not enjoy Admiral, but because I have other stories I would rather read.

Bottom line: when you need a quick disconnecting read, try this book. It's dubious sci-fi and it is rather more similar to detective noir than space opera or military stories, but it is fun.

Friday, October 13, 2017

Memory alignment in C++ and C# and probably in every other language that can integrate with C++

I've learned something new today. It all starts with an innocuous question: Given the following struct, tell me what is its size:
public struct MyStruct
    {
        public int i1;
        public char c1;
        public long l1;
        public char c2;
        public short s1;
        public char c3;
    }
Let's assume that this is in 32bit C++ or C#.

The first answer is 4+1+8+1+2+1 = 17. Nope! It's 24.

Well, it is called memory alignment and it has to do with the way CPUs work. They have memory registers of fixed size, various caches with different sizes and speeds, etc. Basically, when you ask for a 4 byte int, it needs to be "aligned" so that you get 4 bytes from the correct position into a single register. Otherwise the CPU needs to take two registers (let's say 1 byte in one and 3 bytes in another) then mask and shift both and add them into another register. That is unbelievably expensive at that level.

So, why 24? i1 is an int, it needs to be aligned on positions that are multiple of 4 bytes. 0 qualifies, so it takes 4 bytes. Then there is a char. Chars are one byte, can be put anywhere, so the size becomes 5 bytes. However, a long is 8 bytes, so it needs to be on a position that is a multiple of 8. That is why we add 3 bytes as padding, then we add the long in. Now the size is 16. One more char → 17. Shorts are 2 bytes, so we add one more padding byte to get to 18, then the short is added. The size is 20. And in the end you get the last char in, getting to 21. But now, the struct needs to be aligned with itself, meaning with the largest primitive used inside it, in our case the long with 8 bytes. That is why we add 3 more bytes so that the struct has a size that is a multiple of 8.

Can we do something about it? What if I want to spend speed on memory or disk space? We can use directives such as StructLayout. It receives a LayoutKind - which defaults to Sequential, but can also be Auto or Explicit - and a numeric Pack parameter. Auto rearranges the order of the members of the class, so it takes the least amount of space. However, this has some side effects, like getting errors when you want to use Marshal.SizeOf. With Explicit, each field needs to be adorned with a FieldOffset attribute to determine the exact position in memory; that also means you can use several fields on the same position, like in:
[StructLayout(LayoutKind.Explicit)]
    public struct MyStruct
    {
        [FieldOffset(0)]
        public int i1;
        [FieldOffset(4)]
        public int i2;
        [FieldOffset(0)]
        public long l1;
    }
The Pack parameter tells the system on how to align the fields. 0 is the default, but 1 will make the size of the first struct above to actually be 17.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct MyStruct
    {
        public int i1;
        public char c1;
        public long l1;
        public char c2;
        public short s1;
        public char c3;
    }
Other values can be 2,4,8,16,32,64 or 128. You can test on how the performance is affected by this, as an exercise.

More information here: Advanced c# programming 6: Everything about memory allocation in .NET

Thursday, October 12, 2017

Hex, by Thomas Olde Heuvelt

book cover Hex has a very King-like feel. The quintessential American little town, the close knit community, the apparent order and control, the breaking of chaos and the reveal of the true face of humanity. And yet, the inspiration for the story came from Roald Dahl's The Witches and it was originally about a little Dutch town. However Thomas Olde Heuvelt saw an opportunity while reviewing the English translation of the book and updated it for an American audience.

The premise is interesting enough. Imagine a modern town that is also haunted by the 350 year old witch that cursed it. People have molded their lives around the witch, using the Internet and technology to monitor her and hide her from the world outside their little town. And when something goes wrong, it goes very wrong. However, I loved that the end was not the typical American horror story, in which the baddie does unspeakable things and the heroes suffer and maybe prevail after grievous losses. It's difficult to talk about it without spoiling the ending, so you will have to read the book and remember me when Katherine displays shock.

Now, I can't say I loved the book. It is well written and the characters are compelling enough. However, it did feel like someone was excited to write a story in the American way, and that is exactly what I did not expect from the author. I mean, I've read The Boy Who Cast No Shadow and that was both powerful and fresh. Hex is not very long, though, and easy to read. Perhaps its best feature is also its worst: it is predictable. You read it and it's like those supposedly funny fail videos where you know something is going to happen, you can even guess what it is going to be, but you are still watching to see it unfold. If you like Stephen King, you will like this book.

Friday, October 06, 2017

Counterfeit Sky - Failure

As an experiment, try to find this video without knowing the name of the song or of the band. I tried so hard until my brain just gave up and remember the name of the band. So here is the video, so I can always find it when I need it. Cool song and video, I think.



And so that other people can find it: it's a music video about an astronaut crash landing on an alien planet and finding his own dead bodies and more versions of himself continuously falling and dying in different ways.

Obsidian and Blood, by Aliette de Bodard

book covers for the three bookds Obsidian and Blood is a collection of all the works in the Aztec magical universe created by Aliette de Bodard. It contains the three books Servant of the Underworld, Harbinger of the Storm and Master of the House of Darts, plus three short stories (which perhaps you should read first). The stories can be found online, if you want a free taste.

Now, while I enjoyed the books, I felt a little cheated. In fact, these are not fantasy books as much as policiers, just set in the tiny and magical Aztec world. Acatl, priest of the Dead, is trying to solve the mystery of various murders and magical transgressions. He is driven, moral and relentless, willing to sacrifice everything in order to save his friends, loved ones and ultimately the world. So it's basically a cop book, only with Aztec gods around.

The writing style is very technical, reminding me of so many other authors that learned the craft in writing classes, with a mentor and a group and so on. However, it was in no way innovative. I felt that the books are the written equivalent of TV movies: professional, but mediocre. And while I stuck through all the books instead of stopping with the first, it's kind of like watching the rest of a miniseries just because you watched the first episode.

The context is the only thing that elevates the book above average. It is an interesting setup to base the stories on Aztec mythology, but I felt that modern sensibilities prevailed and the author chickened out when it came to child sacrifices and ritual torture and so on. They are mentioned, but everybody, whether heroic or villainous, is rational and follows a modern way of thinking.

Bottom line: I wish these were filled with the horror and majesty of the old blood gods, making me feel something visceral and true, more like the short stories and less than the books. As such, these are just police mystery stories set in the Mexica empire.

Monday, October 02, 2017

Debugging in Eclipse

For anyone coming from the welcoming arms of Visual Studio 2015 and higher, Eclipse feels like an abomination. However, knowing some nice tips and tricks helps a lot. I want to give a shout out to this article: Again! – 10 Tips on Java Debugging with Eclipse which is much more detailed that what I am going to write here and from where I got inspired.

Three things I thought most important, though, and this is what I am going to highlight:
  1. Show Logical Structure - who would have known that a little setting on top of the Expressions view would have been that important? Remember when you cursed how Maps are shown in the Eclipse debugger? With Show Logical Structures you can actually see items, keys and values!
  2. The Display View - just go to Window → Show View → Display and you get something that functions a bit like the Immediate Window in Visual Studio. In other words, just write your code there and execute it in the program's context. For a very useful example: write new java.util.Scanner(request.getEntity().getContent()).useDelimiter("\\A").next() in the Display window, select it, then click on Display Result of Evaluated Selected Text, and it will add to the Display window the string of the content of a HttpPost request.
  3. Watchpoints - you can set breakpoints that go into debug mode when a variable is accessed or changed!

For details and extra info, read the codecentric article I mentioned above.

Friday, September 29, 2017

Star Trek Discovery vs The Orville

Discovery vs The Orville Hungry Trekkies, not nourished enough by the latest Star Trek movies, have been treated with not one, but two Star Trek series this fall. One is Star Trek: Discovery, the other is The Orville.

You may be incredulous at first, considering you are likely to not have heard of The Orville at all and, if you did, you thought it was a Star Trek parody. But no. Four episodes into the series it's pretty clear that this is a serious sci-fi opera, with some comedy added for spice. What about the new Star Trek series? Well, it's set before The Original Series, it has the visuals closer to the Abramsverse Star Trek (but without the flares, thank you very much), it has redesigned Klingons and a pretty impressive first two episodes.

It is too early to discuss the plot of Discovery yet as the premise hasn't even been revealed in its entirety. As of yet I can only tell you that I hate the main character. A human female raised by the Vulcans behaves in a way that makes one believe her education was acquired only from Vulcans in Pon Farr. CBS went all in and made the show available on their own CBS All Access network and hired actors like Michelle Yeoh to play in the pilot.

Yet Orville, with clearly less money and with TV actors and comedians managed to do better. The episodes are separate, like in a traditional Star Trek series, rather than a long serialized story. The plot of each episode is related to social or moral issues, like in traditional Star Trek series. People are positive and talking about themselves and their feelings, like traditional Star Trek series. There is comedy, but it is not part of the scaffolding of the stories. It's just a funny crew in a Star Trek clone that's as close as it gets. And if we are at the subject of celebrity actors, episode four has freaking Liam Neeson in a few scenes.

Conclusion: it may go either way, but right now The Orville seems to have done what I thought people would do: renounce the CBS/Paramount property and their money grabbing schemes, but keep faith with Gene Roddenberry's vision. Because that is the soul of Star Trek, not the money thrown by corporations to turn it into an all action and explosions piece of crap. Still, I have hope for Discovery as well. Only time will tell.

P.S. Now if they would only do Andromeda right...

Thursday, September 21, 2017

Blood of Elves (Saga o Wiedźminie #3), by Andrzej Sapkowski

book cover While Blood of Elves is the third work in Andrzej Sapkowski's Witcher series, it is the first actual book, the rest being collections of short stories. The style is the same, the characters the same. What changes is the scope of the story, the size of the described universe.

Is that a good thing? I can't say. While I applaud Sapkowski's attention to historical detail and the way the names are written or spelled in human or elven languages, the action still feels like I'm watching one of those Polish TV plays for children. A lot of dialogue, some exposition, no end to the moralizing stories about the environment and how politicians suck. So I am undecided whether this is a better way of treating The Witcher. However, I can say that the first book in the saga is nothing more than a chapter in a large story. A lot of set up, a lot of discussions, a lot of "almost there, but not quite" and then the book ends when you were starting to wonder what is going to happen. That makes the book incredibly disappointing as a stand alone story and, as I don't intend to read more of the Witcher, kind of a waste of time.

It is similar to one of those Hollywood movies that get split into two parts and it is never a good idea to watch the first part, then wait for a year to see the continuation. While I could read it really fast and there was nothing complex in it other than the political and geographical details, the story is almost nonexistent. I didn't like that at all. To add insult to misery, the book is about Ciri, the princess/witcher/witch, and very little about Geralt who appears mostly in memories and does very little in the story.

Bottom line: unless you are committed to read the entire Witcher series, don't bother reading this volume. It's not that it is badly written, it's that it does nothing but setting up the next books. It is an oversized chapter of a larger story and cannot be entertaining as a stand alone.

Sunday, September 17, 2017

Lilith's Brood (Xenogenesis), by Octavia E. Butler

book cover This book is NOT about vampires. For a long time I avoided reading it because the title so suggested some steamy vampire young adult crap. But no! The book is a hard sci-fi book about the end of humanity, written in a style that I can hardly imagine any man would be able to adopt. And that's a good thing.

Lilith's Brood is in fact a collection of three works (Dawn, Adulthood Rites, and Imago) by late writer Octavia E. Butler. That is why it is so damn long. Since she died, there won't be any more books in the series, so the "Xenogenesis #1-3" label is a bit misleading, just the name of an out of print collection that gathered the three stories together.

The story is about a species of aliens who decide to save the human race after a global war that had doomed it to extinction. The aliens are very interesting, but even more interesting is how the author surfs the edge of defining them as good or evil. Some of the things they do are benevolent and generous, others are, by human standards, insidious and evil. Imagine a benevolent Zerg species coming to Earth. Or a biological Borg with good intentions. Or an intelligent virus that rationalizes its actions as for the better good. It is difficult to keep reading as it pretty much describes the salvation of the human race as a centuries long rape and corruption process by a species that is much more advanced than us, but in very important ways, more animal than humans are. And we are almost helpless. Imagine you are a pet of omnipotent new-age vegans. It's something like that.

I was saying that only a woman could have written about it in this way because the focus is on survival and procreation, on protecting and avoiding death, on how the body feels rather than the mind. I do think that males were presented as either violent mindless rapey idiots or sensitive pacifist weak side characters. The arrogance of the aliens also has a strong vibe of "mama knows best", which explains why males were reduced to enraged murderous states. I mean, that's always the result of that "educational method". But the book is good enough to make you ignore that.

The bottom line is that this is a great book, one that is incredibly detailed and focused on characters, rather than technology or some story arch that has to end at some defined point. It made me think of so many things. I've once had this fantasy of writing a book about people being treated as pets. This is as close as I've read so far. Lilith's Brood made me reconsider the way I raise my dog! It also made me think of the nature of individuality, its benefits and perils, or the definition of humanity. Can you still be human when stripped of all dignity? As I said, while very very good, it is not easy to read. I was sometimes putting the book down and fantasizing on things I would have done if I were some character in the book.

Worth a read, that's for sure.

Saturday, September 16, 2017

100% CPU usage when using The Pirate Bay site

You may have noticed that when using the Pirate Bay site, your CPU usage goes up all to the top. That is because the web site is silently using CoinHive, a distributed cryptographic currency miner that uses the processing power of web users. The easiest solution for me was to go to %windir%/System32/drivers/etc/hosts and add the line
1.1.1.1 coin-hive.com
This tells your computer that the coin-hive server is in an unreachable place. You could add URLs with coin-hive in your URL filter or ad blocker software instead.

Now, CoinHive is not a bad thing. (Using it silently is. I wonder if they do this for mobiles as well, destroying their battery life.) In fact, the idea is pretty interesting and I've considered it before in a different context. I may still use it. You are browsing a web site and there are no ads on it or you have a mighty good ad blocker. How is that site to sustain itself? It does so by using some of your processing power. Before the advent of cryptocurrency, there was not way of efficiently monetize CPU power. People have tried, with projects like SETI@Home, but it was always a not very granular process. It only worked for processes that could be split into tiny pieces that were still relevant.

So there you have it, an interesting idea, used in a nefarious way :) Or, if you want to support the site, leave it on. You will make them money.

Question for programmers [Regular Expressions 2]

As with all the programmer questions, I will update the post with the answer after people comment on this. Today's question is:

Friday, September 15, 2017

Question for programmers [Regular Expressions]

Here is a question for programmers. I will wait for your comments before answering.

Tuesday, September 05, 2017

The Last Wish (Saga o Wiedźminie #1), by Andrzej Sapkowski

The Last Wish is not what I expected. I liked the Witcher games reasonably well, but I liked the character in the stories of the games more than the one in this book. Andrzej Sapkowski creates this character who is trained by pain, knowledge, poison and discipline to become the ultimate monster killer. However, the result is a very ordinary person, one who is better at fighting and resisting various magic or chemical attacks, but still a regular dude. He has friends, he falls in love and has moral qualms, he gets defeated and knocked out.

The book is actually a collection of short stories with Geralt the witcher as the main character. Some are reimaginings of classical folk tales, but all of them are about real versus perceived monsters. Is something huge with dagger like teeth a monster to be killed or is there a cursed person inside. Is a normal human less monstrous just because he looks normal, or is he a cruel and vicious villain? In all stories there is a lot of dialog, with characters that are not clearly developed talking a lot about what is going on. I didn't like that. It felt like reading plays.

But even so, I would have said that the book is OK. Like someone trying to write a fairy tale of their own. Why not? But there was this expectation from the games that the witcher was a womanizer that decides who lives and who dies based on his own strange code and lives on the edge by the strength of his skill. In fact, in the books he is the most decent hero I've read about in a while. He is one of the last of a dying breed, like samurai or American native warriors, not because of the monsters that kill them off, but because of humans spreading everywhere and expecting everyone to live by their code of conduct. If he would kill all the monsters in the world, he would be the very next to be destroyed by the people who no longer need him and have always hated him. Let me tell you that it is hard to reconcile my expectations with the book character.

Bottom line: an OK book. Certainly not great in any respect. I recommend you read it before researching the character or playing the games. I think that the book makes the games more interesting, by adding a backdrop story, but the games make the story hard to enjoy... because they are simply better.

Saturday, September 02, 2017

We Eat Our Own, by Kea Wilson

book cover We Eat Our Own is a reimagining of the making of an infamous movie called Cannibal Holocaust. It was an exploitation movie, featuring all kind of violence, from rape to murder and cannibalism, but also one that strives for maximum realism. In her book, Kea Wilson is portraying a world of emotional dog-eat-dog, with the movie and even the reality around the film set becoming part of a cannibal act where people use and consume and corrupt others.

I can't say I enjoyed the book too much. It is very well written and it makes the reader get visceral feelings about the people and the events inside, however I couldn't make myself care about any of it. In striving for realism herself, Wilson managed to make all her characters human, flawed, real, and almost impossible to empathize with. You understand some of them, you even see yourself think or act the same, but none of it is something you would want to see yourself do. Also, while a lot of the people in the book are caught in an abuse cycle, none of them is actually stuck there. They can leave at any time. Perhaps this is the most intriguing and interesting point of the story: even the most horrible things that we do to each other require some form of consent from the victims, some form of submission, without which the abuse would never happen or at least, not last too long.

In conclusion, I am sure there are a lot of people that will enjoy the hell out of this book. People oriented, feeling focused people, perhaps. I had difficulty making myself finish it, even fully conscious that the writing was very good. But this is my review, so I will not grade this above average. Probably it is a good idea to watch Cannibal Holocaust first, even if the movie is only an inspiration for the book.

Tuesday, August 29, 2017

Careful with case sensitivity in html files. (especially in Firefox extensions)

After my disappointment with the Firefox for Android lack of proper bookmarks API implementation, I was at least happy that my Bookmark Explorer extension works well with Firefox for desktop. That quickly turned cold when I got a one star review because the extension did not work. And the user was right, it didn't! One of the variables declared in one of the Javascript files was not found. But that only happened in the published version, not the unpacked one on my computer.

Basically the scenario was this:
  1. Load unpacked (from my computer) extension
  2. Test it
  3. Works great
  4. Make it a Zip file and publish it
  5. Shame! Shame! Shame!

Long story short, I was loading the Javascript file like this: <script src="ApiWrapper.js"></script> when the name of the file was apiWrapper.js (note the lowercase A). My computer file system is Windows, couldn't care less about filename casing, while the virtual Zip filesystem probably isn't like that, at least in Firefox's implementation. Note that this error only affected Firefox and not Chrome or (as far as I know - because it has been 2 months since I've submitted the extension and I got no reply other than "awaiting moderation") Opera.

Sunday, August 27, 2017

Infomocracy (Centenal Cycle #1), by Malka Ann Older

book cover Malka Older is a writer, humanitarian worker, and PhD candidate at the Centre de Sociologie des Organisations (Sciences Po) studying governance and disasters. Named Senior Fellow for Technology and Risk at the Carnegie Council for Ethics in International Affairs for 2015, she has more than eight years of experience in humanitarian aid and development, and has responded to complex emergencies and natural disasters in Sri Lanka, Uganda, Darfur, Indonesia, Japan, and Mali. (quoted from the About the Author section) And if your interests are not exactly aligned with the author's, you will probably not like this book.

Infomocracy describes a near future in which countries have dissolved their borders and instead opted for a system of centenals, groups of 100000 people who vote for the system they want instead of having it shoved down their throats based on where they were born. A decent idea that deserves some thought. However, the entire story, action and drama of the book is about the voting process. It's like a cyberpunk novel written by a voting system enthusiast with an obsessive disorder, thus feeling both boring and out of touch. It was literally hard work finishing the story, trying to understand why I should care about the stuff happening there or about any of the characters.

Even taking into consideration that it is the first book Older wrote and that it is supposed to start a cycle (damn it, people, write something for its own sake, not for endless series and trilogies and sagas!), the book is still a failure, because it doesn't really explore the way microdemocracy works, instead focusing on a bunch of electoral agents and some of the underhanded methods to sabotage the system. The players are not clearly defined, the characters are shallow and so it is almost impossible to care about any part of the book. You want a good sci-fi book about microdemocracy, try Daemon, by Daniel Suarez.

Saturday, August 19, 2017

Throne of the Crescent Moon (The Crescent Moon Kingdoms #1), by Saladin Ahmed

book cover Throne of the Crescent Moon is basically a young adult novel, even if the main character is a fat old "ghul hunter" rather than his young apprentice. Its freshness comes from the elements of Arabic folklore used as the basis of the fantastic elements. For me reading the book was an interesting experience, as in my head the plot was blending with the stories of One Thousand and One Nights and the animation of Disney's Aladdin. I felt that Saladin Ahmed wrote some delicious characters, even if a bit shallow, and that the story didn't lose points because of its simplicity, rather the opposite. The result is an easy to finish book with Middle Eastern mythology themes in a classic good versus evil story.

The book this reminded me most of was The Spook's Apprentice, but with a different mythology and a different character focus. Just like that series, this can be considered a book for children, but having elements that are appealing to adults as well. To me the most pleasing aspect was the different culture presented, although it wasn't something very new to me. I was raised on stories of spoiled khalifs and evil viziers, young and noble rogues and beautiful girls and mysterious magics, after all. And probably a large element of why I enjoyed the story was this connection to my childhood.

While I can't say it was some sort of masterpiece, this was an entertaining book for me. If you are looking for a relaxing read, try this one.

Wednesday, August 16, 2017

The Vagrant (The Vagrant #1), by Peter Newman

book cover I read the book before I knew it was part of a trilogy, but of course it is. I would have personally preferred to have the first book as standalone, particularly since it had an almost open ending. It would have made it clear that the story isn't that important as the character. But hell, there is no mystery anymore, even in fantasy.

The Vagrant feels like a mix between Shogun Assassin and Samurai Jack, as it features a sword bearing silent type - well, he's a mute - walking with a baby through a desolate, part feudal part futuristic landscape, while demon essence is threatening to corrupt the world.

Peter Newman even uses a style of writing that often discards definite articles. A sword slashes, a man falls, a demon howls, stuff that happens, inevitably, randomly, viciously. I liked that the main character strives to survive, but he is not indomitable. He gets doublecrossed, wounded, almost killed. He doesn't win every battle and when he does, it is difficult every time. Luck saves him several times and some people he wants to save cannot be saved. Towards the end this tendency falters and he becomes a little bit too knighty for my taste. Abstract and stubborn principles start to rule him, he starts fights that he need not fight, jeopardizing his mission. However, that ends up playing a big part in the last part of the story, setting up the next books, I guess.

The demons are interesting, too. Creatures of corrupted flesh and demonic essence, they are just trying to survive in a world alien to them, while ruled by instincts alien to us. I liked that they were not boring empty clichés of evil and were almost sympathetic. I've long dreamt of a story that tells the story from a demon's perspective, hunted by religious jerks who want to destroy it and the dark magicians that conjured it who want to control it. I mean, wouldn't you be pissed off? This book is very close to that perspective.

Funny enough, I thought the scenes with the baby and the goat were really well done, as the author describes their internal mental processes with gusto and humor, without them being pointless comic relief scenes. Newman seemed to understand how children and animals navigate the world.

In conclusion, I liked the book. I would probably continue to read the series if not for having other books that I want to sample. It is stylistically interesting and the characters are well constructed, while leaving the main story a bit in the background. I liked that. At least at this time I enjoy reading character centric books more than the ones that focus on plot and ignore the people involved in it.

KB4019099 or KB4032542 Error 0x80070643 with SQL Server 2014

TLDR version:

0x80070643 is probably thrown when you don't have the right software version, in other words, the update is not for you. Sometimes you need to upgrade your software in order for it to apply. To fix the problem with SQL Server, try installing the SQL Server 2014 Service Pack 2 if you are still at SP1.

Now for the full version:

I thought the way Windows updates is a good thing. It keeps the computer up to date, regardless of how annoying it is to stop your work in order to perform updates. The problem, though, appears when having to perform an update that fails. Windows Update will nag at you again and again and again that you have updates. You don't have the option to ignore an update (unless you download a specific tool) so you are forced to solve any problem with the update. This is still a good thing, even if annoying. And if regular people that don't know how to solve issues like that are angered enough, it will also motivate Microsoft to test their updates better. Win, win. Unless it happens to you!

Anyway, this blog post is about KB4019099 or KB4032542 - Cumulative Update 13 for SQL Server 2014 SP1 which failed with a vague error code Error 0x80070643, which is met in several situations when trying to install stuff. In order to get to the bottom of the problem, I manually downloaded the installer for the update and tried again.

This time the error was clearer: TITLE: SQL Server Setup failure.
------------------------------

SQL Server Setup has encountered the following error:

The cached MSI file 'C:\WINDOWS\Installer\1bfcbd.msi' is missing.
Its original file is 'sql_engine_core_inst.msi' and it was installed for product 'SQL Server 2014 Database Engine Services' from 'F:\x64\setup\sql_engine_core_inst_msi\', version '12.1.4100.1', language 'ENU'.
To resolve this problem, recover the missing file from the installation media and start setup again.
For more information about how to resolve this problem, see 'Steps to restore the missing Windows Installer cache files' (http://go.microsoft.com/fwlink/?LinkId=144387) in the Microsoft Knowledge Base.

Error code 0x84B20002.

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&EvtType=0xD66F84B3%25400xF762992B%25401202%25402


Amazingly enough, the link that is supposed to solve the problem actually solves the problem. First of all the go.microsoft.com link causes too many redirects for Chrome, so you have to open it in some other browser. Once you do that, you reach this link: How to restore the missing Windows Installer cache files and resolve problems that occur during a SQL Server update and at the end you get a VBS script that seems to repair missing C:\Windows\Installer files from the original installation source.

The first thing the page says is to try setup.exe /ACTION=REPAIR /INDICATEPROGRESS=TRUE from the original installation source for SQL Server 2014, which of course you don't have anymore. But even if you do have it and you run the command, it fails near the end with a funny error: "C:\WINDOWS\Installer\1bfa87.msi" So the only possible solution is to run the VBS script. After that, the update install actually started.

... and failed with another error: The upgrade cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade.
Error code: 1642
. Why are you asking me to upgrade something if I don't even have the version you need?! I've tried the setup repair option, just to see if anything else changed since running FindSQLInstalls.vbs, but I got the same error.

Under the assumption that the "original installation source" is actually not enough - since there was a Service Pack 2 released since I've installed SQL Server from a kit, I've downloaded the SP2 file. Maybe it has a repair option. Ran it, and it ran successfully. Could it be that I never upgraded my SQL Server instance? Yes. Then all those "different version" messages actually make some sense.

Once I did that, Windows Update presented me with different updates altogether! Note that the original update said "SQL Server 2014 SP1" when executed.

Some of the updates installed OK, some failed, mainly Security Update for Microsoft Visual Studio 2010 Service Pack 1 (KB2645410) and Update for Microsoft Visual Studio 2010 Service Pack 1 (KB2635973). These are updates from 2012 and are related to the standalone VS version used by SQL Server Management Studio. I tried a restart, the updates remained there to annoy me. They both failed with error code 0x80070643 and when tried to install them manually they both reported the wrong software version.

Perhaps it is from all the meddling. Installing SP2 would have probably solved all the problems.

I hope it takes you less time to figure this out, once you've read this article.

Update: How to solve the issue of obsolete Visual Studio 2010 updates:

I've downloaded the Microsoft Fixit tool for forceful uninstall of software, even if the installer is not cached in C:\Windows\Installer. Then I uninstalled "Microsoft Visual Studio 2010 ENU". At this moment SQL Server 2014 Management Studio would not work anymore due to a missing component. Then I reinstalled Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package. At this moment SQL Server 2014 worked again. Then I ran Windows Update, which found several updates to download, including a Service Pack 1 and several others. Their installation went with only a hitch, a random 0x80246007 (BITS service) error that went away when I retried the update. I started Microsoft SQL Server 2014 Management Studio, just to be sure it worked, and it did. Finally.

Thus endeth the saga of the reluctant Windows Updates.

Thursday, August 10, 2017

The Fireman, by Joe Hill

book cover The Fireman has a lot going for it: world ending global pandemic, superpowers, people finding strategies in order to survive, communities giving into the mob mentality, heroes fighting evil, etc. Joe Hill writes well and the story captivated me from start to end.

That being said, there are some issues with the book. The story is about a global infection with a fungus that makes people burst into flames, but narrowly focuses on a few characters in a small American town. Yet the story abounds in details for every scene: what everybody does, what they think, how the scene changes. Also, while there are some explanations of why things happen the way they do, close scrutiny destroys any logical explanation, so less material would have helped suspension of disbelief. I feel like a little editing that would have removed 10-20% of the book would have benefited it greatly, fixing some issues with pacing. There were times when I just had to skip paragraphs, as in moments of tension the author insisted of describing all kinds of inconsequential things.

Also, at the end of some chapters, there were little phrases where the character would disclose the outcome of the next chapter. I did not appreciate that. Imagine a scene where a character is hopeful and, instead of hoping with them and then being devastated by the story, you just go through the scene knowing how it is going to end. Don't do that, Joe!

It was interesting that the main protagonist (who is not a fireman, BTW, that was a silly title) is a woman. Her character, abused, manipulated and lied to by people in authority in her life, is almost feminist in nature. Other secondary characters are also female or children, with the writing focusing on human relationships. If I didn't know better, I would have said the book was written by a woman. I can only commend Joe Hill for being so good at describing the world and the people from the eyes of this character.

Other than that, the story was really fresh. I don't want to spoil anything here, enough to say that it made my emotions alternate wildly between excitement, fear, disgust and frustration. While optimistic in nature, The Fireman describes so many ways in which people just give in to their inner selfishness and evil. The themes touched by the story vary, but gravitate around one central idea of human relationships: a couples, as communities and what happens when these seemingly good things are contaminated with fear. These are themes one is used to find in Stephen King books and, surprise!, Joe Hill is actually King's son. He is trying his best not to advertise this, though, and I think he is a good writer on his own.

The characters are very human, well created, frustrating in their mistakes, just like normal people are. The author made the lead characters a bit too clean, always taking the high road, always being spared of the tough soul scarring choices by their environment or the people around them. I thought that was a weak point in the book. Without being forced to make hard choices, characters have no reasons to evolve.

Anyway, my recommendation is to read this book. It is scifi and fantasy and clinical dissection of humanity. It is well written, even if a little too long for its story.

Almost two years ago, Variety was reporting that the book was being developed by Fox into a movie, yet there is no other information more recent about this.

Wednesday, August 09, 2017

Diversity, not divergent (yes, the Google thing)

I wasn't going to discuss this, but I am being assaulted from all sides by people who have on opinion or another on the Google "Anti diversity manifesto", how the media likes to call it, spread at Google by an employee and his subsequent firing right afterwards. So I will say a few words, but not about the content of the document, only on the reaction to it.

Let's be honest here, what happened was that someone criticized the way things are at Google and then he got fired. He did it in a whitepaper-like document in which he exposed his opinions on what he perceived as problems and possible solutions. I believe his biggest mistake was not substantiate his opinions with previous research, thus dispelling some of his beliefs and strengthening others as fact, but that's beside the point. You can read the document, as well as the response from the Google's new Vice President of Diversity, Integrity & Governance, whatever that means.

James Damore, the employee who wrote the memo, was fired for violating the company's code of conduct by "perpetuating harmful gender stereotypes". What I want to focus on is that the response of Google was based on the fact that they couldn't possibly assign people to work with this guy, once he said something that was controversial, potentially offensive. By logical extension, no one can express something controversial in the company. Would you like to work there? They see it as something positive. The legalese for that is Part of building an open, inclusive environment means fostering a culture in which those with alternative views, including different political views, feel safe sharing their opinions. But that discourse needs to work alongside the principles of equal employment found in our Code of Conduct, policies, and anti-discrimination laws. What started as an open discussion, ended abruptly by termination, the employment equivalent of a death sentence for dissension. A personal equivalent would be "if you think like that, then we can't be friends anymore".

While the decision makes sense in the short run, in the long run it only hurts Google, both on a mediatic level and a financial one. However right or wrong, the author of the paper wanted to solve something he saw as problems in the company. I would want that type of person to be part of my company. And if the problems he sees are artificial, I would like to think I would try to convince him of that before firing him. Of course, Google doesn't have to do anything, because what they did is legal, but I am not talking about anything legal here. I am talking about companies having to take care about all their employees, not only the ones they like.

Personally, I wouldn't like to work in a place where I would need to guard my every word, hide my opinions and my thoughts, for fear of crossing some general line or code of conduct. I wouldn't like to work in a place that couldn't care less about me as a person. And if I were to work in such a place (ahem!) then I would create a narrative that would protect my fragile psyche, something like "they would never do that!". Well, Google did it! In a very public and bland and careless way. This will only give strength to the other narrative, the one of the former employees, released from their very strict NDAs, who complain about the same things Damore was fired for trying to solve in the first place.

Now, don't you miss the times when Microsoft was the bad guy?

Sunday, August 06, 2017

Tuesday, August 01, 2017

The Regional Office Is Under Attack!, by Manuel Gonzales

Book cover There is a rule in writing, that if you are trying to tell the story from the viewpoint of another character than the main one, for example the villain, and it is boring, then your story is not good enough. It seems to me that this was the cardinal rule that Manuel Gonzales used to write The Regional Office Is Under Attack!. He wrote tiny interlaced chapters that alternately were describing the action, then the motivations and personalities of the characters through flashbacks. At first it felt fresh, then it just got annoying. There is only so much you want to hear internal monologues.

It would have been great if the story would have been better, or if the characters would have really been fleshed out. However, this book feels more like an exercise in writing, a funky experiment, than a real story. There are very intimate details about how people thought and why they did some things, but they also are empty, doll like characters. And that is too bad, because Gonzales is clearly a talented writer and the plot made me want to read on and find out what will happen to all the characters, only to be left high and dry at the end of the book, which stopped abruptly and spitefully. It was like "Hey, you wanted something else than to experience my new idea? Fuck you! You get nothing."

In the end, it was something that felt like a fairy tale, reinvented for art's sake and modernized just because it's fashionable. It's not even a first part of a series or something. It's a standalone book that showcases the author's idea of presenting many viewpoints on some incidents that have only marginal connection to science and fiction. It could have just as well been a soap opera about highschoolers and be just the same book. It wasn't bad, but I can't quite recommend it either.

Sunday, July 30, 2017

Bookmark Explorer coming for Firefox and Opera

I've decided the functionality of the Bookmark Explorer extension was pretty close to final and, before I refactor it to a new form, I wanted to make sure it works for all the browsers that support the WebExtensions mechanism, mainly Chrome, Firefox and Opera. Frankly, I have no idea why anyone would use Firefox or Opera, but if you do, I've got great news for you: I have published the extension for all of them:
Haven't tested extensively, I am going to do that in the near future, but rejoice, now you can read your news at speed and comfort, then remove them from your bookmarks once you have grown tired. There are some changes to the extension that need to be addressed:
  • The most significant is changing the keyboard shortcut for "Previous Bookmark" to Ctrl-Shift-O for Firefox and Opera, because changing extension key shortcuts in Firefox is really difficult and Ctrl-Shift-K is already used by the developer tools
  • The default settings have been updated. Now, when you install the extension for the first time you will get:
    • 30 second wait for the "Read Later" links to autoclose, giving the browser time to cache the title and icon
    • Preload next tab is now true by default, leading to loading the content of the next news item while you read the current one
    • When creating bookmarks - from anywhere - their URLs will be stripped of some marketing bullshit
  • A lot of bug fixes and speed improvements went into this aparrently minor release

I also plan to make a video of how to use the extension, since letting users read the long description and figure out what the extension does didn't quite work :) I am considering changing the name of the extension for version 3 and I am open to suggestions. I am thinking of Bookmark Surf or something like this. Please let me know of any problems with the extension. I will fix bugs and I will write new features if I agree they are good for my users. All you have to do is ask!

Enjoy!

Update: I was so happy that Firefox for Android supports addons that I just installed it immediately and expected it to work. Unfortunately, the support for the Web Extensions API is very limited for the Android version, most importantly not having a bookmarks API, so the Bookmark Explorer doesn't work. I did make the extension more robust, though, by debugging it on the Android version.

Wednesday, July 26, 2017

Salvation - what a terrible flop

Finally, finally there is a TV series about an asteroid coming towards Earth and what we are going to do about it. It is called Salvation and it fails in every single respect.

Yeah, her hair is moving on its own! The first alarm bell was Jennifer Finnigan, the female costar from Tyrant. She was terribly annoying in that show where she posed as the voice of reason and common sense, while being a nagging and demanding wife to the ruler of a foreign country. I thought "shame on you, Siderite! Just because she was like that in that show it's no reason to hold it against the actress". In Salvation, she plays the annoying nagging and demanding voice of reason and common sense as girlfriend to the secretary of the DOD.

But that's the least of the problems of the show. The idea is that a brilliant MIT student figures out there is an asteroid coming towards Earth. He tells his professor, who then calls someone and then promptly disappears, with goons watching his house. Desperate, he finds a way to reach to an Elon Musk wannabe and tell him the story. Backed by this powerful billionaire, he then contacts the government, which, surprise!, knew all about it and already had a plan. Which fails. Time to bring in the brilliant solution of the people who care: the EM drive! For which there is a need of exactly two billion dollars and one hundred kilograms of refined uranium. And that's just episode 2.

The only moment we actually see the asteroid is in a 3D holographic video projection, coming from most likely a text data file output of a tool an MIT student would build. Somehow that turns into a 3D rendering on the laptop of the billionaire. Not only does it crash into Earth, but it shows the devastation on the planet as a fire front. Really?

Bottom line: imagine something like Madam Secretary which somehow mated with the pilot episode of the X-Files reboot. Only low budget and boring as hell. There is no science, no real plot, no sympathetic characters, nothing but artificial drama which one would imagine to be pointless in a show about the end of the world, and ridiculously beautiful people acting with the skill of underwear models (Mark Wahlberg excluded, of course). Avoid it at all costs.

Update: oh, in episode 3, the last one I will watch, they send a probe to impact the asteroid and they do it like: "OK, we have a go from the president!" And in the next minute they watch (in real time from Io and from a front camera on the probe) how it is heading towards the asteroid. I mean... why write a story and not make it use anything real? What's the point in that? Even superhero movies are more realistic than this disaster. I know the creators of the show did other masterpieces such as Extant and Scream: The TV Series and Hawaii Five-O, they don't know any better, but at least they could have tried to improve just a tiny sliver. Instead they shat on our TV screens.

Monday, July 24, 2017

Update asteroids

I have updated my blog page with the Asteroids in the Solar system. There are only 892 at this date, rather than the 1500 I had before, but these are only the NEOs larger than 1 kilometer and the data is dynamically loaded rather than embedded in the page as it was before. Why didn't I use all of them? Because there are almost 500000 asteroids in the database and displaying them all would have been meaningless. Enjoy!

BTW, if you are wondering what the effects of an impact would be, play with this simulator.

Sunday, July 23, 2017

Dark Intelligence (Transformation #1), by Neal Asher

book cover I loved this book about the far future where humanity is ruled by benevolent AIs and vicious technological wars are being fought with xenophobic alien races. The greatest quality of Dark Intelligence is how it managed to define a world of varying degrees of power and intelligence that somehow manage to coexist without straining suspension of disbelief. I also liked that throughout the book there were hints on various hidden truths in the story, but Neal Asher didn't simply spoil the ending with them, nor did said ending rely solely on disclosing the twists that were glimpsed from those hints. The style of the writing was focused, easy to read, capturing the reader in the world the author created. I finished the book in just two days.

The subject of the story is also one that is very dear to my heart: what is the meaning of identity and personal purpose in life when anything can be changed, altered by either yourself or others, sometimes god like intelligences that just don't see galactic life as any more interesting than we would an ant hill. And while the book is part of a series set in a universe that Asher wrote a bunch of books about, the story is quite stand alone and can be read with pleasure without fear of a cliffhanger ending ruining it all. I liked it and probably I will try other books from the series and from this author.

Tea from an Empty Cup (Artificial Reality Division #1), by Pat Cadigan

book cover It was difficult for me to finish Tea From An Empty Cup. While it was a rather classic cyberpunk novel, which I usually enjoy, I felt it was obsolete in a way that could not be fixed. You know, like when designers or artists try to imagine how computers will be in the future. Only after reading it I realized it was written in 1998, so it was normal for that time and age to misunderstand how humans behave in networked environments, but still... even if the subject was a bit interesting, I actually had to make an effort to go through with it. I think the reason for why I didn't like the book was that the characters were paper thin. Concerned to describe a chaotic virtual reality world in which anything is possible and nothing is regulated (although everything is billed), Pat Cadigan forgot to make us feel anything for the protagonists. And considering that this is a story about how technology is affecting our perception of identity, it made the book unpalatable.

Imagine a Matrix in which people enter voluntarily because the real world is boring by comparison. They create their own intricate fantasies that go well beyond the basic human needs like food or sex and focus on social cues that the participants struggle to constantly redefine and grab for themselves. In this, Pat Cadigan was spot on. However, other than this simple idea that nowadays is ubiquitous on the Internet via the various social networks, the book is nothing but a boring detective story, complete with the "normal" policeman character that enters this virtual world as a complete noob and somehow solves the case. The action is very inconsistent and the feeling I got from the flow of the plot was one of a dream sequence where stuff is cool just by merely being defined as such. At no time while reading the book I was enticed by the scenes in the story.

The concepts inside the book are interesting, but explored very little. The author seems to be under the impression that by merely listing them, the story will somehow become interesting by association, an ironic parallel with the characters in the book. Just think that this book was published at the same time The Matrix movie was released. The difference in quality between the two stories is just too big.

Thursday, July 13, 2017

In Java, two Integer objects with the same value are not == to each other, most of the time

Today I've discovered, to my dismay, that two Integer objects with the same value compared with the == operator may return false, because they are different objects. So you need to use .equals (before you check for null, of course). I was about to write a scathing blog entry on how much Java sucks, but then I discovered this amazing link: Java gotchas: Immutable Objects / Wrapper Class Caching that explains that the Integer class creates a cache of 256 values so that everything between -128 and 127 is actual equal as an instance as well.

Yes, folks, you've heard that right. I didn't believe it, either, so I wrote a little demo code:
Integer i1 = Integer.valueOf(1);
Integer i2 = Integer.valueOf(1);
boolean b1 = i1 == i2; // true

i1 = Integer.valueOf(1000);
i2 = Integer.valueOf(1000);
boolean b2 = i1 == i2; // false

i1=1;
i2=1;
boolean b3 = i1 == i2; // true

i1=1000;
i2=1000;
boolean b4 = i1 == i2; // false

i1=126;
i2=126;
boolean b5 = i1 == i2; // true

i1++;
i2++;
boolean b6 = i1 == i2; // true

i1++;
i2++;
boolean b7 = i1 == i2; // false

i1 = 2000;
i2 = i1;
boolean b8 = i1 == i2; // true

i1++;
i1--;
boolean b9 = i1 == i2; // false


Update: the same thing also applies to Strings. Two strings with the same value are not == although they are immutable, so even the same string won't be equal to itself after changes. Fun!

I now submit to you that "sucks" applies to many things, but not to Java. A new term needs to be defined for it, so that it captures the horror above in a single word.

Wednesday, July 12, 2017

Microsoft SQL Server table partitioning

Tonight I went to an ADCES presentation about SQL table partitioning, a concept that allows for a lot of flexibility while preserving the same basic interface for a table one would use for a simpler and less scalable application. The talk was very professionally held by Bogdan Sahlean and you should have been there to see it :)

He talked about how one can create filegroups on which a table can be split into as many partitions as needed. He then demonstrated the concept of partition switching, which means swapping two tables without overhead, just via metadata, and, used in the context of partitions, the possibility to create a staging table, do stuff on it, then just swap it with a partition with no downtime. The SQL scripts used in the demo can be found on Sahlean's blog. This technology exists since SQL Server 2005, it's not something terribly new, and features with similar but limited functionality existed since SQL Server 2000. Basically the data in a table can be organized in separate buckets and one can even put each partition on a different drive for extra speed.

Things I've found interesting, in no particular order:
  • Best practice: create custom filegroups for databases and put objects in them, rather than in the primary (default) filegroup. Reason: each filegroup is restored separately,
    with the primary being the first and the one the database restore waits for to call a database as online. That means one can quickly restore the important data and see the db online, while the less accessed or less important data, like archive info, loaded afterwards.
  • Using constraints with CHECK on tables is useful in so many ways. For example, even since SQL Server 2000, one could create tables on different databases, even different servers, and if they are marked with not overlapping checks, one can not only create a view that combines all data with UNION ALL, but also insert into the view. The server will know which tables, databases and servers to connect to. Also, useful in the partition presentation.
  • CREATE INDEX with a DROP_EXISTING hint to quickly recreate or alter clustered indexes. With DROP_EXISTING, you save one complete cycle of dropping and recreating nonclustered indexes. Also, if specifying a different filegroup, you are effectively moving the data in a table from a filegroup to another.
  • Finally, the SWITCH TO partition switching can be used to quickly swap two tables, since from Sql Server 2005 all tables are considered partitioned, with regular ones just having one partition. So one creates a table identical in structure with another, does whatever with it, then just uses something like this: ALTER TABLE Orders SWITCH PARTITION 1 TO OrdersHistory PARTITION 1; to swap them out, with minimal overhang.

Monday, July 10, 2017

Memory Mapped Files in .NET 4.0

Just a heads up on a technology than I had no idea existed. To get the details read this 2009 (!!! :( ) article.

Basically you define a MemoryMappedFile instance from a path or a file reader, then create one or more MemoryMappedViewAccessors, then read or write binary data. The data can be structures, by using the generic Read/Write<[type]> methods.

Drawbacks: The size of the file has to be fixed, it cannot be increased or decreased. Also the path of the file needs to be on a local drive, it can't be on a network path.
Advantages: Fast access, built in persistency, the most efficient method to share data between processes.

Friday, July 07, 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, June 30, 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, June 29, 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, June 26, 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, June 25, 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, June 20, 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.