and has 0 comments
The Dragon Reborn relapses into the problems of the first book in the Wheel of Time series: there are good or bad characters, light and dark and the only true unknown (and most exciting as well) is Lanfear. The rest of the book is how all the characters level up dramatically to the point that none of them can pretend to cling to their small village roots. Rand is the Dragon, Perrin is a wolf, Mat is the reincarnation of a Manetheren hero, the girls are the most powerful girl power users in centuries, etc. If anything, the losers of this book are Loial and the Aes Sedai with their Warders, as it seems none of their long life, experience and training matter in the face of ta'veren-ness.

That doesn't mean that the book is not interesting, quite the opposite, it is certainly more epic, although in the same way the other two were (I am beginning to see a Pattern, heh heh) as the pressure builds and builds towards an ending that feels rushed. It's like sex after too much foreplay: is that it?

The bottom line is that Robert Jordan's series has captured my imagination, with all its clichés and great prophecies and noble heroes. I did hope for something more complex, but then again, life is not like a book and there are level-downs as well. There is still a chance the next book will be as intelligent as it is flamboyant, though.

and has 0 comments
I've finished watching the seven seasons of Star Trek: Voyager and, even if I enjoyed watching it, I also think it was the series with the most potential lost from all of them.

First of all, the show should have been called Star Trek Condescension. Each Star Trek series before it had some obnoxious characters, like Bones in The Original Series, even if he was saved by the clever interactions with his counterpart, Spock, or like Deanna Troi in Next Generation, intrusive and opinionated about just about everything that did not concern her, or like Kira Neris, who always had some cause to fight in the detriment of all her other colleagues on Deep Space 9. It was OK, it part of the concept. Voyager has broken that rule, making just about everybody as annoying as possible.

Top of the list: Captain Janeway, who was not only acting like the headmistress of a high school, placed there by divine powers to have children under her care and control, but who was also a complete hypocrite, changing her views whenever it suited her, but quoting larger than life "directives" whenever she wanted out of something. For all her talk of saving lives, if the show was reality, she would have killed her crew numerous times and would have insured just about every major force in the quadrant was an enemy of the Federation. And the worse part is that her acting was perfect: from the condescending tone of her voice to the raised eyebrows, from the hand on her hip to the dismissive smile, her body language was more obnoxious than anything she could have said.

Second in command Chakotay, a man of native-American origins, would have no problem breaking any rule when his Maki training would surface, only to justify anything by either invoking his spiritual ancestors or spouting truisms while fully inhaling before each sentence. While Janeway's condescension was authoritative, Chakotay's was always thuggish, but just as strong and annoying as his captain's. Also, he was making mistakes almost every time it didn't involve physical activity. Not the best choice for a second in comand.

Neelix deserves a special place in the annals of obnoxiousness, as a rodent like alien who comes on board as the lover of this pixie like beautiful blonde. After suffering more than a season rude and abusive bouts of jealousy from him, we spend the rest watching him intrude in everybody's personal lives from his self appointed position of "moral officer" and later of "ambassador". Only in the last season a Q is fusing his jaws and lips and removes his vocal cords, a humanitarian move who only lasted till a few minutes later. Blessed be the silence, though.

There are more, from the loud mouthed doctor who is "evolving" from very rude to intrusive and almost destroys the ship twice with all the good intentions to the duo B'elanna Torres and Tom Paris, who act so superior towards anybody not like them that they would have undoubtedly made the alpha couple in a high school drama.

A good thing about the series is the design. All the technology is consistent in aspect and apparent functionality from the start to the end of the series. Considering Voyager was produced during amazing technological advancements in television and computers, it was probably an effort not many noticed. The human component, so easily removable via computers and nanotechnology, was preserved during the entire length of the series, maintaining that theatrical feel and enforcing the idea that the sci-fi in the series was just a prop for some larger ideas. Unfortunately, the ideas was not that large, and were mostly human centric and ridiculously optimistic.

About the plot, the show is about a Federation starship stranded in the Delta Quadrant, seventy thousand light years from Earth. The way people travel is the most inconsistent part of the series, as they are always struggling to get home, while the same aliens are attacking recurrently, even with less advanced technology. How could they "ambush" Voyager, if they were left behind?

The holodeck and the holographic doctor were used extensively as a plot crutch, whenever they were out of ideas. Meetings with the Borg are common, even if the results are mind baffling. One of the most disgusting things in the series is the treatment of Seven of Nine, a Borg that is being coerced back to individuality despite numerous declarations that it wants to return to the Collective. But Janeway knows best and all the list of annoying characters above proceed thereafter to piss on the Borg heritage of Seven and insist on developing her "humanity". If Voyager would be watched by the people described in the show, it would undoubtedly be considered crass human propaganda for the Federation.

