Iron Council by China Miéville

China Miéville’s Bas Lag series is somewhat unique in the realm of fantasy literature in that it keeps me coming back for more over and over again. I am not a huge fan of epic sagas or cycles spanning countless tomes. My favorite SF writer Jacek Dukaj once told an inteviewer he was not interested in committing sequels because it would feel artistically dishonest. That it would be like milking commercial success of a previous novel, and cranking out an easy, semi-recycled, focus-tested product instead of taking new risks in an effort to write something new, original and thoughtful. Many authors find a setting and characters that resonate with fans and make a career out of iterating over the same handful of themes and ideas across countless sequels, zeroing in on that exact sweet spot between fan service and high stakes melodrama. And while there is nothing wrong with that (and there is definitely market for it), this is not exactly what I look for in a book.

A reader lives a thousand lives before he dies, said R. R. Martin in his fifth book about the same group of characters inhabiting the same functional universe, and I keep wondering whether or not it is at all worth sacrificing seven of mine to see his epic through to the end, when it will be televised by HBO anyway. I could easily spend that time exploring other worlds, other ideas and other stories instead of worrying whether or not Tyrion is going to get brutally murdered at some wedding (this is not a spoiler, at least not that I know of). The mere fact that I care about Tyrion and Danny and bunch of other characters (most of whom are dead now) is an undeniable testament to Martin’s craft. He found our literary g-spot and he is working it raw (albeit very slowly). God bless him for that. I hope he lives a hundred more of valve-time years and writes 15 more books for us. But as great as his series might be, it isn’t about anything in particular. Entertaining and captivating and heart breaking: yes. But new installments don’t necessarily explore many new depths.

Miéville’s fantasy series is different in that each book about something. Each one has a particular theme and set of ideas it tries to explore. While the setting is recycled, protagonists are not and so each novel comes with a new set of personal journeys and character arcs. Each book has something different to offer. Perdido Street Station was a fantastic steam-punk thriller with a really cool nightmarish monster, and a deliciously tragic story of a man (well Garuda but whatever) guilty of an esoteric crime seeking to escape the punishment he actually deserves via arcane magical science. The Scar was a pirate adventure story with a big treasure hunt, a larger than life sea monster, floating city and explored bizarre, exotic cultures. Iron Council is probably the most ambitious and the most literary installment in the cycle because it deals with a rather loaded topic: inequality and class warfare. It is a novel about revolutions and social upheavals.

Book Cover

The Book Cover

Perdido touched upon New Corbuzon’s corrupt political system, and The Scar did introduce the readers to the plight of the setting’s subaltern underclass: the Remade – men and women marked for life, and stripped of human dignity and human rights as punishment for crimes both real and imaginary dealt out by the ineffectual, corrupt and dysfunctional bureaucracy. Iron Council however brings these themes to the forefront and builds the story around them.

It wasn’t so long ago that young idealistic dreamers, united by their dissatisfaction by the growing wealth disparity and the progressing annihilation of American middle class went out on the streets and occupied Wall Street in a peaceful protest accomplishing a whole lot of not much at all. Iron Council’s Ori is one of such idealists who realizes peaceful resistance and activism and other ways of affecting change by working within the system are only effective when said system isn’t completely broken. He is tired talking about how bad things are and he wants to start doing something to change it. He seeks out and ultimately joins a fringe resistance group which seeks to disrupt and ultimately overthrow the government by force. And so begins his ascension through the ranks of New Corbuzon’s most infamous terrorist cell. While he thinks that their cause is just and while he finds camaraderie among his fellow freedom fighters he is plagued by doubts and appalled by the amount of collateral damage his group is causing.

