and has 0 comments
This book is odd enough. Finally finished reading it a few days ago, I remained with the feeling of not getting it. What the hell? A guy is turned into a bug, then his family tries to take care of him, but after a while they just stop being nice to the poor insect and it finally dies.

But then, thinking about it, I noticed the symbols in the book. It is all about a dark hopeless capitalism as in Kafka's day, one that can only be coped with by roaches. Working continuously while being at the whim of whatever greedy employer you have, supporting family and servants and a bigger house than needed because you don't dare have a spine. In this sad little story, the main character did not once revolt against the situation in which he was. Actually, I am wrong, he did revolt against some trivial things like taking a picture from his room or wanting to see his sister playing the violin, thus exiting the room where he was confined.

The book itself ends with his family feeling relief of getting rid of the big roach in their house and having a better life because each of the members had to take a job to get through this.

Conclusion: this didn't feel like a very good book, but it was good enough. It is also a classic, this being the reason for reading it. So, it's worth a read, if you can take the time to think about it.

and has 0 comments
Yes! At popular demand and enormous pressure, the World Sucks series is back!
Todays episode: holidays! The word itself comes from holly and day, but in the meanwhile it collapsed into this one word that has nothing holly in it anymore. It's all about buying stuff, planning vacations in the "season" when all prices are inflated and all nice places are assaulted by noisy tourists (like yourself) which makes them less than nice, getting job time off in the same damn time with everybody else (and being considered not a team player if you want to work while all the others go away) and, last but not least, all kind of deities mixed together with local folklore to create a special kind of brand for each particular miserable disgusting day of each bloody holiday.

Accept it, people, holidays suck! It's this type of awful planned and allowed liberations that show the true nature of slavery. Holidays have become so much embedded in our culture, that we measure our own time and pleasure by them. If there is a holiday, you must enjoy it! If you don't you are a weirdo and if it ends you must stop enjoying anything. Get back to work, you lazy bum! I see people that expect those few free days from work like a child awaits the cndy from the sweets dispencer. What about the other days?! They are also yours. You can decide what to do with them. You can stop feeling miserable in any given day, you can miss on office work and stay in bed all day any time. I completely understand that some employers might not agree with this and even some self employed work alcoholics that think the world spins around them might growl at me from their dark den, but that doesn't make them right!

Holidays suck because they take away freedom, in it's most basic sense. You are allowed to not go to work, you are allowed to buy things that in the middle of the year you wouldn't even consider buying (ask yourself why?) and you are allowed to spend it with your family and friends. What? You don't have family and friends any other day? What if you don't want to spend your free time with family and friends? What if you just want to be left alone, to make a cool software program, play a game for 24 hours straight or watch the entire third season of Battlestar Galactica continuously from start to end? Then you clearly don't have the holiday spirit. Well, fuck the holiday spirit! It sucks!

and has 0 comments
Wee! I've received a PDA from my bestest of uncles (which will soon work for Google and I am so proud of him). Ok, back to adult mode. I've used the newly acquired PDA to read books! I've started Metamorphosis by Kafka, but the file was incomplete by accident, so I ended up reading The Martian Child.
It's a small text, 80KB in length, and it's not really sci-fi, but it's nice. It's the kind of warm, easy to read text suited for bus rides. It involves a sci-fi writer adopting a child who says he is a Martian. During the entire text, the author struggles with the eerie feeling that the child was actually right, even if there is no way to prove it.
It was nice enough.

Sometimes, when you use ASP.Net 2.0 with MasterPages, UserControls and dynamic loading like LoadControl, you get a silly error: Unable to cast object of type 'X' to type 'X' where X=X. Of course, it is a versioning problem. Some of these errors appear in the VS2005 designer, when the designer uses an older version of a library, but also when trying to open the web page in a browser.

Microsoft has released a fix for this: http://support.microsoft.com/kb/915782 , but, to quote the same source: "This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft .NET Framework 2.0 service pack that contains this hotfix.". So you risk screwing things up.

The issue seems to be mostly a developer problem. That means that during programming, you get this error when you keep changing stuff in the project. A client might get this error if an update of the site created this problem. The iisreset utility won't work. Recompiling locally and reupdating the site usually solves the issue.