And still, for all the reliance on Borgs to move the plot on, the technological side of the equation was repeatedly ignored. Seven is part Borg and will remain so for the rest of the series, including nanoprobes in her blood. Yet she does not attempt to assimilate anyone, including enemies, when it would have been the best way of solving some of the problems. Borg technology is added to Voyager, but most often reluctantly and only temporary. Seven never develops cybernetic tools for herself, even after her implants save the ship several times. Also the Borg Collective is presented as a mindless community of interconnected people, but at the end a Queen of the Borg is revealed, who has total control and presents a target and a persistent enemy.

Bottom line, for a technological person as myself, I was almost attracted more to the Borg model than the Federation one. While the words "democracy", "freedom" and "openness" were spouted at every occasion, true freedom of thought was only tolerated on Voyager when the captain agreed. The Borg at least used the individual as a conduit for the general thought. The morality lessons in the series were simplistic and antiquated. Voyager, with the idea of a ship stranded somewhere, with problems that needed solutions with limited resources and lots of ingenuity, could have been a series to open minds. Instead, it force fed US concepts from the 60's.

and has 0 comments

I have to admit, the quality has increased dramatically in both writing and storyline in this second part of the Wheel of Time series. Robert Jordan's The Great Hunt follows our heroes in their quest to heal Mat, deliver the Horn of Valere and escape the endless machinations of the Aes Sedai.

I was saying in the review of the first book, The Eye of the World, that the story was ridiculously black and white, reminiscent of Lord of the Rings. The Great Hunt features good and evil Aes Sedai, sympathetic Darkfriends, political Cairhienians that see every action (or lack thereof) as a move in The Great Game of lords and not less than three new major threats, not counting the Black Aes Sedai, as well as parallel worlds, resurrected heroes and epic battles. So there is a good range of shades of grey, washing away the simplicity with which the series started. The characters gain volume, developing in their own unique ways.

There are some issues, though. Rand is exhibiting wonderful skill and ability exactly when needed, being pretty much clueless most of the time. Women again appear rather one sided: proud, intelligent, manipulative and always in some way of authority over men. The "The wheel spins as the wheel wills" quote is used way too much and the blatant logical hole ignored: if it does, then no one needs to get involved in anything, especially the Aes Sedai. Nynaeve find a new strength and acts more like a Wisdom and less like a scared little girl.

So I am caught up in this. Too interested to start reading the tech book I was planning and too much work at the office to really feel the need to. Let's see how the next book in the series will be.

and has 0 comments
Check out this article. I haven't even read it yet, but the image they present is saying it all. Even someone such as myself, a firm believer in national sovereignty and the right to follow whatever twisted philosophy one chooses as long as it doesn't affect others, can't remain indifferent to it. What you see above and below North Korea are China and South Korea. You can tell North Korea apart, because it is the dark patch.

and has 0 comments
Update February 2016: Tested it on Visual Studio 2015, with the Roslyn compiler, and the problem seems to have vanished.

Here is the now obsolete post:

A class in .Net can have default parameters, with values that are specified in the constructor signature, like this:
public MyClass(int p1,int p2=0) {}

If the class is inheriting from the Attribute class, then one can also specify property values when using it to decorate something, like this:
public class MyTestAttribute:Attribute {
public int P3 { get;set; }
}

[MyTest(P3=2)]
public class MyClass {}

What do you think this code would do?
public class MyTestAttribute:Attribute {
public MyTestAttribute(int p1,int p2=0) {}
public int P3 { get;set; }
}

[MyTest(1,P3=2)]
public class MyClass {}


Well, I tell you what is going to happen. Visual Studio and ReSharper both will see no problem with the syntax, but the compiler will issue an error based on the exception "error CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type", but without specifying any file or line.

My guess is that it is trying to interpret the P3=2 line as an expression to be calculated and passed as the second attribute of the constructor. What I was expecting is to set the default value to the second constructor parameter, then set the property P3. The vagueness of the error points out to a possible bug.

It all started with this site that got stuck in the Google Chrome's DNS cache so that any changes to the Windows/System32/drivers/etc/hosts file were ignored. I didn't want to close all Chrome windows (since the DNS cache is application wide in Chrome), so I googled for an answer. And here it was, a simple url that, typed in the Chrome address bar, would allow me to clear the cache: chrome://net-internals#dns.