Parallel to Ori’s story we also get to follow Judah Low, a restless adventurer and a master golemist who, spurned by the sad state of affairs and social unrest in New Corbuzon sets out on a journey to find the titular Iron Council. Said council is a New Corbuzon legend: a symbol of equality, solidarity and a big middle finger directed at the corrupt government. The city’s most ambitious railway project was hijacked when a group of low wage rail workers and remade slaves rebelled against poor work conditions, overthrew their taskmasters, defeated the City militia army sent to quell their rebellion then stole the train and much of the rails driving off to some unknown lands and creating a society of their own. It became New Corbuzon’s Tiananmen Square – an uplifting symbol to the people and a shameful embarrassment to the government which officially claims it never happened. If anyone can find this legendary secret commune, it is Judah Low because he was once counted among the council’s leaders and political instigators. He hopes that by finding council and convincing it to come back, he can help to unite New Corbuzon’s fractured underclasses and create a spark of an open rebellion.

One can’t help but notice that the novel is somewhat topical. The book was published in 2004, but Miéville seems to have successfully tapped into the global sense of dissatisfaction regarding the income inequality and accumulation of wealth and power that started to skew former democracies toward oligarchic like systems. That pressure has later erupted into events like the Arab Spring, the Occupy movement and myriad of other bigger and smaller inequality related protests. Reading the novel now, one can see that the author has extrapolated on these notions and created microcosm exploration of social upheaval brought about by crushing inequality. Granted, we are talking about a revolution in a steam-punk/fantasy pseud-democratic-but-not-really New Corbuzon here. A city populated by frog-men, bird-men, sentient cacti in which corrupt judges can order your left ass-cheek to be magically fused with an angry porcupine as a punishment for littering. It’s not like this is a strong one to one metaphor for something particular. But it does make you think.

It does put you in the mind of the people involved in such revolts. It does a great job showing both the hope and hopelessness of fighting against a seemingly immovable unjust system. And the ending is as poignant and as fitting the story as it is unsatisfying. But most importantly it is rather unique, and very different from all the other novels in the same series. It is probably the most mature of the three Bas Lag books I have read so far, and one with a most diverse cast of characters. It is one of the few SF/Fantasy titles I have read this year that features not just prominent gay but also bisexual characters. Especially that last group has virtually zero representation in popular culture, and especially in SF and Fantasy. So it is nice to see Miéville making bisexuality the least interesting aspect of a vibrant and dynamic protagonist such as Judah Low.

I think Iron Council is definitely worth revisiting Bas Lag universe, even if you are getting tired of the setting. I don’t know if this can be said about all Miéville’s books set in the universe but Iron Council was definitely not an attempt to grind that commercial sweet spot. Personally I prefer his one of SF excursions like City and the City or Embassytown but I must admit that this novel might be the most serious and thoughtful I have seen him so far.

Posted in literature | Tagged , , | 6 Comments

The Banner Saga

The gods are dead… – those are the opening words of The Banner Saga. This is a hell of a way to open up a story, but I approve. I’m immediately on board with this. I was expecting a Viking tale about Viking things, but instead I got a post-apocalyptic fantasy, and I couldn’t be more pleased.

Actually, post apocalyptic is probably the wrong word to use it. The world of The Banner Saga is actually in the early stages of apocalypse. But it is not Ragnarock – a great to end all battles that gods wage against the forces of nature. That battle, or a similar one has apparently happened already. But it was not as violent or destructive as one might have expected it. It did not destroy the known universe. In fact, it did not seem to inconvenience the the sentient species of the world. Men and Varl (tall, horned giants who are for all intents and purposes Dwarfs except the diminutive size) simply stood by and watched their makers slaughter each other until none were left.

Banner Saga Title Screen

Banner Saga Title Screen

The faithful of the world still sometimes congregate at, and leave offerings at the gigantic God-stones: huge monuments supposedly built by the gods themselves that used to act as shrines and focal points of their power. But it is more of an old habit than an act of faith. Everyone knows that no one will answer their prayers anymore. When they leave flowers at a God-stone it is akin to leave flowers on a grave: a homage and a sign of respect.

