Sunday, January 13, 2019

Pandemic: Tracking Contagions, from Cholera to Ebola and Beyond, by Sonia Shah

book cover After I've read Barry's The Great Influenza I had resigned myself to never read a book as well researched, as interesting and as viscerally informative, so when I started reading Pandemic, by Sonia Shah I had low expectations. And the book blew me away!

While I did notice some factual errors along the way, stuff that was either insufficiently researched or used for dramatic purposes, Pandemic was amazingly good. And terribly disgusting. If Barry took the high road of celebrating the heroes in the fight against pathogens, Shah writes so that every chapter destroyed more and more of my fate in humanity. By the end of the book I was rooting for a disease that just comes and kills us all to spare us the embarrassment of being human.

I mean, the investigation starts with cholera and the undignified way in which it makes you involuntarily squirt every liquid you have until you look and feel like a desiccated corpse and if you don't die the chances are people will confuse you with a corpse and bury you alive. But then it got to the horrid conditions that existed before the 20th century even in New York, a place where the population density exceeded that of modern Tokyo five times and people would wallow in their own excrement thrown in the streets and infesting their water supply. Then it described an epidemic of cholera in such a hellish place; can't get any more disgusting, right?

But wait, then there is a chapter on corruption and how financial interests caused the death of thousands just so some people can build a bank corporation like JPMorgan Chase, the biggest US bank today, built on literally feeding shit to people until they died. Diseases not allowed to come into the public eye for the sake of tourism and all that crap. Can it get worse? Yes, because once the disease is there, the blame game is on. The cause of the disease is not germs, the blame is not on a corrupt medical or political system, the fault lies solely on dirty immigrants, gays, minorities and if all else fails, the aid workers that are trying to help, but probably brought the contagion themselves on some sinister agenda.