But there are a lot more cool things there: testing of failed sites, a log of browser network events, control over open connections and so much more. That got me curious on other cool chrome:// URLs and I found some links listing a lot of them.

I don't have the time to parse all these cool hidden Chrome URLs and review them in this blog entry, so I will just list some links and let you explore the goodness:
Google Chrome’s Full List of Special about: Pages
12 Most Useful Google Chrome Browser chrome:// Commands
About and Chrome URLs

Update: The Chrome url containing all others can be found at chrome://about/.

and has 0 comments
The Eye of the World is the first book in the series called The Wheel of Time, by Robert Jordan. Written in 1983, it is very similar to Lord of the Rings. It features a complex world of nations and races with their own languages and cool sounding names, a battle of good light versus evil dark that is so ridiculously polarized that at first I thought I couldn't finish the book, a party of different people in which the main character is a poor country sheppard boy, a quest that has the goal of saving the world via a long trek of personal transformation.

Actually, if I think about it, it seems almost entirely inspired by Lord of the Rings, with none of the innovations that appeared since playing any effect except maybe The Chronicles of Thomas Covenant the Unbeliever, when describing the Blight. Something that is clearly different in the book is the role of women.

While Tolkien had them placed high on a pedestal, queens and princesses that were supposed to inspire men but not be touched, Jordan presents them as important members of the party, with Moraine, the "wizard", holding most of the authority. Actually, it goes further than that, giving all women characters an almost indomitable ability to influence men. Only one female in the entire book is evil, and that for a very brief period of time, and none of them are weak in any way. It doesn't even matter much that The One Power has two sides, one female and one male, and that the male is tainted by The Dark One. Even if they would have magical power, men are doomed to be ruled by women in The Eye of the World and probably the rest of the books.

The evil Shai'tan is a dark entity with burning eyes and eternal rage, imprisoned yet powerful, corrupting everything he touches, while the power that opposes him is white pure light that heals, purifies and avenges. The only shred of ambiguity comes in the shape of The Children of the Light, a warrior sect dedicated to fight evil, but that are nothing more than pompous gang members that define evil as anything they don't like.

All and all the book was pleasant enough and, being December, I plan on reading at least the next book in the series before I start with a technical one. However, it doesn't come close to most of the books I've read recently. The simple design and clear inspiration is probably the reason why they want to adapt the story to television, now that the likes of Game of Thrones have shown the model successful. If the quality of the books does not improve in time, it may be so that it would be more effective to wait for the films instead of reading the book. Then again, I will make up my mind after I've read more. I have hope.

and has 0 comments
Long time since I've posted a song. I heard this one at a lunch with a friend and then I dug up this rare video of the last performance of Shakespeare's Sister before they split up. Enjoy!



Here is the original video of the song:

and has 0 comments
Coma has finally released a new song. It's completely free to listen and share. Here is the SoundCloud link for it: Un semn. You can also listen to it here.
Coma - Un semn [2011] by COMA-band-official

I wish it weren't such a light piece or that Dan Costea would have added some of his trademark screams in the background at least. I can't but think of Linkin Park, starting with great, powerful songs and continuing with whining in their next album. But being the first piece out, it may be a teaser for what it is to come.

Update:
There is a video for the song, and here it is:

I was trying to access http://localhost/Reports/Page.aspx, in other words an ASP.Net page in the Reports path of the local site. Instead, I was getting a Windows authentication prompt that had no business being there. At first I thought to debug the page, but it wouldn't even get there before I got the authentication prompt. I googled for it, but I didn't get far because I was looking for weird Windows authentication prompts, not for the specific location of my page: the Reports folder. It was stranger yet, as I stopped IIS and the authentication dialog was still appearing!

In the end, a colleague told me the solution: SQL Reporting Services is answering on the local Reports path! I stopped the service and voila! no more authentication prompt. Instead, a Service unavailable 503 error. This article explained things quite clearly. Even if you stop the service, you have to delete the access control list entry for /Reports with the command netsh http delete urlacl url=http://+:80/Reports or, I guess, restart the system after you set the Reporting Services service to Manual or Disabled.

Update: It is even easier to go to Sql Server Configuration Tools (in the Start Menu), run the Reporting Service Configuration Manager, then change the URL for the Report Manager URL to something other than Reports.

But what is this strange Access Control List? You can get a clue by reading about Http.sys API in Windows Vista and above and about Namespace Reservation. Apparently, one can do similar things on Windows Server 2003 and maybe even XP with the Httpcfg utility.

and has 0 comments