Despite the gods being long gone, their stones do seem to retain a little bit of their former power and majesty. They are safe spaces where no one dares to shed blood, and anyone looking upon the carved visage of the local deity can’t help but feel small and insignificant. But there is more: each stone seems to affect people around it, subtly altering their perceptions and bringing certain thoughts and feelings to the forefront. Is this influence an echo of a former power, a psychological quirk or something else entirely?

Visiting a God-Stone

Visiting a God-Stone. These things are enormous and awe inspiring.

When the gods died the mortal men seem to have gotten the better end of the deal, and their race is poised to continue and prosper. The immortal Varl however got screwed. They are asexual and do not reproduce. They were being hand made by their patron God up until he died. Now, the Varl who still live are the last ones to ever exist. Their numbers are dwindling, because even though they do not die of old age they still succumb to diseases and acts of violence.

As the game opens, the sun has stopped in the sky. No one knows why it happened or what it means. There are no prophecies foretelling such an event. In other times, men would have sought the wisdom of the gods for answers. In fact, if the gods were still around they would have probably sent portents, prophecies long before such a world changing event. As it is right now however, men and Varl are on their own. They try to make due and hope for the best, seeing how there is nothing they can possibly do to make the sun moving again.

The Varl

The Varl – a dwindling race of horned, bearded, asexual giants, hand crafted by the gods themselves.

To make matters worse and ancient enemy: the Dredge (who are part darskpawn, part orcs and part stone golems) pour from the North where they were banished centuries ago. Was their magic responsible for freezing the sun? Or were they equally surprised by it? Is this an invasion or a migration? Is the frozen sun affecting the Northen lands differently than the south, thus forcing the Dredge to migrate? No one knows, and it is impossible to ask them because they do not communicate the same way that men and Varl do. The only meaningful communication between the people of the South and the stone-faced creatures of the North seems to involve swords and arrows. Any other attempts at communication from either side else has always been a failure.

This is the setting of The Banner Saga. It is wonderfully weird and strikingly original. I have not expected it to be this good. I’m a sucker for well developed, interesting fictional universes and this is definitely one of them. It mixes familiar accents of Norse mythology with pure fantasy, at the same time avoiding a lot of old and played out tropes. And the setting only gets weirder as you progress and new secrets and mysteries are revealed.

Dredge

The art for human and Varl characters in the game is really good. The Drege on the other hand… They are kinda goofy sometimes.

You take the role of several POV characters, each of whom is a leader of a small caravan, army or group of refugees somehow affected by the ongoing cataclysm or the Dredge invasion. Your task is to lead your people to safety by both managing the food and resources, negotiating with the locals and occasionally fighting turn based tactical encounters with the enemy.

Mechanically, the game is very, very simple. Most of the plot is communicated via still images and text. There is a bit of voice acting reserved for crucial cut-scenes or set pieces, but it is more of a rare treat. Most of the time you advance the plot via exploring dialog trees, which tend to be rather shallow. Most of the dialog options are purely informative, but some may actually have long lasting consequences. Saying the wrong thing or choosing the wrong action option can lead to permanent death of important characters, loss of resources and erc. What is worse, there is usually no way of telling which options are dangerous, or what their effects might be. In fact, many of the choices are counter intuitive.

Random Encounters

During the random encounters like this you never know if your choice will be inconsequential or if it will kill few hundred men, several named characters and cripple your progress without any warning.

For example, at one point in the game I found myself surrounded by enemy, and was given an option to either make a last stand fighting a hopeless battle against an absolutely overwhelming odds or to set up an ambush or create diversion to even the odds. The dialogs that lead up to the choice emphasized the hopelessness of fighting in the open field, and seemed to suggest a sneaky option would be the best. Unfortunately both the diversion and ambush option would result in death of one or more of your party members and huge loss of both resources as well as magic items available. Choosing the open battle on the other hand resulted with a medium difficulty encounter that could be won with just a little bit of effort and planning without actually suffering any long term losses.

