Tuesday 31 March 2015

The Courts of Chaos, by Roger Zelazny (Amber series book V)

Book cover And thus ends the fifth book in the Chronicles of Amber, and the last in the Corwin cycle. Written between 1970 and 1978 by Roger Zelazny, it was one of the most lazy fantasy series I've read so far. The Courts of Chaos is once again a book that has no connection with its title. Nothing really happens in the courts of chaos except at the very end. All previous developments in the story are discarded completely and it feels like the author slept through writing the book. It was one of the most WTF books in the series so far, as well. At every section there was at least one scene where I felt like those people watching football games and shouting at their TV about what the player should have done.

Let me give you some examples. The book itself starts with a circular time paradox, where we get to see Corwin cut off Benedict's artificial arm. This had already happened in the previous book, but from the other perspective. Thus the metallic arm was only there to be severed because it has been severed in the past, its origins non existent. Then each of the children are given orders by their father. Why would they listen to them is beyond me, as was his entire reason for leaving, reappearing, etc. Anyway, he sends Corwin on a quest to carry the Jewel of Judgement (nobody did any judgement with that stone!!) to the courts of chaos, where Benedict already went using a trump card. Of course, why call Corwin's grandfather to make another card so that he can get there instantaneously? Why indeed. So we are exposed to this totally boring expedition where people fight like children with swords and crossbows and throwing rocks at each other. No guns, of course, that would be cheating. When Corwin uses a stone to make his enemy drop his crossbow, he ignores the crossbow and almost dies in the process. When he gets to the crossbow again, he smashes it! Why use a ranged weapon at all? Oberon made a blood raven out of a bit of Corwin's blood, to accompany and protect him in shadow. Why not make a bloody (pun intended) army of ravens? Wouldn't that have been better? And it just goes on and on. They never use the cards in this book, for example, after it was already obvious they can be used as communication devices as well as offensive weapons.