This book touches a very uncomfortable subject for me: the mindless, visceral hive mind of the crowd. There is nothing more horrible, I find, that being powerless in front of a mob of people united by only their stupidity and fear. Lord of the Flies is the archetypal book about this subject. It tells the story of a bunch of British kids stranded on a small island without any adult supervision. They create a parody of human society which ultimately fails horribly towards the end.

The book is short, but to the point. Sections of it are almost unbearable to read, not because it features monsters or supernatural creatures, but because you feel deep inside that it is the truth, that these things happen and that they do because of something deep inside each of us.

The only failing of the book, I feel, is that Jack and Roger are portrayed as classical psychopaths and it is clear from the beginning that one cannot empathise with them. A slightly longer story that would have made the effort to make these characters slightly likeable would have had an even deeper impact. In that case, I fear, the book would have become completely unbearable. People need their illusions about the society around them; shattering them completely would not do.

This book is a must read for any student of human psychology and one of the best books to reference at parties to make you look smarter than you are :-) I've actually read the book because I was doing that too much, but had only seen the movie. I wonder if I should get other works from William Golding, since I liked this one so much.

Let's start with an example:
DECLARE @SiteId INT
SELECT @SiteId=isnull(SiteId,0) FROM Orders WHERE OrderID=15
UPDATE Order_Sites SET SiteID=@SiteId


Can you spot the problem? What if SiteID in Order_Sites is not nullable? What if there is no order with OrderId 15?

That's right, when you select into a variable, you must be certain that the query returns any rows, otherwise the variable will not be set at all.

The solution is to add another operation that sets the value correctly. Here are three possible options:
  • Set @SiteId to 0 before the select.
  • Set @SiteId to isnull(@SiteId,0) after the select and simplify the select to not contain the isnull.
  • Use the select as an argument of the isnull operation:
    SET @SiteId= isnull((select SiteId from Master_orders where OrderID=-1),0)
    Yes, you can do that.


Either way, always pay attention to this gotcha in using SQL.

and has 2 comments
"Oh, no! Siderite's blog has been hacked", you will think immediately. People who know me know how I feel about having children, and that is: I don't feel anything. I seem to lack that inner feeling that makes people procreate for no good reason. And while I am at the subject, I do not deny the existence of this feeling in the world and I don't believe most people are like described below, at least I hope so, but it just hit me that so many times, people have said something and meant another. I will elaborate. Stay assured, my blog was not hacked yet.