This in my opinion was the weakest part of the game: a Mass Effect like mismatch between what the dialog option said, and it’s actual effect. But in Mass Effect picking the wrong dialog option did not randomly kill three or four of your party members. The Banner Saga on the other hand loves to do exactly that. I get why they do that: it creates tension, and makes your choices meaningful. It makes the player feel like a lot is at stake, and no one is ever safe… Unless of course you choose an open battle every time, because then you can actually mitigate damage and manage casualties on your own terms. I kinda wish the dialog based calamities were telegraphed more clearly. In fact, I wish losing a party member was more often made an explicit choice: a trade-off or a moral quandary, rather than an almost random event.

The combat system is simplistic, but I rather like it. I have often complained we don’t see enough of turn based tactical squad combat these days, and The Banner Saga scratches exactly that particular itch for me. The heroes you control have RPG like stat progression and can be equipped with various magic items that boost their efficiency. They all have special combat abilities that can sometimes be chained to a devastating effect (though they are all very situation dependent, and useless unless your heroes are placed just the right way on the board).

Turn Based Combat

The combat is turn based and happens on a grid of squares. You alternate turns with enemy.

There is something to be said about making the characters hit points also being their damage output capacity. In a way it makes perfect sense, especially with a lot of Varl an hulking Dredge giants scuttling around the battlefield. It does however change the way you play and think about the encounter. In most turn based tactical games you usually want to concentrate your damage on big threats and eliminate them as soon as you can. In Banner Saga you actually want to avoid eliminating the biggest threats. Instead you want to maim them to the point they can’t effectively deal damage to your heroes anymore and then use their body as a shield for your ranged troops. Since all movement is done on a grid, and only few units have the ability to walk “over” the squares occupied by another unit, you can effectively bottleneck enemy force by specifically not killing their largest units.

The turn order is a bit unusual as well. In most games you move all your units, and then the enemy moves theirs. Here you alternate with the enemy, each moving one character at a time. This means you have much less space to plan your movement, and you always have to be aware of the initiative order anticipate the enemy moves. You can easily leave yourself open and vulnerable by simply forgetting that your archers may not be able to move out of the way before an enemy unit descends upon them.

The game is rather unique both with respect to the gameplay and especially the story. Despite the flawed “moral choice” system the plot is still pretty gripping and I am in love with the setting and the mythology of the world. I think I have literally spent a few hours just panning around the world map and reading the fluff about all the different locations. That said, I wish the game would actually mark the places I visited and plot my movements on the map because it was sometimes hard for me to find the landmarks I passed some time ago with nothing but just the current location as a reference. The best and simultaneously worst part of the game is that the story isn’t finished yet.

The World Map

The world map is huge and full of interesting fluff. You can click on locations and read about their history. Unfortunately you never really get a sense of the places you passed because the game uses map markers very sparingly.

On one hand, I’m now eagerly awaiting the sequel, if it ever happens, because I really want to know what happens next. On the other hand, the next installment will have to innovate a bit. At the very least it will need to address the almost random way in which it kills off important combat characters without giving player enough information to make a hard choice. If you sacrifice a character you like for the greater good it generates pathos, but if said character dies to a random event it is more annoying than tragic. Combat system will have to improve a bit too. Not that it is bad right now, but it is a little bit repetitive and I’m not sure if it will carry a whole next game. Creating a separate unit/army based combat system for the large battles the story claims are happening in the background would probably do a lot to shake things up.

Posted in video games | Tagged | 3 Comments

WordPress: Vanishing Categories

Roughly a month or so ago, something weird happened to this website. It was one of those weird and a bit scary glitches that make you question your own sanity because they come out of nowhere and they have seemingly no reasonable explanation. I was busy typing away a new post when I noticed that all my tags and categories simply vanished.

The content, mind you was still there. All the posts and images were intact. They simply lost their category and tag associations. I have never actually seen anything like this before so my first thought was “database corruption”. I’m not sure how the DB could get corrupted, but WordPress is famously finicky about these sort of issues. It is not uncommon to see a badly written plugin touch one of the core WordPress tables in a bad way and make it freak out.

