Friday, 16 March 2007

Blocking Unwanted Parasites with a Hosts File

Windows has a file called hosts, found in Windows\System32\drivers\etc\hosts, that can contain local domain name to ip conversions. It's like a local DNS service with a text database. That means that if you open the file and write 127.0.0.1 www.microsoft.com then every time you try to access microsoft, the browser will redirect to your local machine, effectively making it unreachable.

You can use this to block some of the sites you don't want your child to access or whatever, but most of all, you can disable the access to sites that are known sources of unwanted ads, spyware, malware, etc. Or, as I did, disable access to sites with online games that you are addicted to :)

You can find an updated hosts file at mvps.org. Backup your previous hosts file, for safety, then overwrite it with this.

Update: If you have a blog on Google's Blogger, you should comment (by adding a # in front of the line) or delete the line of the hosts file relating to service.urchin.com #[Urchin Tracking Module], else you will get some javascript errors when entering Blogger. Or you can just ignore all javascript errors.

Thursday, 15 March 2007

__doPostBack works, WebForm_DoPostBackWithOptions doesn't! Heeelp!

I've seen many a forum and blog entries that look like the title of this entry. I was frantically trying to find the solution for this a few hours ago and found a lot of questions of the same type, most of them abruptly ending into nothing. No solution, only the questions. What was I to do? Debug!

The problem was that buttons with __doPostBack seemed to work and those with WebForm_DoPostBackWithOptions did not. I pressed them and nothing happened.

Debugging the hell out of the two javascript functions (both used by NET 2.0, on who knows what conditions) I realized that the problem was not in the javascript functions! The problem was a false one.

The real problem is in the validators. If you have a validator on a field and the field has some wrong values in it and both field and validators are hidden, the submit will not work and you will not see what the problem is. Let me make this simple: if you have problems with submit buttons that seem not to work, check your validators!

Now, why the field was hidden and its values filled and the validator enabled is a problem, but that I can fix easily. The "Oh, I am so stupid" phenomenon probably stopped a lot of people posting the solution after they found it.

Abarat - Clive Barker

Clive Barker is a man of extraordinary imagination and, while HellRaiser is what people most know him for, I think his "young adult" books are what define him. And by this I don't mean sweaty teenager sex, but wonderful fantasy worlds that also have a tang of darkness and stories that have a conclusion beyond the idiotic morality taught to little children. They are also a bit more actual, without dwelling on feudal or anachronistic features like, say, Harry Potter or Lord of the Rings. I liked "The Thief of Always" and I also enjoy, although not to the same extent, "Abarat".

Abarat is a magical series, much like a darker Alice in Wonderland, with two books currently having been released. The classic "girl enters magical world" is expanded to the point of bursting with the description of the 25 isles of Abarat, one for each hour (including the 25th), each with their own features and crazy-weird inhabitants. Abarat is also a twisted mirror of Earth, with coca-farma conglomerates trying to destroy the magic in the world.

You can find a site at www.thebooksofabarat.com, very nicely done, that teases the imagination with flash animations and excerpts from the books.
I've read a review that compared Abarat to Harry Potter and even declared that it is the writer's alternative to it. I dare say that is completely wrong. The worlds of Clive Barker are about finding your way through your own inner power and imagination, whether you choose the path of Light or of Darkness. Purpose is what defines a Barker hero, not taking sides.

Bottom line, a nice book, clearly well written (I like Barker's style), and the storyline is detailed and well thought of. I may not be in a wonderland mood right now, but it is the best book I've read in the last month. There was an attempt to create a movie based on Abarat schedulled for 2005, but, according to the Wikipedia entry for Abarat, creative differences killed the project.

Monday, 12 March 2007

Son of Avonar - Carol Berg

I enjoyed this book. It is the fantasy story of a medieval land where magic is seen as the most sinful of things, all through the eyes of a woman that falls in love with a magician.

At first, I thought the ideas were nice, as the entire plot reminded me of Berserk , the latest chapters of the manga, and so I upped my expectations a bit too far. Then I realised that, even if the book was written in an even and professional way, I wasn't getting caught into the story. Was it because I couldn't relate to a woman? No, that wasn't it. After a few more uncomfortable pages I realised that the thing missing from the book were true emotional descriptions. The lead character was almost cold, rational as very few women (or any people of that age) would be. The scenes were detailed enough in describing whereabouts or scenery, even facial expressions or human interactions, but no feelings.

I thought to myself "Damn! This is a book as I would write if I started writing one". Funny enough, after I finished the book, the author was described as an American mother of three, who writes books while being a software engineer. I am curious of the percentage of software people that have a lack of emotional vocabulary like I do.

The ending of the book was also slightly disappointing, as I couldn't relate to any of the characters and their actions. The reasons for the story to end like that also eluded me. However, as I wrote in my first sentence, I enjoyed the book, as it was well written. I don't think I will read more of the series.

The Algebraist - Iain M. Banks

Rarely have I had the honor to read such a boring book. It took me forever to finish it, as you can see, only so I can blog about how unreadable it is. It's not like Iain Banks doesn't have the good ideas that make a book great, but he has no idea on how to use them.

The entire book had the feel it was patched together from pieces of text written with completely different moods by different people. The ideas shifted from one to the other without any sense. The science was ludicrous. And worst of all, the ending had that wonderful "huh?" feeling, when all the plot finally ends just as boringly as it has begun.

And all this in a book that talks about the Universe in the far future, with great empires spanning galaxies and fighting epic battles with weird technologies. I appreciate the effort, but not the result. The book seems like something a writer would do and throw away and a publicist would pick up from the garbage and publish.