You know those dreams we have when we are young? We will get rich and famous, we will find true love, we will be the best at what we do, we can do anything if we want, we can quit anytime (but we don't want to), we will always have time to lose weight and go to the gym, etc. We actually believe those things will happen for most of our youth and early adulthood and some of us actually do something about it, while the most just expect it will happen if they wait long enough.

Well, after a while, reality hits home and we understand that we actually cannot do all of those things, maybe none of them and that our life will not get any better than it is on its own. Some people, at this moment in life, start thinking about children. This way they can delay losing hope by passing it on to their children. That's why many parents are disappointed with their offspring, not because they actually thought their children were special, but because they forced themselves to believe it. In the end, they spawn other normal people, just like them.

You may feel that I am too much of an asshole saying these things, even more than usual, but I don't think so. You see, the assholes are people who spontaneously start advising you to have children, like they already have or plan to. When they say that, they are saying "For a moment now, I thought you might be better than me and I felt a little threatened. Have some children, please, so I can feel better about myself". Have you ever heard the one about children "fulfilling you"? Do I look half full to you? My life does have meaning and I am quite happy with it. I don't need children, therefore I am not having any. If I look unhappy, it may be because I still have hopes for myself and I still believe I can do better. I get disappointed in myself because I expect a little more from me.

I had to write this post because the only times I actually considered having children for more than one second was when I was depressed for not doing something as well as I wanted or when not having time to fulfil ALL of my dreams. I just realised that. There was never a content, happy time in my life when the thought ever crossed my mind.

Now I know that alphish or hormonal males and females do naturally feel the need to have children. I understand the overall need for our species to procreate (although, not right now, when we are too many to fart without a human nose having to smell it). I also don't begrudge or disrespect people having children (as long as they keep them out of my face). However, think long and hard before you tell someone to have children. What is actually the reason you are saying that? Aren't you a bit of an asshole, even if it were any of your business?

I had this operation on a Javascript object that was using a complex regular expression to test for something. Usually, when you want to do that, you use the regular expression inline or as a local variable. However, given the complexity of the expression I thought it would be more efficient to cache the object and reuse it anytime.

Now, there are two gotchas when using regular expressions in Javascript. One of them is that if you want to match on a string multiple times, you need to use the global flag. For example the code
var reg=new RegExp('a',''); //the same as: var reg=/a/;
alert('aaa'.replace(reg,'b'));
will alert 'baa', because after the first match and replace, the RegExp object returns from the replace operation. That is why I normally use the global flag on all my regular expressions like this:
var reg=new RegExp('a','g'); //the same as: var reg=/a/g;
alert('aaa'.replace(reg,'b'));
(alerts 'bbb')

The second gotcha is that if you use the global flag, the lastIndex property of the RegExp object remains unchanged for the next match. So a code like this:
var reg=new RegExp('a',''); //same as: /a/;
 
reg.test('aaa');
alert(reg.lastIndex);
 
reg.test('aaa');
alert(reg.lastIndex);
will alert 0 both times. Using the global flag will lead to alerting 1 and 2.

The problem is that the solution to the first gotcha leads to the second like in my case. I used the RegExp object as a field in my object, then I used it repeatedly to test for a pattern in more strings. It would work once, then fail, then work again. Once I removed the global flag, it all worked like a charm.

The moral of the story is to be careful of constructs like _reg.test(input);
when _reg is a global regular expression. It will attempt to match from the index of the last match in any previous string.


Also, in order to use a global RegExp multiple times without redeclaring it every time, one can just manually reset the lastIndex property : reg.lastIndex=0;

Update: Here is a case that was totally weird. Imagine a javascript function that returns an array of strings based on a regular expression match inside a for loop. In FireFox it would return half the number of items that it should have. If one would enter FireBug and place a breakpoint in the loop, the list would be OK! If the breakpoint were to be placed outside the loop, the bug would occur. Here is the code. Try to see what is wrong with it:
types.forEach(function (type) {
if (type && type.name) {
var m = /(\{tag_.*\})/ig.exec(type.name);
// type is tag
if (m && m.length) {
typesDict[type.name] = m[1];
}
}
});
Click here to see the answer

and has 0 comments

I was looking for autobiographies, since I liked quite a few of them lately and I felt like more, and so I got two. One is interesting because it is finally in print after 100 years since the author's death. I am talking about the first volume of Mark Twain's biography. However, I really could not make myself read it: the language was so pompous and the content so lame that I felt pain trying to.

Not so the second book, which seemed even more unlikely for me to like it: THE PLEASURES OF STATISTICS: The Autobiography of Frederick Mosteller, but which I did. It started with a few projects that Fred Mosteller participated in, explaining the day to day concerns and situations of a statistician while working on them. I thought at first that the book is going to be all like this, so after about a third I was about to abandon the read. You see, it was all very interesting from a professional statistician's point of view, but I wanted the more personal viewpoint of the man. And so I got it. Suddenly the book changed pace and went with the early life and education of Mosteller. The end of the book again covered some cases of work, but this time with a personal touch that explained the motivation behind the acts. And finally, the editor's epilogue, written from testimonies of friends and colleagues.

In this review, a Theodore M. Porter argues that the autobiography was flawed, as it covered little of his family life and couldn't reconcile the different viewpoints that appeared in the book, like the scientific and personal. But I disagree. The autobiography was unfinished and I guess the editor did the best he could with what he had, but it couldn't have been a lot different from what Mosteller himself intended. You start with the actual work: statistics, explained in layman's terms, then you continue with the actual man, explaining the origins and education, then you get back to statistics, but examining the work from the personal viewpoint of the man described. Yes, he could have written about his family more, but it wouldn't have been about statistics. The little he does write about his wife is about how supportive she was throughout his career. And yes, the tone of the book is a bit clinical, but this is how the writer actually thought like; he was a scientist in the true sense of the word and I liked this book exactly because it made me understand how such a man thinks and feels.

Even more than the structure of the book and the insight in the mind of a conscientious and brilliant scientist what I liked most is the peek at the world in the middle of the 20th century and how strikingly different it was from what we see today. The concerns of a teacher towards the best method to get his students to understand and like the subject, the way people were getting together to solve problems and worked for years on a book or bunch of science papers, the way academia was also supportive, not only political, and most of all, to see how people can be both brilliant and empathic, both clinical in science and warm in person.

I wouldn't recommend this book to everyone. I had a hard time reading it to the end and paying attention to every bit. Nor should one study it like a school manual, because as far as I see, the book is about a man's soul and you only have to understand and feel that. Whether it is because of my autobiography fad or because I resonated with the man or for some other reason, the bottom line is that I enjoyed reading the book. Maybe you will too.