I promptly logged into the server and started running exploratory queries, but most of them came back looking very normal. The tag and category tables still had all of the entries in there, and posts were still correlated with them via foreign keys. The schemas of all the tables looked normal and I couldn’t detect any sign of plugin induced damage or even malicious tampering. All the information was in the database, but the UI refused to make the connections.

Luckily this is not the first time (and probably not the last time) I have seen WordPress go completely wonky. I have learned that running an active WordPress site without nightly backups is pretty much actively seeking out headaches. So after scratching my head for two hours, I decided to roll my VM back to the last night’s snapshot and see if that fixes the issue. Before that I decided to check how much disk space I have left.

It turned out that I had literally zero bytes.

Just on a lark I blew away the contents ~/temp and refreshed the site. The categories and tags have magically returned, but only partially. It appears that in order to render the tags and categories and associated pages WordPress needs to write a buch of temp files to disk. I have no clue why this happens, but I’m assuming it is an optimization strategy of some sort that is intended to limit the number of database reads per page view. However, if your disk is filled to the brim, it can’t do that. Therefore it fails silently and does the best to render the page without that additional information.

On one hand it is quite amazing that inability to perform some internal core caching does not bring the entire site down. On the other hand it seems wrong to me that such an operation is necessary. But despite using WordPress for many years now I have never actually felt compelled to peel the hood back and look at it’s database queries, so I guess I shouldn’t criticize something I don’t know all that much about.

Over the years I have gotten pretty good at cleaning up linux machines from accumulating temp file cruft. So it only took me a few minutes to identify the source of my disk bloat. It was the temp directory used by my WP-Cache plugin which ballooned up to few Gigabytes somehow. Apparently the old cache files were being discarded but never deleted. Blowing away the entire cache reduced by disk usage from 100% to 35%.

To prevent this sort of thing happening again I wrote a tiny guard-dog script that checks my disk usage on a weekly basis and prints out a nice report that is then emailed to me via a cron job:

#!/bin/bash
 
# use colors if available
[ -f "$HOME/scripts/colors" ] && source $HOME/scripts/colors
 
command -v awk >/dev/null 2>&1 || { echo "awk not found. Please install it and try again"; exit 1; }
command -v du >/dev/null 2>&1 || { echo "du not found. Please install it and try again"; exit 1; }
command -v df >/dev/null 2>&1 || { echo "df not found. Please install it and try again"; exit 1; }
 
# grab the % usage of the primary partition (typically line 2, col 5 on df)
read USAGE <<< $( df -h | awk 'FNR == 2 { print $5 }' )
 
# Make red if usage is above 60
if [ ${USAGE%?} -lt 60 ]; then
    Color_On=$Color_Green
else
    Color_On=$Color_Red
fi
 
echo -e "\nDisk Usage Report"
echo -e "-----------------\n"
 
echo -e "Disk usage: \t $Color_On$USAGE$Color_Off\n"
 
df -h
 
echo -e "\nLog file spot check:\n"
 
# Adding output to temp file so we can sort it later
# -sh provides human readable summary
# -BM sets the block size to Megabytes
du -shBM /tmp 2>/dev/null >> /tmp/du$$
du -shBM /var/log 2>/dev/null >> /tmp/du$$
du -shBM /srv/www/*/logs 2>/dev/null >> /tmp/du$$
du -shBM /srv/www/*/*/*/wp-content/cache 2>/dev/null >> /tmp/du$$
du -shBM /srv/www/*/*/*/wp-content/uploads 2>/dev/null >> /tmp/du$$
 
sort -nr /tmp/du$$
 
rm /tmp/du$$

The full version of the script is actually available here. The colors script I’m importing up top is also on Gighub if you want to check it out.

If you ever notice tags or categories vanishing from your blog, don’t panic. It probably just means your disk is full.

Posted in sysadmin notes | Tagged | 2 Comments