and has 0 comments
Another suspected NASA hacker indicted tells the story of a Romanian hacker who entered 150 NASA computers, then made them display messages boasting the hack. Of course, the US government immediately took initiative and fixed all their computer security holes, suing the corporations that made the buggy software sued the Romanian hacker for "conspiracy and nine counts of computer intrusion", mounting up to 54 years in prison, if found guilty on all charges. I won't even go there. It is just ridiculous. A few years ago, an American soldier killed a man in a traffic accident and he was immediately flown back to the States, where they found him guilty of a misdemeanour and he didn't even do jail time. Read again he KILLED a man.

But there is also some justice in the world: U.S. marine sentenced to 40 years for rape in Philippines. Now, of course, the poor guy didn't do anything as serious as hacking into a computer and boasting that he did it, so he gets only 40 years.

and has 0 comments
A couple of weeks ago I posted this: Bush in Space. Now I come back with a few nice articles that show what the future of space is likely to be. Or not to be.

First of all, a news article from May 2006 US seeks laser to shoot down satellites talks about a "secret" U.S. project that uses lasers to shoot down "enemy" satellites. Considering the ability of most nations to put satellites in orbit, I can only conclude that they mean Chinese, Indian, Japanese, Russian or European satellites. Probably, the Chinese thought the same thing, and here is where this article: China Attempted To Blind U.S. Satellites With Laser comes in. It talks about the Chinese trying to shoot down (or at least blind them considerably) U.S. satellites spying on them. This story was "dug" here. You can see in the article that the US already plan for a "constellation" of satellites to replace the vulnerable spy satallites they already have in place.

Now, most comments on this are usually either moronically nationalistic, either uselessly anti-American. However, there are people that have actually put thought into this. How come the US is augmenting this "Cold War" with China, when they have such a lucrative economic bond. Is it because they see a more business oriented (read democratic) China as a more maleable one? A good consumer market just ripe for the US culture? Or is it because they actually fear a democratic China, as a very serious competitor. Most analysts observe that placing and defending stuff in space is way harder than destroying stuff in space. Even lasers work in space, but low tech solutions like plain old rubble would work just as well. This is described as asymmetric warfare. When even the little guy can fight back.

But what does all this mean? The US have all but openly dismissed the ISS. The only science projects that they do on the station are related to the human habitation of space, which leads me to believe they either plan on colonising the Moon or even Mars (a man can hope) or they just don't care about space any more than their precious spy satellites. How does the entire "teritory" concept work in space? How can you attack in space and not get into a ground war at the same time? These are questions about things one might think do not affect us, but they do. From weather to global positioning, from TV to the Internetand the telephone, they all come through space. You have to imagine a world where space wars are common and plan ahead against it. We cannot color the sky, we can't afford to.

and has 0 comments
I've just finished reading this book, in Romanian translation, and I found it nicely written, but not exactly my type of book. For me, art needs to draw you into atmosphere and conclusions, not to be understood only if you make the effort to draw the conclusions yourself. Yes, I am lazy, but don't get me wrong, I like art. It's just that art is supposed to communicate. I may recite a beautiful poem in Romanian, but if my audience is English, it wouldn't do any good.
So my review on this book is as follows: it is well written, freely written (I can sense throughout the book that Murakami has an open mind, not clogged by clichees and prejudice), it draws you into the atmosphere. But there is where it stops. I know there are deeper meanings in the things that happen throughout the book, but they are not properly explained. I can draw beautiful conclusions and see very deep things, but it would be my merit for making the effort and looking deep, not the writer's. And I wouldn't be sure that it's what the writer intended telling in the first place.
Read it if you are into atmospheric books :D and if you like dark, philosophical discussions.

and has 2 comments
This article is obsolete, a better version of the algorithm has been published: Sift3

While researching different ways of measuring the distance between two strings, or how different they are, I've found of course the Levenstein algorithm. The problem with it is that it is slow. Searching more, I've seen some algorithms that seemed fast, but I didn't have the time or brain power to understand them. So I've devised my own algorithm, called SIFT. You might think the name comes from Siderite's Intelligent and Fast Technique, but it comes from the English word 'sift'. :)
How does it work? Well, the common scenario in comparing strings is that someone made a mistake, a typo. So in principle, the two strings should be very similar in order to be worth comparing them. So what I do is this:

