Friday, 31 August 2012

Ship of Fools, by Richard Paul Russo

Book cover Ship of Fools is a sci-fi book written by Richard Paul Russo. It reads a lot like a journal, written in the first person, with little (or badly evoked) emotional involvement or dynamic action. Add to this that the main character is called Bartolomeo and he is on board of a ship with no history and going nowhere in particular, where there is always a struggle between the captain and the bishop and the people of the lower class, and you kind of get the impression you are reading a Spanish crewman ship log adapted to science fiction. The low focus on technology and the way people are thinking and acting increases the feeling that this is something futuristic only by accident, and the reality of it is some feudal world, only milder than one would expect those dark times to have been. Somewhere in the second half of the book the plot veers slightly towards Event Horizon, an opportunity to make some biblical references. Even then, the book is written in the same linear and descriptive way, despite being in the first person.

The title comes from a long existing concept in Western literature, usually depicting a bunch of ridiculous people travelling together, but without an aim, and also characterizing the society from which they came as a whole. However, the book doesn't really feel like a satire and the fact that it won the Philip K. Dick award in 2001 makes me think that maybe I missed something.

Bottom line: An interesting subject, but approached in a manner that I did not enjoy very much. I could empathize with the main character, but only to a point. When actual technical decisions were made, I thought everybody was kind of stupid. Luckily enough, it is not part of any series, it is a standalone book.

Thursday, 30 August 2012

The myth of the almighty inline style in HTML

To my shame, I've lived a long time with the impression that for an HTML element, a style attribute that is written inline always beats any of the CSS rules that apply to that element. That is a fallacy. Here is an example:
<style>
div {
width:100px;
height:100px;
background-color:blue !important;
}
</style>
<div style="background-color:red;"></div>
What do you think the div's color will be? Based on my long standing illusion, the div should be red, as it has that color defined inline, in the style attribute. But that is wrong, the !important keyword forces the CSS rule over the inline styling. The square will actually be blue! And it is not some new implementation branch for non-Internet Explorer browsers, either. It works consistently on all browsers.

Now, you might think that this is some information you absorb, but doesn't really matter. Well, it does. Let me enhance that example and change the width of the div, using the same !important trick:
<style>
div {
width:100px !important;
height:100px;
background-color:blue !important;
}
</style>
<div style="background-color:red;"></div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
$(function() {
// $('div').width(200); // the width remains 100!
// $('div').width('200px'); // the width remains 100!
// $('div')[0].style.width='200px'; // the width remains 100!

// $('div').width('200px !important'); //this is not a valid value for the width parameter! in IE it will even show an error
// $('div').css('width','200px !important'); //this is not a valid value for the width parameter! in IE it will even show an error
// $('div')[0].style.width='200px !important'; //this is not a valid value for the width parameter! in IE it will even show an error

var oldStyle=$('div').attr('style')||'';
$('div').attr('style',oldStyle+';width: 200px !important'); // this is the only thing I found to be working!

});
</script>
As you can notice, the might jQuery failed, setting the width property in style failed, the only solution was to add a string to the style tag and override the !important keyword from the CSS with an inline !important keyword!

Update (via Dan Popa): And here is why it happens: CSS Specificity

Dilbert

I've heard about Dilbert as this corporate satire comic that is very funny. I've avoided it as much as possible, probably because I was afraid it would make fun of my way of life and find it makes valid points. Today, I succumbed to my curiosity and clicked a YouTube Dilbert video.



Conclusion: I am Dilbert...

Monday, 27 August 2012

Neil Armstrong is dead.

Apparently it is the week of eulogies on my blog. Neil Armstrong died on August the 25th. You may remember him: he was the guy that first stepped on the Moon. I didn't know the guy, other people say he was inspiring, a great person and other things like that. A good emotional blog post you can read at the Bad Astronomy site.

But I think that his death, at 82 years of age, is less relevant than the fact we stopped going to the Moon. From the dirty dozen that walked on a space body other than Earth, only 8 remain alive and they are, without exception, born in the early 1930s, so all around 80 years old. Depending on many factors that usually cancel out, these people have around a decade of life left in them, so expect that in 10 years or less we will have no man on Earth that went anywhere else. The death of the last man to have walked on the Moon would be even sadder than Neil's.

That's not only romantically ugly, emotionally wrong, it is plain stupid. It's like we close our senses, humanity as a whole, to the options we have, to the alternatives laid out right in front of us. We act like those retarded tourists that go to an exotic location only once in their life and they return with "Meh! No one spoke English, I didn't have the guts to try the food and the service was crap". Forget the accounting bottom lines and the terribilistic "We gotta stop putting our eggs in a single basket", just think that in a few years we, as the human race, we'll have forgotten what it is like to step on the Moon, the experience gone from our collective memory. We will just sit there, on the bloody couch, counting our money and looking at the picture of the imprint of Neil Amstrong's foot, a simple postcard to replace memories lost.

Sunday, 26 August 2012

Blindsight, by Peter Watts

Yes! Another good sci-fi book. Blindsight is a hard science fiction standalone novel in which, using the idea of contact with an impossibly alien species as a pretext, Peter Watts discusses hard subjects like the future of humanity and its very definition, the nature of conciousness and the difference between intelligence and self awareness. It also features vampires (ugh!), but with a good scientific background and true relation to the plot.

There is no romance in this bleak and autopsic book, where the essence of all the characters gets dissected to complete the tableau of the human race under cold fluorescent lighting. Good stuff! But one gets to expect this from Canadian writers, eh? :)

The other cool reason why you should read the book is that it is free at Watts' site: Blindsight. Enjoy!

Tony Scott died

Of course that when an international celebrity, a man who touched the lives of many, a loved friend and movie person dies, I make it all about me. But you see, I can't not feel guilty, as I believe I am at to blame for Tony Scott's death.

I have long known that I am part of the long tail, that part of humanity that is forever ignored and shunned as a bunch of individually strange mutants with odd tastes that can't appreciate the world and can't be appreciated by the majority of other homo sapiens (or even each other). But it goes much farther and creepier than this.

When I like a restaurant or bar, it closes down immediately. If I think a particular location is quaint and pleasant it is immediately assaulted and raped by supermarket and hotel chains. If I enjoy using a line of bus or tramway, it gets redirected or work starts on it and never ends. If I like a movie, it never gets sequels (or prequels or parallel stories or spin-offs or any kind of remake). If I like a TV series, it promptly gets cancelled, sometimes in mid season even when the rest of the episodes have already been filmed and montaged. And, of course, if I like an actor or a director, they die. It is a fact of life. I liked Tony Scott, I enjoyed his creations, so he had to die.

Funny thing is, I've enjoyed Scott's movie creations without caring that he did the work, Top Gun, Beverly Hills Cop II, Days of Thunder, The Last Boyscout, Enemy of the State, to name a few. I only noticed him in TV series, having worked together with his brother Ridley on some of the best shows there are out there. Even if the plot was about the usual stuff, like police procedure or lawyers or whatever, the shows always had that human dimension that made you feel like you are watching real people living their life. Numb3rs and The Good Wife enter this category. And I said "Tony and Ridley Scott make the best TV shows!". That was my mistake and now Tony is dead.

"Why Tony?", you may ask. There is an answer to this, too. I really, really, really hated what Ridley Scott did to Prometheus, thus ensuring a healthy and long lived franchise and dooming poor Tony.

Now, about Tony Scott and the feelings that his work and his death evoked to normal people, even if I knew anything about it, I couldn't write it better than the guys at The Horror Club. Sorry M'Hael, it was me!

The Legacy of Heorot, by Larry Niven, Jerry Pournelle, and Steven Barnes

The Legacy of Heorot is a good sci-fi book, part of yet another trilogy: Heorot, written by no less than three authors: Larry Niven, Jerry Pournelle, and Steven Barnes. You've heard of Niven by way of Ringworld, the others are no first time writers either, but I have frankly never heard of them.

The book is about a colony of people on the fourth planet of Tau Ceti. They call it Avalon and the colony Camelot, declaring their ideal of an honest equalist society that has the good of the people at heart. But of course, as the title of the series suggests, the plot moves towards the story of Beowulf rather than any round table. In face of doom and disaster, people tend to go through standard phases, starting with denial, while any façade of equality and reason quickly crumbles.

And this above paragraph pretty much details the subject of the book as well as the reason why I was partly disappointed with it. I was afraid that the story would be yet another actualization of the myth of Beowulf, which would have bored me to hell, but it wasn't. Yet it wasn't really a strong psychological or social commentary either. More of an optimistic view of the first human interstellar colony. Like any government or corporation would spend a whole lot of money on a space ship, in order to send it to another planet and then made it a present to the crew of the ship, fire and forget like. (See how I start and finish sentences with "like", I'm pretty rad, huh?) And all the people there, selected by a well designed process, would be nice and intelligent and having no social pathology at all.

But the book is nice enough, regardless of my bleak and neurotic projections. It focuses on the planet's (very simple) ecology and the way the colonists interact with each other and fight for their prize. They have colonized a small island in order to minimize threats, but there is a huge unexplored continent waiting for them, therefore the trilogy. It was nice, though, that the first book is rather standalone. If you choose to read it and you do not want to continue the series, there is no hook at the end, it just satisfactorily finishes all that was started.