And then we get to the point where we learn our brilliant present is based just on the ignorance or indifference to present dangers or current super bug pandemics. After all the horror the book presents, the end result is but a whimper, business as usual, ineffective uninformed lethargic reactions to attacks that started decades ago and were completely ignored (pooh-poohed, to use Shah's expression, alarmingly suggestive of choleric excrement). The science is way better, the attitudes remain pre 19th century.

I feel like The Great Influenza, Pandemic and I Contain Multitudes are three books that need to be read together, like a pack. Followed or perhaps preceded by Sapiens. I know, these are all books I've recently read and there are probably hundreds more that could join a list based on topic, but to me all of these stories clicked like puzzle pieces and opened my eyes to a complete picture.

In conclusion, I highly recommend reading Pandemic. It's good for the people in the medical field, it's good for people that couldn't care less (they will after reading it), it's a must read.

Sunday, January 06, 2019

Dans les forêts de Sibérie, by Sylvain Tesson

Romanian book cover I started to read the book in French, so as to remember the language from my high school years, but then got lazy and after a chapter read it in my native Romanian. The literal translation would be In the Forests of Siberia, but for some reason it was translated as The Consolations of the Forest in English. Either title is misleading, as the forests are not really relevant to the story and the whole thing is a personal journal of a French misanthrope who decided to spend six months alone on the shores of lake Baikal.

I am unfamiliar with the work of Sylvain Tesson, he is a journalist and a traveler and I couldn't compare this with other things he wrote, but judging by Goodreads' description of him, this must be his most famous book. Did I like it? I didn't dislike it. In itself is a daily journal and has very little literary value other than the metaphors Tesson uses to express his feelings. Some land true, some simply don't work. There are no detailed descriptions of the landscape either. The author does not paint with his words, he mostly whines. If there are people around, he will insult their nation and their presence in his thoughts, while being civil and hospitable to them; if there are no people around, he will complain about the nature of society, humanity, religion or state. Left alone for a while, though, he will start to be more positive, inspired by nature, but also by the books he devours and then annoyingly feels compelled to quote from.

Some of his emotions ring true, it makes the read compelling and generates thoughts of how the reader would feel or act in the author's stead. Some descriptions sound exactly like what most people, alone in the (proximity of the) woods would produce if their only company were liters of vodka. What I am trying to say is that the book is a journal written by an egotist, therefore describing only him. The beautiful lake, the woods, people, dogs, the wild bears or anything else are just props so we can all bask in his personality... which is pretty shitty. Just as a small example: in four months of journal he mentions his need of random women coming into his hut twice. He mentions he has a girlfriend once. After getting dumped via SMS he whines continuously about how he lost the love of his life which now has no meaning and only his two dogs (received as pups when he got there) helped him through it. After the six months pass, he just leaves the dogs there, proclaiming his love for them.

So, an informative book about how a random French writer asshole felt while living alone in the cold Russian wilderness, but little else. Apparently there is a 2016 movie made after the book. You might want to try that.

Saturday, January 05, 2019

Shoggoths in Bloom and Other Stories, by Elizabeth Bear

book cover I've always had the nagging feeling that someone who writes well could do wonders with the Lovecraft "mythos". A lot have tried and most have failed miserably, because Lovecraft was weird and his horror feelings came from being really intolerant of almost anything, but I am still trying to read things inspired by the man in hope I would find something very good.

Unfortunately, Shoggoths in Bloom is one of the shortest stories in this collection of short stories by Elizabeth Bear, is only loosely based on Lovecraft's ideas and is not horror. In fact, none of the stories in the book were horror and some weren't even fantastical, but verged on personal or perhaps historical fantasy. The quality was inconsistent, with some shorts being nice and others a nightmare to finish. Funny thing is one of the stories I liked, Tideline, I had listened to before on the Escape Pod web site.

Bottom line, Bear seems to be an accomplished writer and her writing is good, but I wouldn't recommend this collection, from the standpoint of quality, but also because it uses a Lovecraft concept to sell something completely different.

Friday, January 04, 2019

Sonar Source rule 3906 Event Handlers should have the correct signature

Sonar Source code static analysis rule RSPEC-3906 states:
Delegate event handlers (i.e. delegates used as type of an event) should have a very specific signature:
  • Return type void.
  • First argument of type System.Object and named 'sender'.
  • Second argument of type System.EventArgs (or any derived type) and is named 'e'.


The problem was that I was getting the warning on a simple event declared as EventHandler<TEventArgs>. Going to its source code page revealed the reason in a comment: // Removed TEventArgs constraint post-.NET 4.

Tuesday, December 25, 2018

Hero-U: Rogue to Redemption

In 2015 I was so happy to hear that Cory and Lori Cole, game designers for the Sierra Entertainment company, were doing games again, using Kickstarter to fund their work. Particularly I was happy that they were doing something very similar to Quest for Glory, which was one of my very favorite game series ever. Well, the game was finally released in the summer of 2018 and I just had to play it. Short conclusion: I had a lot of fun, but not everything was perfect.

game cover and the two Coles The game is an adventure role playing game called Hero-U: Rogue to Redemption and it's about a small time thief who meets a mysterious bearded figure right after he successfully breaks into a house and steals, as per contract, a "lucky coin". The man gives him the opportunity to stop thieving and instead enroll into Hero University as a Rogue, rogues being a kind of politically correct thieves, taking from the rich and giving to the poor and all that. You spend the next 40-50 hours playing this kid in the strange university and finally getting to be a hero.

You have to understand that I was playing the Quest for Glory games, set in the same universe as Hero-U, when I was a kid. My love for the series does not reflect only the quality of the games, the humor, the nights without Internet where I had to figure out by myself how to solve a puzzle so that I could brag to my friends who were doing the same at the time, but the entire experience of discovery and wonder that was childhood. My memories of the Sierra games are no doubt a lot better than the games themselves and any attempt of doing something similar was doomed to harsh criticism. So, did the Coles destroy my childhood?

Nope. Hero U was full of puns and entertainment and rekindled the emotions I had playing QfG. I recommend it! But it won't get away from criticism, so here it is.

Update: I've finished the game again, going for the "epic" achievement called Perfect Prowler, which requires you don't kill anything. I recommend this as the start game because, if you think about it a bit, it's the easier way to finish the game. To not kill anything you need to sneak past enemies, meaning maxing your stealth. To defeat your enemies (which is also NOT the rogue way as taught at the university) you need to have all sorts of defenses, combat skills, magical weapons or runes, etc. By focusing on stealth you actually focus on the story, even if sometimes it is annoying to try to get past flying skulls for ten minutes, saving and reloading repeatedly, until your stealth is high enough. Some hints for people doing this:
  1. Sleeping powder is your friend, as it instantly makes an enemy unresponsive and does not alert other enemies that are standing right next to them
  2. Sleeping powder works on zombies, for some reason
  3. Demolishing a wall with a Big Boom while guards are sleeping next to it does not hurt said guards, even better, they magically disappear letting you plunder the entire room
  4. If someone else kills your enemy, you didn't kill anything :)
  5. The achievement says you have to not kill things, you can attack them at your leisure as long as you flee or use some other methods to escape

Anyway, the second run made me even more respectful towards the creators of the game, as they thought of so many contingencies to allow you to not get stuck whatever style of play you have. And this on a game that had so many production issues. Congratulations, Transolar!

And now for the original analysis:

What is great about the game is that it makes you want to achieve as much as possible in a rather subtle way. It doesn't show you X points out of Y the way old Sierra games did, but it always hints of the possibility of doing more if you only "apply yourself". Yes, it feels very much like a school. And I liked it. What's wrong with me?

I liked the design of the game, although I wish there was a way to just open a door you often go through, rather than click on the door and then choose Open from the list of possible and useless options like Listen on the door or Look at the door. I liked that you had a lot of actions for the objects in the game, which made it costly to just explore every possible option, but also satisfying to find one that works in your favor.

And the game is big! A lot of decisions, a lot of characters and areas to explore, a lot of quests and a lot of puns. Although, in truth, even if I loved the QfG series for their puns, in Hero-U it feels like they tried a little bit too much. In fact, I will write a lot about what I didn't like, but those are general things that are easy to point out. The beautiful part is in the small details that are much harder to describe (and not spoil).

The biggest issue I had with the game was the time limits. The story takes the hero through a semester of 50 days at the university and he has to do as much as possible in that time. This was good. It makes for a challenge, it forces you to manage the time you have to choose one or the other of several options. You can't just train fighting skills for weeks and then start killing critters. However, each day has several other time limits, mainly breakfast/class, supper and sleep. You may be in the depths of the most difficult dungeon, took you hours to get there, if it's supper time, your "hero" will instantly find his way back so he can grab some grub. You don't have the option to skip meals or a night's sleep, which would have been great as an experience and very little effort in development, as he already has "tired", "hungry", "injured" and other states that influence his skills.

This takes me to the general issue of linearity of story. The best QfG games were wonderful because you had so many options of what you could do: you could explore, do optional side quests that had little or nothing to do with the main story, solve puzzles in a multitude of ways (since in those games you got to choose your class). Hero-U feels very linear to me: a lot of timed quests with areas that only open up after specific events that have nothing to do with you, the items you get at the store change to reflect the point in time you are in, a choice of girls and boys to flirt with, but really only one will easily respond to your attempts at romance, the only possible ending with variations so small as to make them irrelevant and so on. And many a time it is terribly frustrating to easily find a hidden door or secret passage, but be unable to do anything with it until "it's time". You carry these big bombs with you, but when you get to a blocked door you can't just demolish it. I already mentioned the many options you have to interact with random objects in the game, but the vast majority of them are useless and inconsistent. QfG had some of these issues, too, though.

An interesting concept are the elective classes, which are so easy to miss it's ridiculous. Do not miss the chance (as I did) to do science, magic or healing. It reminds me of QfG games you played as a fighter and then started them again as a mage or thief. The point is to take all your tests (and since you get the results a few days later) you need to know your stuff (i.e. read the text of the lectures and understand what the teachers are saying). Unfortunately, the classes don't do much to actually help you. Science gives you a lot of traps and explosives, healing gives you a lot of potions and pills and magic gives you sense magic and some runes. You can easily finish the game without any of them and it is always annoying to have to run from the end of your classes (at 14:00) and reach the elective classroom on another floor, having to dodge Terk and also considering that you might want to do work in the lock room, practice room, library, recreation room and reception, all in one hour (you have to get to the class by 15:00). And the elective eats two hours of your time, just in time for (the mandatory) dinner.

And then there is the plot itself. I had a hard time getting immersed in a story where young people learn at a university teachers know is infested with dangerous creatures that students fight, but do nothing to either stop or optimize the process. Instead, everybody knows about the secret passages, the areas, but pretend they do not. Students never party up to do a quest together. There are other classes in the university, not only Rogues learn there, but you never meet them. Each particular rogue student has a very personal reason to be in the university, which makes me feel it's amazing that the class has seven students; in other years there must have been a maximum of two. You get free food from all over the world, but you have to buy your own school supplies. There are two antagonists that really have absolutely no power over you, no back story, and you couldn't care less that they exist. Few of the characters in the game are sympathetic or even have believable motivations.

Bottom line: I remembered what it was like when I was a child playing these games and enjoyed a few days of great fun. I felt like the story could have had more work done so that we care about the characters more and have more ways to play the game. The limits often felt very artificial and interrupted me from being immersed in the fantastic world. It felt like a Quest for Glory game, but not the best ones.

It is worth remembering that this game is the first since the 1990s when the creators were working in Sierra Games. They overcame a lot of new hurdles and learned a lot to make Hero-U. The next installments or other games will surely go more smoothly both in terms of story and playability. I have a lot of trust in them.

Some notes:
  • There is a Hero-U Student Handbook in PDF form.
  • Time is very important. It pays to save, explore an area, reload and go directly where you need to go.
  • Stealth is useful. There is an epic achievement to finish the game without killing anything. That feels a bit extreme, but it also shows that items and combat skills may be less relevant than expected.
  • Exams are important: save and pass the exams so you can get elective classes. I felt like every part of the story was excessively linear except elective classes which you can even miss completely because you get no help with them from the teachers or the game mechanism.
  • Some doors towards the end cannot be opened and are reserved for future installments of the series.
  • You can lose a lot of time in the catacombs for no good reason. Don't be ashamed to create and use a map of the rooms.

I leave you with a gameplay video:

Friday, December 21, 2018

Sonar Source rule 3898 Value types should implement "IEquatable"

This is another post discussing a static analysis rule that made me learn something new. SonarSource Rule 3898 says: If you're using a struct, it is likely because you're interested in performance. But by failing to implement IEquatable<T> you're loosing performance when comparisons are made because without IEquatable<T>, boxing and reflection are used to make comparisons.

There is a StackOverflow entry that discusses just that and the answer to this particular problem is not actually the accepted one. In pure StackOverflow fashion I will quote the relevant bit of the answer, just in case the site will go offline in the future: I'm amazed that the most important reason is not mentioned here. IEquatable<> was introduced mainly for structs for two reasons:
  1. For value types (read structs) the non-generic Equals(object) requires boxing. IEquatable<> lets a structure implement a strongly typed Equals method so that no boxing is required.
  2. For structs, the default implementation of Object.Equals(Object) (which is the overridden version in System.ValueType) performs a value equality check by using reflection to compare the values of every field in the type. When an implementer overrides the virtual Equals method in a struct, the purpose is to provide a more efficient means of performing the value equality check and optionally to base the comparison on some subset of the struct's field or properties.

I thought this was worth mentioning, for those performance critical struct equality scenarios.

Saturday, December 15, 2018

Skyward (Skyward #1), by Brandon Sanderson

book cover Skyward is Brandon Sanderson at his best... and worse. Yes, his best characters have always been young rebellious loud mouths with a penchant for over the top lines and punny jokes. And yes, this is a young adult novel with a classically clichéd plot. I feel guilty for liking it so much, but hey, it apparently works! Personally I feel it's a shame Sanderson spends a year writing a book and I finish it in two days, but at least he's not George R. R. Martin!

The whole idea revolves around this society of humans, driven underground by an alien force. They live on a planet surrounded by a sphere of debris few can get through and attacked periodically by alien fighter planes and bombers that the humans must repel in order to survive. And here is this heroic little girl who dreams of becoming a pilot fighter despite her father being universally despised for being a coward and leaving the field of battle. Determined to clear her and her father's name, she enrolls in a school for cadet fighters and discovers she has what it takes to protect her friends and save humankind.

Sounds familiar? It should, every story lately seems to be about the same character. Is it an interesting and engaging character? Yes. Is the world weird and familiar enough to be enjoyed? Yes. If this is all you need, you will love the book. And of course, it's the first book in a series. I need a little more, though, and I feel that the twists were terribly predictable and there were holes everywhere in the world building. If you only focus on the characters, as the author did, you enjoy the book. But as soon as you try to imagine yourself there, things start to make little sense and whatever you would do, it would not be what the characters in the book do. Plus... that fighter! Deus Ex Machina much?

Bottom line: lovely book to read in a few days and feel you are a reader, but the story is as standard as they come and the only nice thing about it is that Sanderson wrote it.