foreach phase
remove identical overlapping characters
shake strings
return number of shakes + the length of the longest string between the two.

There is an optimisation towards the safe side: if the sift similarity is big enough, perform the constly Levenstein distance.

Ok, it might not be so clear, let's take an example:
INTERESTING
INFORMATIVE

Step 1: remove all identical overlapping characters (sift)
TEESNG
FOMAVE

Now we have smaller words to check, let's suppose there was a typo, that means that part of the one word is offset with one or maybe two characters from the other. So we move them a bit, that's a 'shake'.

Step 2: shake
TEESNG
[]FOMAVE

Oops, no overlapping characters. We do this one or two times more and there is no result, so...

Step 3: return result
MaxLength(TEESNG, FOMAVE)=6

There you have it. The sifting algorithm, because it resembles sifting grain.

Not satisfied with such a simple example? Let's take another:
Click here

Tests have shown it to be pretty close to Levenstein, at least in the cases that matter, while being substantially faster.

and has 0 comments
Long story short: the BackgroundWorker object. Available in .NET 2.0
This is a Microsoft tutorial on using BackgroundWorker:
How to: Run an Operation in the Background
This is an older and more Windows Forms basic tutorial on multithreading:
Safe, Simple Multithreading in Windows Forms, Part 1
Safe, Simple Multithreading in Windows Forms, Part 2

Details:
BackgroundWorker has the DoWork, ProgressChanged, RunWorkerCompleted, and Disposed events. You need to assign at least one method for DoWork and one for RunWorkerCompleted, then run
bw.RunWorkerAsync(obj);
The DoWork method should do something like
e.Result=BackgroundOperation(obj);
while the RunWorkerCompleted method should do anything related to the GUI. There is also a CancelAsync() method, to try to stop a background operation.

Also, here is an article about a possible bug in BackgroundWorker, but I haven't replicated it on my computer.

and has 0 comments
According to Wikipedia, dink, can mean a lot of things, ranging from small boats to small penises. A dink is also a creature in the SpaceBalls parody of Star Wars. But is seems that the main use of this word right now is for "Double Income No Kids". That's me! Well, I have a cat, but he doesn't generate any income. You can also find this particular demographic group called DINKY, which is a more dynamic acronym that takes into the consideration the future possibility of offspring(Y=yet). The Americans seem to prefer Dink, while the UK and their former colonies Dinky.

Apparently being a dink means that one is part of a high-earning couple who choose not to have children and are therefore able to afford a more expensive consumer lifestyle. A dink is considered a lot of times as being also a yuppie, or Young Urban Professional, with pejorative connotations of selfishness, materialism, and superficiality.

So, apparently, I should :

  • generate an income (checked)

  • have a mate (checked)

  • the mate should also generate income (checked)

  • both generated incomes should be high (yeah, right)

  • selfish (checked)

  • materialist (not really)

  • superficial (yes!)



So, I have demonstrated creating by oneself a Cosmopolitan test by using Wikipedia. Are you a dink? How dinky are you? Take the test! :D

There are 726 articles on Google when you search "gridview thead". Most of them, and certainly all the first ones, talk about not being able to render thead, tbody and tfoot elements for NET 2.0 table based controls. But it's not so!

Each table row has a property called TableSection. If you set it to TableRowSection.TableHeader, TableBody or TableFooter, the specific tags will be created. Let me show a quick example of creating a THEAD element in a gridview:
gridView.HeaderRow.TableSection=TableRowSection.TableHeader;

And that's it. This kind of behaviour works for the Table WebControl and everything that derives from it or uses it to render itself.
However, the rendering of these elements inside the Table control is done simply with writer.RenderBeginTag(HtmlTextWriterTag.Thead), which gives no one the ability to change from .NET code the attributes of those sections. You can't have it all! You can use CSS, though. ex:
.tableClass thead {
position:relative;
}

and has 0 comments
In 2001, July, a strange phenomenon in the form of red rain occured in southern India. While the official explanation of this is that desert dust has been brought by winds and brought down by rain, Dr. Godfrey Louis, a proffesor of physics for the Cochin University of Science and Technology thinks otherwise: it's all about alien microbes that arrived here by riding a comet.