Nothing really made sense, in a nutshell. I am pretty convinced Zelazny was stoned out of his mind when he wrote this, but with some bad shit, since it never seems to increase his creativity. The ending was like a slap in the face, as after their victory, using armies of pedestrians and cavalry, a funeral procession for Oberon appears out of nowhere, with a lot of people and dragons. I kid you not, they had dragons, but their only use was decorative, like some sort of Chinatown celebration paper-mache things. And they got there not by treading the land like idiot Corwin, they actually came directly there. Oh, and since Corwin didn't feel like being king, they crowned another brother. Who, you might ask? Is it the brilliant strategist Benedict? Is it the loyal and strong Gerard? Is it the devious and aloof Julian? No, it's totally Random (another pun, couldn't help myself).

The next book in the series is the first in the Merlin cycle and the first book was written in 1986. It gives me hope that in 10 years Zelazny learned to fucking write!

Sunday 29 March 2015

Saturday 28 March 2015

Hand of Oberon, by Roger Zelazny (Amber series book IV)

book cover The pattern (ahem!) becomes apparent once again: same lead character doing stuff in random order just to make the story be the way it was imaged by the author, same boring exposition, same artificial drama that could have been avoided easily if Corwin would have acted like a real character and not some cardboard placeholder of the lead, same stupid and obvious twist at the end, giving the name of the book even if most of it was about something else, same lackluster secondary characters, completely oblivious and helpless if not for the main protagonist and the mighty writer god. Indeed, the mock metaphor is not so far stretched when you think that in order to do anything worthwhile, people have to step on a pattern drawn on the floor and follow the lines exactly, without stopping, or they die. Maybe so we understand the villain better, trying to spill the blood of the children of Oberon, in order to destroy the existing pattern and build one anew: a book worth reading.

In The Hand of Oberon, Roger Zelazny again throws his Corwin character into a series of unlikely events, wooden dialogues and implausible behaviors. All strange events, that by all established rules should not be possible, are completely ignored by the characters until they appear relevant to some great reveal. Again a villain must walk the pattern and they must stop him, by posting guards, by walking the pattern after him, yadda yadda yadda. No one even considers taking a stone off the ground and hitting him on the head with it while they are hopping around the magical Hopscotch (not to mention a rubber bullet gun which would have solved everything in most situations). No one interrogates the corroborating witnesses or the people involved in the same situations until it is too late and they themselves don't act unless confronted later on in a sort of "oh, yeah" moment that is nothing but embarrassing.

The ending is just as muddled, with a scene that sees the villain put in storage for later use and a great reveal that had been obvious for a book and a half. No one seems to really care that the shadow realms have different rates of time passage either, so instead of using some trump to go to the fastest realm to talk or plan and return with entire plans made up, they sit around in feudal palaces in Amber, looking all important. I mean, Zelazny never truly describes their attire (unless it's some girl, and then he must describe her to the size of her cups), but I think that a kevlar shirt and some blue jeans and sneakers would have done wonders to the politics of the place. Oh yeah, kevlar probably doesn't work in Amber.

One book to go until the protagonist changes. At least there is some hope there...

Sign of the Unicorn, by Roger Zelazny (Amber series book III)

Audio book cover Sign of the Unicorn continues where the second book ended and ends with another cliffhanger reveal that more or less has little to do with the content of the book! While I admit this book is slightly more interesting than the first two, the way the characters act and particularly the way Roger Zelazny completely ignores some of the main points in those books is becoming increasingly annoying. And just like the guns in The Guns of Avalon were a mere detail in an otherwise completely unrelated story, the Unicorn is something that just appears twice in the same book!

OK, enough ranting. This particular volume of the story (because it would be quite impossible to read the book without the first two, so in essence it is still the same book) is hinting about the origin of the strange forces attacking the realm, as well as explaining some more what had happened to Corwin and the court intrigues that led to it all. More of the siblings make their appearance, but their characters are reduced to conversation pieces in feudal Poirot-like instances, when they just come when bidden or do something that is instrumental to the plot going... in the same direction it was going. Instead of walking around with two Ingrams on his belt, Corwin continues to depend on his sword and reflexes, while sleeping underneath the same roof as his murderous and treacherous relatives. Instead of getting the man who sprung him from jail and using his unparalleled gift, Corwin seems to have forgotten about him completely. When he misses an important piece of jewelry that actually saves his life, he just abandons it and goes to do his usual business. And what about Bleys? After finding a solution for enhancing the power of the tarot cards, he just decides to use it once, on a single person. What about Oberon, man?! He's your dad!

Apparently, it wasn't enough ranting. It is kind of difficult for me to accept the layout of the story. Like any young adult movie recently, the author takes your sight and nails it to his narrow perspective, his favourite character and the things he feels he needs to do. Same unsympathetic shallow characters, same disaffectionate way of describing events, same predictable deus-ex-machina devices to promote the plot. Thank God these books are short!

Friday 27 March 2015

The Guns of Avalon, by Roger Zelazny (Amber series book II)

Book cover The Guns of Avalon continues the story from the moment the previous book ended. Roger Zelazny is taking his Corwin character through some shadow land towards Avalon, where he might find the answer to his desire to claim the throne: an explosive agent that works in Amber.

His plans are soon thrown into disarray by several happenings. We meet the smart strategist brother Benedict, another blood relative Dara, we meet Gerard as well as learn a little bit more about the Amber world. However, the dispassionate style of writing as well as the dispassionate style of reading the book by its very author, made me feel close to nothing about the characters or events described. Again, I felt like learning nothing, as all the interactions between characters are very shallow and there is nothing described in enough detail to expand on the knowledge of the world or on some skill that the characters have. The author has attempted to show in the book that Corwin is a compassionate man, saving women from rape and wounded men from dying, helping his friends and being reluctant to dispatch or even harm his treacherous brothers, yet it all comes out like some guy playing a multiple option game: "Do you want to save the woman or keep going?" "Oh, what the hell, let's save the woman, see what happens". The ending of the book comes down brutally, solving several problems in a very lazy way, avoiding any controversial decisions that Corwin would (and should) have taken and introducing a magical nemesis that has no reason to exist that the reader would care about.

I am starting to feel that I've stumbled upon a dud. Two out of ten books to go (five if we consider that from the sixth book there will be a different main protagonist), and the only reasons I keep going are a promise to finish the series and my lack of strength for doing anything else.

Nine Princes in Amber, by Roger Zelazny (Amber series book I)

Book cover Nine Princes in Amber describes a world in which only one place is "substance", the great city of Amber, while all others, including Earth, are just "shadow". Roger Zelazny doesn't really explain what is the difference, but we catch glimpses of the way Amber people can alter reality and that some of the things that happen in shadow cannot happen in Amber. Gun powder, for example, or perhaps even electricity. Great power can be channeled through tarot cards that hold the images of the children of Oberon or some other things, former king of Amber, while his numerous sons and daughters scheme and plan to take over the throne. The cards are drawn by a weird magician that seems to hold no political power, despite his amazing skill.

I took advantage of a flu that restricted me to bed in order to listen to the book in audio format, narrated by Roger Zelazny himself. While I enjoyed it, I didn't feel it taught me anything new. It was a pretty inconsistent story, as well. Princes and princesses and nobles, acting all smarty and aristocratic, dueling with swords and the occasional bow or crossbow, and some of the classic cliches encountered in this sort of context: like never killing your noble opponents, but imprisoning them or torturing/displaying them in order to demonstrate power.

In the end, the main protagonist remains a mystery. He starts with an amnesia, but soon he recovers his memory, making the entire memory loss kind of pointless. It is never quite spelled out who he is as a person, or what was it that he did on Earth. In truth, the book feels more like an introduction to the world of Amber, more like a teaser really, leaving the exposition of real character or description of the worlds to the following books. It is one of the first books from Zelazny, so maybe it will become better in the future. It is not explained why someone would want to rule Amber, either, as any other shadow world looks more appealing.

Even if I haven't fully enjoyed the story, I did promise a friend I would finish the entire Amber series, so we will see. After finishing it, I reserve the right to torture my friend in order to display my power by making him read something truly awesome and unsettling. I have not yet determined what yet, but a dark bird of my desire will carry my message and he will live in fear.

Zelazny himself died in 1995. I found a page written by George R. R. Martin, a beautiful remembrance of a mentor and friend. Apparently, he wrote the character Croyd (The Sleeper) in the Wild Cards series, one of the most interesting characters and appearing in many of the stories, even if very rarely as a main protagonist.

Tuesday 24 March 2015

Blog Question: How to use a large image as a page background, without showing it loading slowly?

A blog reader asked me to help him get rid of the ugly effect of a large background image getting loaded. I thought of several solutions, all more complicated than the rest, but in the end settled on one that seems to be working well and doesn't require complicated libraries or difficult implementation: using the img onload event.

Let's assume that the background image is on the body element of the page. The solution involves setting a style on the body to hide it (style="display:none") then adding as child of the body an image that also is hidden and that, when completing loading, shows the body element. Here is the initial code:
<style>
body {
background: url(bg.jpg) no-repeat center center fixed;
}
</style>
<body>

And after:

<style>
body {
background: url(bg.jpg) no-repeat center center fixed;
}
</style>
<body style="display:none">
<img src="bg.jpg" onload="document.body.style.display=''" style="display:none;" />

This loads the image in a hidden img element and shows the body element when the image finished loading.

The solution might have some problems with Internet Explorer 9, as it seems the load event is not fired for images retrieved from the cache. In that case, a slightly more complex Javascript solution is needed as detailed in this blog post: How to Fix the IE9 Image Onload Bug. Also, in Internet Explorer 5-7 the load event fires for animated GIFs at every loop. I am sure you know it's a bad idea to have an animated GIF as a page background, though :)

Warning: While this hides the effect of slow loading background images, it also hides the page until the image is loaded. This makes the page appear blank until then. More complex solutions would show some simple html content while the page is loading rather than hiding the entire page, but this post is about the simplest solution for the question asked.

A more comprehensive analysis of image preloading, complete with a very nice Javascript code that covers a lot of cases, can be found at Preloading images using javascript, the right way and without frameworks

Monday 23 March 2015

Goodbye SiteMeter, too!

In my opinion, when a software you have been using for a long time changes the way it works and intrudes on your already existing installations, not only it is disappointing and mean, but it should also be illegal. Today I noticed that the links from my blog went to intermediate sites (I apologize for not noticing it sooner) like vindicosuite. A quick Google search led me to this link: Goodbye Sitemeter. Apparently, SiteMeter, a software that I have been using to show a views counter on my blog, has been acquired by a crappy company called News Company. I mean, this is the actual name, I am not making fun of you; it's like displaying "Dr Doom's Evil Lair" on your house fence (and not kidding about it). Without the company saying anything, the SiteMeter script added these click and contextmenu handlers on my links, redirecting to other sites, maybe with ads on them (I have AdBlock Plus installed and so should you!, so I don't know). Anyway, the moment I realized this I removed the script from my blog. I have to apologize again for failing to notice this for so long.

Sunday 22 March 2015

Parasyte - the maxim, an interesting anime

The main hero and his alien hand OK, I have no idea what most Japanese titles want to say. Is this about a parasite who is also a short, pithy statement expressing a general truth or rule of conduct? No, it is not. Parasyte is about a guy who gets infected by an alien metamorph, but somehow he manages to contain the infected area to his right arm. As a result, he maintains his personality, but now has a powerful alien as his right arm. It can change shape, it is very intelligent and it is generally useful when dealing with other afflicted, who usually have their brain infested, and thus are alien in their entirety.

Of course, being a Japanese anime, our hero is a highschool male student after which a number of girls are pining for no good reason and that he has to fight to protect. No scenes of using his versatile tentacle arm on these girls, though. There are also some discussions about the role of these parasites and/or humans in the world, a vague ecologist propaganda that really has nothing to do with the plot and lots and lots of gore. The interaction between the human highschooler and the amoral and fiercely individualistic alien makes for most of the fun in the anime.

The series is ongoing, but I just watched the first 23 episodes and I can safely say that they could have stopped there. Probably they can come with fresh ideas, but for me the story started and ended satisfactorily with episode 23. The animation is good, but nothing spectacular, the Japanese cliches are abundant, but only barely overused and the main character is someone you can easily like and understand.

As far as I can see the anime faithfully follows the manga and episode 23 ends where the manga chapter 62 ends. There are just two other manga chapters published, so the anime and mange are pretty much synchronized. You can read the Parasyte manga online.

Saturday 21 March 2015

Blog question: Address validation using CRF models

I am starting a new blog series called Blog Question, due to the successful incorporation of a blog chat that works, is free, and does exactly what it should do: Chatango. All except letting me know in real time when a question has been posted on the chat :( . Because of that, many times I don't realize that someone is asking me things and so I fail to answer. As a solution, I will try to answer questions in blog posts, after I do my research. The new label associated with these posts is 'question'.

First off, some assumptions. I will assume that the person who said I'm working on this project of address validation. Using crf models is my concern. was talking about Conditional Random Fields and he meant postal addresses. If you are reading this, please let me know if that is correct. Also, since I am .NET developer, I will use concepts related to .NET.

I knew nothing about CRFs before writing this posts, so bear with me. The Wikipedia article about them is hard to understand by anyone without mathematical (specifically probabilities and statistics) training. However the first paragraph is pretty clear: Conditional random fields (CRFs) are a class of statistical modelling method often applied in pattern recognition and machine learning, where they are used for structured prediction. Whereas an ordinary classifier predicts a label for a single sample without regard to "neighboring" samples, a CRF can take context into account. It involves a process that classifies data by taking into account neighboring samples.

A blog post that clarified the concept much better was Introduction to Conditional Random Fields. It describes how one uses so called feature functions to extract a score from a data sample, then aggregates scores using weights. It also explains how those weights can be automatically computed (machine learning).

In the context of postal address parsing, one would create an interface for feature functions, implement a few of them based on domain specific knowledge, like "if it's an English or American address, the word before St. is a street name", then compute the weighting of the features by training the system using a manually tagged series of addresses. I guess the feature functions can ignore the neighboring words and also do stuff like "If this regular expression matches the address, then this fragment is a street name".

I find this concept really interesting (thanks for pointing it out to me) since it successfully combines feature extraction as defined by an expert and machine learning. Actually, the expert part is not that relevant, since the automated weighing will just give a score close to 0 to all stupid or buggy feature functions.

Of course, one doesn't need to do it from scratch, other people have done it in the past. One blog post that discusses this and also uses more probabilistic methods specifically to postal addresses can be found here: Probabilistic Postal Address Elementalization. From Hidden Markov Models, Maximum-Entropy Markov Models, Transformation-Based Learning and Conditional Random Fields, she found that the Maximum-Entropy Markov model and the Conditional Random Field taggers consistently had the highest overall accuracy of the group. Both consistently had accuracies over 98%, even on partial addresses. The code for this is public at GitHub, but it's written in Java.

When looking around for this post, I found a lot of references to a specific software called the Stanford Named Entity Recognizer, also written in Java, but which has a .NET port. I haven't used the software, but it seems as it is a very thorough implementation of a Named Entity Recognizer. Named Entity Recognition (NER) labels sequences of words in a text which are the names of things, such as person and company names, or gene and protein names. It comes with well-engineered feature extractors for Named Entity Recognition, and many options for defining feature extractors. Included with the download are good named entity recognizers for English, particularly for the 3 classes (PERSON, ORGANIZATION, LOCATION). Perhaps this would also come in handy.

This is as far as I am willing to go without discussing existing code or actually writing some. For more details, contact me and we can work on it.

More random stuff:
The primary advantage of CRFs over hidden Markov models is their conditional nature, resulting in the relaxation of the independence assumptions required by HMMs in order to ensure tractable inference. Additionally, CRFs avoid the label bias problem, a weakness exhibited by maximum entropy Markov models (MEMMs) and other conditional Markov models based on directed graphical models. CRFs outperform both MEMMs and HMMs on a number of real-world sequence labeling tasks. - from Conditional Random Fields: An Introduction

Tutorial on Conditional Random Fields for Sequence Prediction

CRFsuite - Documentation

Extracting named entities in C# using the Stanford NLP Parser

Tutorial: Conditional Random Field (CRF)

An appeal for generational concepts in Wikipedia

I often find a new thing that I haven't ever heard of, so I google it. A lot of the time, the first link returned is the Wikipedia article about that concept and I open it to get a general idea of what it is about. Most of the time I understand it immediately, but in some cases - mostly involving hard science like high level mathematics - that page is just a bunch of gibberish that means less to me than what I was looking to clarify in the first place. I mean, when I am searching for something, I usually use words, so there: much clearer.

However, that doesn't mean that I don't want to understand what is described on that page. One idea I had is that of "generational concepts", in other words the concepts that one needs to understand before tackling a new one. They are not "related concepts", they are not links to terms used in the description, they are the general concepts that you need to get first. I find it interesting and useful for several reasons:
  • I could open the links to those concepts and, if I understand them, I could come back and get the one that I wanted
  • If I don't understand the basic concepts, they would also have generational concepts to investigate
  • No one actually needs to create an entire chain of pages, like a teacher in a class, but just edit and existing page and link to the base concepts for it, yet the result is like a course that one can follow up and down
  • It would add context (and thus interest) to Wikipedia, which is now used as a collection of disparate tidbits
  • It would answer the question that I always ask myself when I open an incomprehensible page: what need I know in order to understand this crap?

So now I should put some time aside for fixing Wikipedia.

Thursday 19 March 2015

Change all column default values with a certain value to another value in T-SQL

Just to remember this for future work. I wanted to replace GetDate() default column values with SysUtcDatetime(). This is the script used:
-- declare a string that will hold the actual SQL executed
DECLARE @SQL NVARCHAR(Max) = ''
SELECT @SQL=@SQL+
N'ALTER TABLE ['+t.name+'] DROP CONSTRAINT ['+o.name+'];
ALTER TABLE ['
+t.name+'] ADD DEFAULT SYSUTCDATETIME() FOR ['+c.name+'];
'
-- drop the default value constraint, then add another with SYSUTCDATETIME() as default value
FROM sys.all_columns c -- get the name of the columns
INNER JOIN sys.tables t -- get the name of the tables containing the columns
ON c.object_id=t.object_id
INNER JOIN sys.default_constraints o -- we are only interested in default value constraints
ON c.default_object_id=o.object_id
WHERE o.definition='(getdate())' -- only interested in the columns with getdate() as default value

-- execute generated SQL
EXEC sp_executesql @SQL

Wednesday 18 March 2015

T-SQL: Inconsistent behavior between parameters and XML value

Recently I created a framework for translating JSON requests from a REST API to entities sent to the database. For simple objects, it was very easy, just create an SQL parameter for each property. However, for complex objects - having other objects as properties - this was not a solution. So I used a DataContractSerializer to transform the object to XML, send it as an XML SQL parameter and get the values from it in the stored procedures. Then I noticed date time inconsistencies between the two approaches. What was going on?

Let's start with the code. The DateTime object created from the JSON is a date and time value with a timezone, like 16:00 UTC+1. That is 15:00 in universal time. One you send it as a parameter for a stored procedure, the value received by the stored procedure is 16:00 (the server has the same timezone). In SQL Server, DATETIME and DATETIME2 types don't store timezone information. However, when sent through XML, the value looks like this: 2015-03-09T16:00:0.0000000+01:00. Using SELECT [Time] = T.Item.value('@Time','DATETIME2') FROM @Xml.nodes('//Location/SDO') as T(Item), the value returned is 15:00! You get 16:00+01 if you translate to DATETIMEOFFSET.

So let's recap: When you send a DateTime with timezone offset as an SQL parameter, the value reaching the SQL server is the local time. When you extract a textual value with timezone offset from an XML into a DATETIME, using the .value method, the value you get back is basically the Universal Time.

Solutions? Well, if you are going to use DateTime, you might as well consider that servers and devices are not always in the same timezone. Always translating values to universal time might be a good idea. Another solution is to extract from XML to a DATETIMEOFFSET type, which holds both the datetime and the timezone offset. Converting that value to DATETIME or DATETIME2 removes the timezone (Warning: it does NOT give the local time, unless you are in the same zone as the timezone in the datetimeoffset value).

Friday 13 March 2015

An apology for apologists

I was reading this BBC article a few days ago on Philip Hammond, a British conservative politician, saying terror apologists must share the blame. This comes together nicely with all the recent changes in political stance that push otherwise modern democratic countries towards ideatic extremism. The UK is a prime example. After they invested immense resources into surveilling their own citizens, after they started blocking sites on the Internet, and after their media became more and more xenophobic, now they are moving towards this ... I don't even know how to call it... opinion control. In other words, you are allowed to speak your mind, but only if it is made up in a certain way. Akin to outlawing crazy people from denying the Holocaust, the political discourse is now pushing towards banning all kind of other opinions.

And I just had to write this article to say that this is completely idiotic. People do things not because they heard it somewhere, but because they have a drive to do it. If they are not sure about it, they start talking about it before they commit to action. Simple gagging a point of view - beyond being a very clear violation of the spirit of free speech - only pushes that opinion underground, where only like-minded people will engage in the conversation. Assuming you can quash an opinion just like that, through some legislative method, people who cannot discuss an idea will just implement it directly. The lone-wolf terrorist concept - one that has profusely been used by political media, but proven to be an unfounded myth - will become a self-fulfilling prophecy.

I remember when I was saying that outlawing types of philosophies, like the Nazi one for a classic example, is bad while other would argue using the same example to justify shutting people up. It is a bad thing that, writing these words, I feel vindicated. I shouldn't feel that way, instead I should be proven wrong. When an entire society chooses to close ears (and punish mouths) it should be for a good reason, not something that can predictably be abused later on and extended to ridiculous degrees.

One has to remember that when subscribing to some weird theory, one that is not generally accepted, people are just asking "what if?", an essential question for finding solutions for your problems, for thinking out of the box, for developing into a mature human being. If someone is asking "what if terrorism is good?" there should be a lot of people there to listen to them and argue back and forth until a conclusion is reached, one that in this case seems obvious, but still needs discussing. One could just as well ask "what if the Earth is not in the center of the universe?" - they punished people for that, too.

The principle of free speech as it is understood nowadays is less about freedom to speak and more about the principle of harm: you can say whatever you like, unless that is hurting someone. But we've exaggerated this idea so much, that everything is now considered harmful. This doesn't strengthen, but weakens us. Are we so fragile that we cannot take a few nutcases expressing their opinion? Are we children or are we adults that we must be protected from things we might hear for fear of somehow contaminating us. If you think about it, it is a ridiculous idea that an intelligent educated person would ever become a Nazi or a terrorist just because he stumbles upon some page on the Internet.

I just want to scream to these idiotic governments: "treat me like a human being, not like a mentally challenged child!". So yeah, rant over.

Just a few links from yesterday, all in the same edition of the BBC site:
EU plans new team to tackle cyber-terrorism
Access to blocked sites restored by Reporters Without Borders
UK ISPs block Pirate Bay proxy sites
Banning Tor unwise and infeasible, MPs told

Wednesday 11 March 2015

The News: A User’s Manual, by Alain de Botton

Book cover The News: A User's Manual is a short book that reads like a thesis for improvement of the way news is reported. Why, asks Alain de Botton, is news trying harder to be "accurate" than to tell the entire story so that people can understand and feel it? Basically it is the old Star Trek trope when Spock or Data or Seven of Nine tell the time in milliseconds when all was actually needed for the purpose on hand was how many hours more or less. Just like in there, the news, as seen by the author, does not understand either what the whole story is (lazy reporting) nor what people need (or indeed what the purpose on hand is). Like a global organization struck by autism, it just repeats the same terrifying and intimidating bits of human suffering, only to ignore the good, the humain, the inspiring and the overall effect on the audience.

I will put is clearly: Botton is right. However, he is discussing news from the perspective of human betterment. Just like people eating too much and exercising too little that the news organizations are being paid from, they couldn't suddenly do what is right as opposed to what brings the money or the audience likes to see. Some of the points he makes could, presumably, be used in national televisions, the ones that should be apolitical and tasked towards the education of the audience, not towards making profit. Alas, such televisions do not exist anymore, I think. I believe, however, that the book was never designed as a how-to manual for news organizations, but for the people watching it. Imagining the news style that Botton is describing can make us, the viewers, understand not only why we watch the news as they are, but also what they do to us.

The book is split into several chapters, all of them containing sections which contain at least an introduction, a description, a comparison, an analysis, a damage report and a suggestion for change:
  • Politics
  • World News
  • Economics
  • Celebrity
  • Disaster
  • Consumption
  • Conclusion

What I found interesting was the psychological analysis of why we are attracted to some types of news items and what effect they have on us. I especially liked the comparison between "terrible tragedies" and the original Greek tragedies. According to Botton, telling what happened in 100 "unbiased" words is less engaging or instructive than going deeper and explaining the situation and the motivations of the people that did terrible things. Why, it is so much easier and comfortable to condemn a murderer of children as "sick" than to try to imagine what he has in common with you and in what situation you would snap that horribly. However, that teaches you and educates you more in life.

The Botton line (heh heh) is that without context, any information doesn't mean anything and makes us feel nothing. To overcome this, news makers are showing the most brutal and shocking things that they are allowed to show, just in order to elicit some semblance of interest. Instead, giving us the whole of the story, making us aware of how people from distant places live before stuffing down our throats how they died, might be more memorable and instrumental to make us feel something useful.

I found myself comparing news media to the justice system. There, a trial with no representation and due process is considered a sham. Both sides need to tell their story to the best of possibilities. If every news item is like a trial, its purpose making the audience judge a situation or a purpose, surely the same must be true. I do believe that Botton would have made his point more popular if he would have taken the stance of the lawmaker than the one of the psychologist. On the other hand, that would have deprived me of an instructive book that exposed many of the mechanisms through which the news is making us feel good while causing so much (hopefully) unintentional damage.

Not everybody is happy about his book, especially professional reporters. Here is one review from The Guardian: The News: A User's Manual by Alain de Botton – review

More helpful, here is a video of Alain de Botton himself discussing some points made in the book:

Sunday 8 March 2015

Asteroid Mining 101, by Dr. John S. Lewis

Book cover If you are interested in astronomy and the kind of space science that can be applied now, not in some distant future, this is the book for you. It describes the technical aspects of asteroid mining, an industry that is in its infancy (or should we call it still in the womb?), but is the only thing that can plausibly connect humanity to space. There will be no habitats on Mars, no colonization of the solar system, no interstellar travel - not for humans, not for robots, without the resources contained in asteroids. It is a short book, but filled with information and, as Lewis himself says, You presumably did not buy this book to be hyped by some huckster. If you did, I hope you will be sorely disappointed and not recommend the book to like-minded friends.

Dr. John S. Lewis is the chief scientist for Deep Space Industries, a space mining company that requires a separate blog post just to familiarize people with it. He is a world renowned asteroid resources scientist, with many written papers in the field, and also the author of Rain of Iron and Ice and of Mining the Sky. I hear you may consider these two part of the same series and, thus, you should probably try to get them before you read this book, even if it stands alone nicely.

Asteroid Mining 101 is filled with many pages on geology, minerals and general chemistry. I have to admit it is not what I expected, however true to its title. I thought I would read a little about asteroids, familiarize myself with the general concept outside my general knowledge of it, then read about the DSI's technical designs for spacecraft that would be used for prospecting and mining asteroids. Instead, it is a description of the concept of asteroid mining, followed by deep analysis of the issues that are involved and possible solutions. Reading it, one realizes how far we are from designing robotic miners when we haven't even developed the mining techniques that would work in space. Almost universally, the methods used on Earth rely on either gravity or heavy use of air, water or liquid fuels. It was therefore my first intention to criticize the book for being too geological in nature, but I end up praising it for it.



The book is structured as follows:
  • a very short introduction on the structure of the Solar System and on various spacecraft that can help prospect asteroids
  • a heavy geological description of asteroid composition, mineralogy and origins
  • classification of asteroids, including a very nice list of techniques used to calculate the various characteristics used
  • actual statistics on asteroids in the solar system
  • economical analysis of a space mining based economy
  • actual scenarios for finding, landing on and mining asteroids
  • appendixes with even more detailed information

From these, mineralogy and classification take more than half of the book. The mining scenarios section is small, but understandably so: Lewis tried to make this book as lacking in speculation as possible, and I have to admire him for that. This is not a book to make you dream, it's a book to make you think. This has the downside that there are no discussions on the politics of the matter, with the exception of nuclear fission energy not being politically feasible for spacecraft propulsion. Even if requiring speculation, I would have welcomed a discussion on the possible uses of asteroids as planetary weapons, conflicts in space or even the legal chaos of who owns what and what enforces law. The author is neither a military man, nor a lawyer, so these are subjects for other people.

Several ideas stand out in the book. One of them is that the true valuable resource in space is water. It is abundant and useful for everything from propulsion to radiation shielding and sustaining of life. The so called precious minerals are completely different in space, yet bringing platinum metals to Earth would have a very little profit margin and a very short one, until the market stabilizes on the planet. On the opposite side of the spectrum, nitrogen would be the limiting factor of an industry that could theoretically sustain millions of billions of people, while fissionable materials like uranium or plutonium would be almost missing. Energy has the same problem. In space, solar power would be the main if not the only source of energy, while the types of fuel used on Earth would be either too expensive to use, impossible to produce or irrational to produce (like high energy fuels containing nitrogen). Metals like titanium and aluminum would require too much energy to extract from the stable compounds that they are found in and are of little general use in space. Return on investment cycles would be long in space, maybe longer than the average political cycle. And so on.

Actually, I would say that this is the main idea of the book: how different a space economy would be, from the technical to the administrative. Problems that are insurmountable on Earth are easy in space and the other way around. What we need to make this work is to develop the techniques required, from the ground up (I know that this expression presupposes gravity and a planetary surface, but let's go with it), because out there we need to relearn everything from the beginning. It shows the potential of the asteroids in the solar system, the possibility of expanding the human civilization millions of times its current size, then it presents you with the difficulty of planning all of this from Earth, where everything is different. It is one of the books that demonstrate unequivocally why we need to go out in space and why we need to stay there: we need to begin to "get it".

In a way, and that is my speculative contribution on the subject, it is also a sad book. It makes it obvious how difficult, if not impossible, it is for the average Joe, commuting to work every day, worrying about mortgages and child education options, to understand what awaits us in space. By extension, how impossible is for politicians to do anything about it, even if they understood the concept and wanted to actually do something. Therefore, the need for private initiative is made clear and evident.

You can buy the book from Amazon and both hardback copies and digital downloads are also available for sale on SpaceGear.Rocks