The story might seem a bit far fetched, but even BBC News wrote about it. And this guy released a science paper about it after what appears to be five years of study. Take a minute to read it, it's only 18 pages long. What seems odd to me is that, even if he maintains that the red rain particles are biological in nature, he doesn't mention anything about reproduction, nor of any attempt to revive them.

Anyway, it seemed interesting enough to blog about it. There is a more down to Earth and detailed article about it in Wikipedia. You can also find here is the transcript of a news report together with animations that talks about Cardiff University scientists confirming the presence of some sort of DNA in the seemlessly devoid of nucleus cells.

Usually, when I decide to blog on something, I do the testing and researching and installing first, then blog about it. But now I intend to use this cool site:
http://tredosoft.com/Multiple_IE
which boasts with installing all IE versions since 3.0 (oh, beloved 3.0) on the same computer without any problems. Since I am not a trusty guy, I blog about it before, then, if no one ever hears from me again, it means that no browser on any computer worked anymore after this :)

Well, without further ado, let me proceed :-SS
Extra info: http://www.positioniseverything.net/articles/multiIE.html

Step 1: Installing IE7.
Of course I had to validate my copy of Windows to download it, then I had to download all updates (even if I went to Windows Update right before installing IE7), then wait until it searched my computer for malicious software, then installing everything. You can't imagine a smoother installer. It just tells you to wait and does everything in the background, showing you meaningless text labels, a cool progress bar and, of course, asking you to close everything before and restart Windows after the installation.
But it worked, and I am not writing this from Firefox :)

Step 2: Installing multiple-ie-setup.exe
Wow! It took around 1 minute to install everything. Of course, not everything is going as smoothly as planned. First of all, I can't see Blogger (and suposedly not any other cookie using site) in IE6.0. Then, it redirects me to a nocookies.html files that doesn't exist :-/ But that's a Blogger issue. The Options menu in IE6.0 is actually the IE7.0 menu and the settings for cookies cannot be overriden. Actually, you can, but the settings won't save.
After looking at the TrendoSoft site, I've noticed that this bug is considered solved, even if some of the people seem to continue to have problems. So I've tested more throughly. Session variables seems to be saved, but Blogger continues to take me to the nocookies page. Also, AjaxPro, the ajax library I am using, doesn't seem to work with IE 6.0.

All in all it seems a pretty functional program. However, the type of sites that I am building have certain characteristics that seem not to work with it. I will try to log on TrendoSoft and get the problem fixed, but I guess Yousif did the best he could so far and resolving every issue I have will be hard if not impossible.

Amirthalingam Prasanna's article about the transactional model in NET 2.0.

As far as I understand, the old declarative ADO.NET Begin/RollBack/CommitTransaction model has become obsolete and a new TransactionScope model is used in NET 2.0. You have to add the System.Transactions.dll file to your references.

Basically, the C# code is like this:

using (TransactionScope scope=new TransactionScope
(scopeOption,transactionOptions,interopOption)) {
// do database ops

// if everything is alright
scope.Complete();
}


scopeOption is an enum of type TransactionScopeOption, with the options Required (requires a transaction and uses if there is already on open), RequiresNew (always opens a new transaction), Suppress (don't use a transaction, even if one is open)

transactionOptions is of type TransactionOptions which has two interesting properties: IsolationLevel and Timeout.

interopOption is an enum of type EnterpriseServicesInteropOption and specifies how distributed transactions interact with COM+ transactions.

But what about the old NET1.1 framework? Doesn't it have something like that? Here comes Alexander Shirshov with help:
TransactionScope in .NET 1.1

Release announcement

NET 3.0 is NOT working on dotNET 3.0 or C# 3.0. It's just the old Windows Communication Foundation, Windows Presentation Foundation, Windows Workflow Foundation and Windows Cardspace into one package.

It is optimised and designed mostly for Windows Vista though and be sure you uninstall any CTP versions before installing this one.

The online documentation for the Windows SDK for Vista RC1 and the .NET Framework 3.0 is also now available.Here are the direct links to the documentation for the .NET Framework 3.0 technologies: