Sunday, May 31, 2009

Using Prism to create a WPF/Silverlight modular application

Tomorrow I start work on a WPF application that is supposed to be as modular as possible. Since I know almost nothing about WPF or modular applications, I started researching a little bit how it should be done. Basically I found only two ways I cared to expand my research on: Prism (patterns & practices Composite Application Guidance for WPF and Silverlight) and MEF (Managed Extensibility Framework).

Unfortunately I've only had time to do some Prism, although MEF seems to be the way to go. First of all it is a general framework, not limited to WPF/Silverlight and secondly it is used in the new Visual Studio 2010 release. What is amazing is that both frameworks come as freely available opensource.

Ok, back on Prism. The concepts are simple enough, although it takes a while to "get" the way to work with them. Basically you start with:
  • a Bootstrapper class - it initializes the Shell and the Catalog
  • a Shell - a visual frame where all the modules will be shown
  • a Module Catalog - a class that determines which modules will be loaded
  • an Inversion of Control Container - class that will determine, through Reflection usually, how to initialize the classes and what parameters they receive
  • a RegionManager - class that will connect views with Regions, empty placeholders where views are supposed to be shown
  • an EventAggregator - a class that is used to publish events or subscribe to events without referencing the objects that need to do that


Easy right? I don't even need to say more. But just in case you don't have a four digit IQ, better watch this four part video walkthrough:
Creating a modular application using Prism V2 - part 1
Creating a modular application using Prism V2 - part 2
Creating a modular application using Prism V2 - part 3
Creating a modular application using Prism V2 - part 4.

I did try to take the WPF Hands on Labs project and mold it with Prism and it partially worked. The problem I had was with the navigation controls. These work as a web application, where you call the XAML and it has to be a file somewhere, and you have events for the calling and returning from those "pages". I could find no way to encapsulate them so I could build no modules out of them and the whole thing collapsed.

So, for a quick walkthrough on using Prism with WPF.
Creating the core:
  1. create a new WPF application project
  2. reference the Prism libraries
  3. create the Bootstrapper class by inheriting UnityBottstrapper that will determine the Shell (a WPF window class) and set it as the application MainWindow, as well as create the type of ModuleCatalog (either take a default one or inherit one from IModuleCatalog) you want
  4. create the layout of the Shell and add region names to the controls you want to host the loaded modules (example <ContentControl Grid.Row="0" Margin="2" Regions:RegionManager.RegionName="SearchRegion"/>
.

Creating a module:
  1. create a new library project
  2. add a class that inherits IModule
  3. the constructor of the IModule can have different parameters, like an IRegionManager, an IUnityContainer, an IEventAggregator and any other types that have been registered in the container (I know it hasn't been initialized in the core, the catalog takes care of that). The IoC container will make sure the parameters are instantiated and passed to the module
  4. register views with regions and any additional types with the IoC container in the Initialize method of the module
  5. create view classes - WPF controls that have nothing except the graphical layout. Any value displayed, any command bound, any color and any style are bound to the default DataContext. The views will receive a view model class as a constructor parameter which they will set as their DataContext
  6. create the view model classes - they also can have any types in the contructor as long as they are registered with the IoC container, stuff like the eventAggregator or a data service or other class that provides the data in the view model.
  7. provide all the information needed in the view as public properties in the view model so that they can be bound
  8. subscribe or publish events with the event aggregator


As you can see, most of the work is done by the modules, as it should be. They are both communicating and displaying data using the event aggregator and the binding mechanisms of WPF. There are some differences between how WPF and Silverlight approach some issues. The Prism library brings some classes to complement the subset of functionality in Silverlight that are not needed in WPF. However, one can still use those for WPF applications, making a transition from WPF to Silverlight or a mixed project more easily maintained.

The video walkthrough (as well as my own text summary) are based on the rather new Model-View-ViewModel pattern, which many people call a flavour of MVC. It was created specifically for WPF/Silverlight in order to separate behaviour from user interface.

Expect more on this as soon as I unravel it myself.

Contagious by Scott Sigler

Book picture
A while ago I was writing about the novel Infected, a sci-fi thriller written by Scott Sigler. In it, an automated alien probe was using biological reconstruction to create a portal for unspeakable (and not described) evil that awaited on the other side. Alien probes being as they are, the operation failed, but not permanently, since the probe remained undiscovered and ready to plan more mayhem.

Enter Contagious, Sigler's latest book, also freely available in weekly installments on his personal blog in both MP3 and PDF versions. Is the guy too nice or what? Today the final episode was released and I can finally comment on the book.

It is clearly a better book than Infected. Not by too much, but definitely more intense. It's like Aliens to the Alien film, only for Infected :) The probe is logically doing all kind of stupid stuff, including duplicating part of his functionality in the brain of a little girl. I mean, we humans have enough trouble as it is with girls, be them small or grown up, albeit the alien probe had no idea I suppose. The US centric approach was kept, there are more explosions, lots of killing, contagious yet centralised alien organisms... in other words, a decent sequel. The only thing I couldn't really get is the father-son relationship between Perry and Dew. Couldn't believe that for a moment, although it may be my fault.

All in all I read all chapters with pleasure, anxiously waiting for the next episode. It would make a nice manga :) I can only thank mr. Sigler for allowing me to read his book without feeling like a thief getting it through a file sharing service.

So, is humanity doomed in this one? Well, yeah... I mean, we still have girls... and besides, I can't possible spoil the ending now, can I? Rest assured that there will be a third book and our favourite aliens may still get rid of the human infestation and bring the love of God on our planet. Hmm, why did I say that? My tongue feels funny, too.

Thursday, May 28, 2009

Wednesday, May 27, 2009

Updating your Entity Framework EDMX model

Well, you might laugh out loud when you read this, but it is an achievement for me. I wanted to update a table (table A) which had a connection to another table (table B) through a many to many table (table A2B). I had changed A2B to link A to a new table C. I wanted to reflect that change in my Entity Model.

So the first step was to right click on the model and do an "Update Model from Database". Then went through all the steps and clicked Finish. Now entity A has both a collection of Bs and a collection of Cs. I wanted to delete the B collection but, to my chagrin, no delete option was available.

The epiphany came when I managed to select the graphical link from entity A to entity B. The link has the delete option! Which, I have to admit, does make sense. So whenever you want to remove an association between entities... well, select the association and delete it, not the entity properties.

Monday, May 25, 2009

LinqKit - a Linq library for power users

I was trying to do something that is usually a drag: create a query with variable parameters. Something like Google search, where each query has a number of words and you want to search for each of them. How can one do this with Linq? More than that, Linq to Entities, which is pretty much making my life hell nowadays.

The idea would be to start with a IQueryable object and keep adding queries to it. This isn't so bad when you want to do an AND operation between your individual query strings.
var dc=new MyEntities();
var content=dc.Content;
foreach (var filter in filters) content=content.Where(c=>c.Text.Contains(s));


But what if you want to do an OR operation? Then you would want to be able to add stuff to the lambda inside a singe Where method. I won't get into the details, rather give you a link. I am not an expert on this myself, so it would be pointless. The more important thing is that you can do this a lot easier by using a library called LinqKit, which adds some very useful extension methods for Linq, enabling you to dynamically create queries, lambdas, etc.

There are other 'lighter' versions of this method on the Internet, unfortunately most of them are usable only with Linq to SQL, not the Entity Framework. For example I've read an interesting blog entry about this, tried the code, and got an ugly error: "The LINQ expression node type 'Invoke' is not supported in LINQ to Entities". LinqKit also did this in its earlier versions, but the Albahari brothers fixed it. So, as far as I can see, I recommend this library for real life linq composition.

Thursday, May 21, 2009

Internet Explorer 8 is driving me crazy!

Update: after a ton of searching, I found people that had the same problem as I did. It seems the culprit was Google Friends Connect. So sorry if you cannot "Follow me" anymore, I just removed the offending widget. Now the chat and the feedjit list and the shareit button work on IE8 as well. Maybe I can fix it somehow, but until then...

Today, out of the blue, without me changing anything in the blog or making any update, I started to get a lot of weird browser errors when viewing the blog with Internet Explorer 8. Things like 'Could not complete the operation due to error 800a03e8' and 'Unable to modify the parent container element before the child element is closed (KB927917)'.

Due to this (as yet unexplained issue) I have disabled the "share it" button on each post and the Jabbify and Feedjit widgets for anything that implements document.documentMode (i.e. Internet Explorer 8). I am sorry for the inconvenience. I will try to solve the issue, somehow.

I have determined that these weird errors are caused by trying to inject through javascript elements in the page before the page has finished loading. I have tried to delay the loading of these scripts until the page has rendered completely, but since they are external js files from various third parties, I have been unsuccesful. I will contact the various parties maybe they can change their js code, although I am not hopeful.

Sunday, May 17, 2009

TV Series I have been watching - part 5

I haven't watched too many movies recently because I've mostly switched to TV series. They're more comfortable as they last under one hour, I don't have to waste a lot of time negotiating with my wife which film to see and they're regular. Bottom line, they're like soap operas for old people. And I am, inevitably, getting old. There should be a whole blog post about that, though, so back to the subject at hand: the list of TV series I have been watching.

This is a bit depressing, almost everything I have been watching is either at the end of the season or the end of the series. The economic crisis and everything, I suppose, or maybe people have finally started to move off TVs and switch to computers, as I have, and the income for any TV production has decreased dramatically.

So Stargate, both SG1 and Atlantis, has finally ended. A new Stargate Universe series in on the way, something a little darker, so something like the Deep Space Nine of the Stargate franchise. That should probably be the best series, and yet I predict the worse TV ratings. And that's because people are morons. Not to mention that at least a quarter of the original Stargate fans (those that weren't in the gun battles) were watching the series because of the green scenery on alien worlds.

Battlestar Galactica 2003. A brilliant reinvention of the old BSG concept, with a fantastic first season, faltering second season and abysmal third and forth seasons. This series has ended as well, and in the worse possible way: "God did it!". There is a spin off prequel, though, called Caprica. The pilot was released already and it was decent enough, although the religious crap is there from the very beginning.

Doctor Who 2005. Another remake of an old classic. Weird and ... weird. I can't stop watching it, but I also can't say why I do. It's a sci-fi, supposedly, and it's British :). Not to mention Christopher Eccleston played as the doctor for the first season, accompanied by beautiful Billie Piper as the female sidekick. This series has not ended, but it is on hiatus, one that will only end next year :(

And since I mentioned sexy Billie Piper, here is a non sci-fi series for you: Secret Diary of a Call Girl, where she is a call girl. Based on a book written by the infamous Belle de Jour, it is funny, honest and not so full of bullshit. And it's British :) Ok, enough with the British smiley, but you have to admit, being the second class citizen as TV series are concerned makes room for a lot of ingenuity and originality. The series has two seasons already and a third on the way, after Billie recovers from her pregnancy.

Eureka. Another sci-fi I am watching only because it is sci-fi. A wonderful concept, where a small village is actually a think tank of all the most brilliant scientists America has to offer. Of course, this would have been a fantastic show if made by the Russians. But being as it is, it is mostly a comedy, with the science put there only as comic prop. The say a fourth season is planned for mid 2009, but with TV series dropping like flies, who know.

Regenesis. Canadian show. Had 5 seasons then it died. Interesting topic, about an international team tasked to prevent and fight off disease outbreaks. It was pretty nice in the beginning, then it went all sci-fi and then it just collapsed. Think of it as 'Doctor House works at the CDC'. Too bad they had to abandon all pretense of reality. As we can see, disease outbreaks are as real and present as they can be these days.

And speaking of House MD, I am watching it, too. Only this time it's all because of inertia. My wife likes it, and I prefer it to romantic comedies. With the fifth season ending with House being taken to a psychiatric hospital, who knows if there will even be a sixth season. The medicine was gone from the show a long time ago, anyway.

Jericho. The US is nuked. And not just once, but a nuke in every major city. What will the average small town American do in a time of chaos and lawlessness? Great concept and a great first half season. Then it all went south. It was still decent, although infected with the Lost bug, when they cancelled the show. Fans were outraged, media companies did not care. As usual. And they wonder why they are losing money and audience like the Titanic took on water.

Numb3rs. Started great and it is still decent at the end of the fifth season. I will continue to watch it, even if the math has gone from it and it basically is now a police procedural series. What I do like about it is that the dynamic of the characters is very well designed. People really are people in the show, not just cardboard characters. It could turn out to be a show about nothing, and I would still watch it. Good job, Scott brothers!

Lost. This is a show I hate with all my heart. I am not watching it, my wife is, enough said it starts with some people crashing on a deserted island and now people die and get resurrected from episode to episode. J. J. Abrams, I hope you die a quick death and roast in hell forever! This horrible thing has reached the end of the fifth season and people still want more, so it will probably get to season six. Meanwhile, all shows have begun having pseudo mystical crap mixed in with simple scenarios and having big booming sounds whenever some crisis of absolutely no magnitude is born. Lost has invented the sound effects for dramas just as some show invented laugh-over for comedies.

Grey's Anatomy. Beautiful looking doctors that are always in some crisis or another, all of them emotional, while trying to avoid showing anything about actual medicine. Wife watches it, I stay away. Season five just ended and the show is going strong.

Private Practice. A Grey's Anatomy spin-off!! Second season just ended.

Ugly Betty. After three seasons of tortuous mental ineptitude, even my wife can't watch that crap anymore. That doesn't mean it is not high in the ratings.

Prison Break. I actually watched the first season and I thought it was nice. I could barely watch the second season and somewhere in the middle I just stopped. It's a show about absolutely nothing. Fourth season just ended (or is about to).

Criminal Minds. This is a police procedural about a crime unit tasked to profile serial killers and find them. It shows at least in principle how the mind of the killer works and it is not solely focused on the law enforcement agency. Most episodes are just watchable, but some are really nice and make everything worthwhile. The last good episode was about a guy killing people in red cars because his wife was killed in an accident involving a red car. By the end of the series we find out that the killer was driving the red car at the time and he suppressed the memory.

Terminator - The Sarah Connor Chronicles. The Terminator has evolved from hunky Schwarzie to liquid Robert Patrick to manipulative bitch Kristanna Loken to teenage girl Summer Glau. Lucky for us, the new Terminator Salvation movie is not about a child Terminator. Or is it not? Actually, this Terminator series was quite decent. Not good, but definitely watchable. So guess what? Low ratings! The show was cancelled after only two seasons.

Southpark. This animated parody series was brilliant when it started and it is still brilliant after 13 seasons. Usually an episode is a parody to a movie or a real life situation, all involving 4Th grade school children in a backwater town called Southpark. Sometimes they get to use too much toilet humour, but more often than not, the Southpark episodes are great.

Dexter. Oh, this is a show that I just love. Psychopathic killer Dexter Morgan is a Miami police crime scene technician and his policeman father, recognizing his mental persuasion, has taught him "the code" or "how to kill only serial killers and not get caught". Based on a book that I found worse than the show, the show has reached season 3 and I can't wait for the fourth season to start.

Big Love. This is a strange one. It is a series detailing the life of a Mormon family, one guy, three wives. As this marital arrangement is both illegal and controversial (since one major religion embraces it) there are all kinds of interesting developments. I for one think it is a very brave thing to do to make a show like this and Tom Hanks is one of the executive producers! The third season just ended, but I think the quality of the show is starting to go down as it turns more and more to cheap and unrealistic drama.

Fringe. J.J.Abrams again. He takes X-Files, adds a mystical twinge to it and the infinite puzzle of starting story arches and taking them nowhere and he creates Fringe. I am not watching it anymore, but for the episodes I did watch at least half the credit is due to John Noble, interpreting Dr. Walter Bishop.

Eli Stone. This was crappy to begin with. And it ended in a shameful cancellation after only two seasons. Imagine a lawyer that is also a psychic. Actually, he is a prophet of God. Geez!

Heroes. "Oh, you have to watch Heroes, it is so cool!". After my initial fear of starting to watch something about super heroes, again!, I got convinced by all the people telling me to watch it. Unfortunately, that only has proven I keep stupid company. The show is not only bad, it is beyond stupid. Third season has ended, the fourth is on its way.

Legend of the Seeker. Well, when I heard the people that made Xena and Hercules were doing another show I thought I would never enjoy it. But I do. It is still rather idiotic, but at least it doesn't turn battles into comedy scenes. People really do die, even if in the most clean ways. What a good horror series this would have been. The first season is close to its end and I suppose it will have a second season at least.

True Blood. I had to see it to believe it. Vampires in a small American town in which everybody actually behaves like in a small isolated town: they are superstitious, bigot, stupid, sneaky, mean. The story is a bit weird, but I allow it :) Second season is set to start on the 14Th of July.

Californication. Oh, oh, oh! David Duchovny has just become my personal idol. His character is a writer, intelligent, middle aged and totally cool. A bit too sexually active, but that plays well into the cool description. This is just one of those shows I can't not love. I can barely wait for the third season, sometime in late 2009.

Breaking Bad. I can't really relate to the main character, but the show is sound. A chemistry teacher finds out that he has terminal cancer. In an attempt to make a lot of money quickly in order to leave his family with a decent life, he starts cooking methamphetamine and selling it with the help of a local pothead. It is a show both funny and scary. His family doesn't know a thing, which adds to the tension. Not as good as Dexter, but pretty close. Can barely wait for the third season to start.

I am also starting to watch Entourage. Mark Wahlberg is playing a young actor "making it" in Hollywood. At least this is what I have read about it. It already has 5 seasons and I wonder if there is going to be a sixth. But I have still to start watching it and telling you what I think.

And at the end, last but not least, the anime series: Naruto Shippuuden and Bleach. I only started watching Bleach because of a friend liked it. I think it is barely watchable. I do read the manga, though, and that has gone way further than the anime. Surprisingly enough, though, the anime has some mini story aches that are not found in the manga. Licencing issues? Of Naruto I have already spoken of. I think it is pretty nice, although only at an emotional level. The manga is also way ahead and both manga and anime have story arches the other doesn't have. Both these series are shounen, meaning the type of story where the male character goes through increasingly difficult challenges which he overcomes, mostly through strenght of will and not something real like lots of work and exercise :) They still feel good, though, to immature males such as myself.


And that was it. Hopefully you will forgive me for not providing links. Just google it! :)

Saturday, May 16, 2009

the file name you specified is not valid or too long

I was installing a Visual Studio project made by a very cool team and, as they are very cool, it had this very complex folder structure for every little class and test and long names on the folder and so on and so on. Therefore, when trying to create a file on my Windows XP computer, the installer of the project failed with the strange error: 'the file name you specified is not valid or too long'.

I was under the impression that the path was no longer limited to 255 characters in Windows XP, but I was wrong. The MAX_PATH constant in Windows XP is 260. Everything over that causes an error unless specifically using a UNC formatted path (starting with \\?\). Weird huh?

Here is a technical description of the path concept in Windows: File Names, Paths, and Namespaces.
And here is the KB article with the "solutions": You cannot delete a file or a folder on an NTFS file system volume.

Thursday, May 14, 2009

Pressing Enter on a textbox results in a javascript error

The scenario is this: You use a ScriptManager, a TextBox and a Button and your project is at least referencing the Ajax Control Tookit library. You expect when pressing Enter in the TextBox to get to the button Click event. Instead you get the Microsoft JScript runtime error: ‘this._postBackSettings.async’ is null or not an object javascript error.

I found the solution here: JScript Exception in AJAX Control Toolkit. Basically, put the textbox and the button in a Panel and set the DefaultButton property to the button id.

Saturday, May 09, 2009

The Chinese Remainder Theorem - Modular arithmetic

I don't pretend to know much about mathematics, but that should make it really easy to follow this article, because if I understood it, then so should you. I was watching this four episode show called Story of Maths. Its first episode was pretty nice and I started watching the second. The guy presented what he called the Chinese Remainder Theorem, something that was created and solved centuries before Europeans even knew what math was. It's a modular arithmetic problem. Anyway, here is the problem:

A woman selling eggs at the market has a number of eggs, but doesn't know exactly how many. All she knows is that if she arranges the eggs in rows of 3 eggs, she is left with one egg on the last row, if she uses rows of 5, she is left with 2 eggs, while if she uses rows of 7, 3 eggs are left on the last row. What is the (minimum) number of eggs that she can have?
You might want to try to solve it yourself before readind the following.

Here is how you solve it:

Let's call the number of eggs X. We know that X 1(mod 3) 2(mod 5) 3(mod 7). That means that there are three integer numbers a, b and c so that X = 3a+1 = 5b+2 = 7c+3.

3a = 5b+1 from the first two equalitites.
We switch to modular notation again: 3a 1(mod 5). Now we need to know what a is modulo 5 and we do this by looking at a division table or by finding the lowest number that satisfies the equation 3a = 5b+1 and that is 2. 3*2 = 5*1+1.

So 3a 1(mod 5) => a 2(mod 5).

Therefore there is an integer number m so that a = 5m+2 and 3a+1 = 7c+3. We do a substitution and we get 15m+7 = 7c+3.

In modular that means 15m+7 3(mod 7) or (7*2)m+7+m 3(mod 7). So m 3(mod 7) so there is an integer n that satisfies this equation: m = 7n+3. Therefore X = 15m+7 = 15(7n+3)+7 = 105n+52

And that gives us the solution: X 52(mod 105). The smallest number of eggs the woman had was 52. I have to wonder how the Chinese actually performed this calculation.

Let me summarize:
X 1(mod 3) 2(mod 5) 3(mod 7) =>
X = 3a+1 = 5b+2 = 7c+3 =>
3a 1(mod 5) =>
a 2(mod 5)=>
a = 5m+2 =>
X = 15m+7 = 7c+3 =>
15m+7 3(mod 7) =>
m 3(mod 7) =>
m = 7n+3 =>
X = 15(7n+3)+7 = 105n+52 =>
X 52(mod 105)
.

For me, what seemed the most hard to understand issue was how does 3a 1(mod 5) turn into a 2(mod 5). But we are in modulo 5 country here, so if 3a equals 1(mod 5), then it also equals 6(mod 5) and 11 and 16 and 21 and so on. And if 3a equals 6(mod 5), then a is 2(mod 5). If 3a equals 21(mod 5), then a equals 7(mod 5) which is 2(mod 5) all over again.

Friday, May 08, 2009

The golden hammer of database applications

I have been working on a silly little project that involved importing files and then querying the data in a very specific way. And I wanted to do it with the latest technologies so I used The Entity Framework! (imagine a little glowing halo around that name and a choir in the background).

Well, how do I do an efficient import in Linq to Entities? I can't! At most I can instantiate a lot of classes and add them to the DataModel, then SaveChanges. In the background this translates to a lot of insert statements. So it occurred to me that I don't really need Entities here. All I needed is good old fashioned ADO.Net and a SqlBulkCopy object. So I used it like that. A bit of unfortunate translation of objects to a DataTable because the SqlBulkCopy class knowns how to import only a DataTable and I was set.

Ok, now back to the querying the data. I could have used ADO.Net, of course, and in this project, I would probably have been right, but I suspected the requirements for the project will change so I used Entities. It worked like a charm and yes, the requirements did get bigger and stranger as I went. But then I had to select the users that have amassed a number of rows in two related tables (or use a value in the user table) but only if the total number of amassed rows would satisfy a formula based on a string column in the user table that mapped to a certain value stored in the web.config a complicated query. I did it (with some difficulty) in Linq, then I had to solve all kind of weird issues like not being able to compare a class variable with an enum value because the number of types that can be used in a Linq to Entities query is pretty limited at the moment.

Well, was it the best way? I don't know. The generated SQL is something containing a lot of select from select from select sometimes 6 or 7 levels deep. Even the joining is done with select from tables. Shouldn't I have used a stored procedure instead?

To top it off, I listened to a podcast today about Object Databases. They do away with ORMs because there is no relational to begin with. The guy argued that if you need to persist objects, wouldn't an Object Database be more appropriate? And, as reporting would be a bitch when having to query large amounts of tabular data, shouldn't one use a Relational Database for this particular task in the project?

So this is it. It got me thinking. Is the database/data access layer the biggest golden hammer out there? Are we trying to use a single data access model and then build our applications around it like big twisting spaghetti golden nails?

Thursday, May 07, 2009

Siderite Kaikaku

Siderite double Ambigram :)
Well, this is a time of great change in my life. First I had to give my cat away, due to medical reasons. I had him for more than 5 years and I really liked him. Now he is living in the countryside, with my parents in law, trying to get some pussy (sorry, couldn't help it :) ) and getting beat up for it by sturdy country female cats.

A few months after I got the cat, I also got a new job, prompting me to write my first blog entry. I was saying then that I am starting my first real software developer job in an Italian company. Now, after almost five years, I am giving away my cat and also changing jobs.

My new company is (hopefully) a place where I can accelerate the rate of my learning and professional development and I will be working there on a Windows desktop WPF+WCF+WF+Entity Framework application. So expect a lot of blog entries about new (for me) technologies. I will be starting work there on the first of June.

On the other hand I don't know if it would be permitted (or I would have the time) to stay available for chat on the blog, so if I don't answer, it's probably because I can't.

Wish me luck, everybody!

Wordle

Wordle: Siderite's BlogHere is a fun little site called Wordle. It allows the graphic creation of a compact word cloud. Unfortunately it doesn't seem to take into account the counts for the words.

Tuesday, May 05, 2009

Naruto Shippuuden Movie 2 - Bonds

After a very long wait, one destined to only increase expectations on this movie, the second adolescent Naruto movie, Bonds, reached me. Well, as with any high expectations they were destined to breed disappointment, but I think beyond that, this movie was bad in an objective way.

I mean, yeah, Sasuke and Naruto meet once again in the face of the most pathetic enemy yet. They didn't even try with this one. After a sneak Pearl Harbour attack from some weird ninjas, a four people team kicks their asses completely. Meanwhile, Naruto is fighting with Reibi, the 0-tails (I know Japanese are masters of zero-based numbering and logic, but this is ridiculous) and the master of Dark chakra. Guess what? He kicks their asses. But it was so ridiculously easy. Was Sasuke even required?

On the emotional level, it was like an atom bomb. I feel I can do anything, so I do it. And that's it. Big bang, no subtlety whatsoever. Not that Naruto is known for subtlety, but there are limits.

And on the animation... it all seemed so mechanical, unchiseled.

Bottom line: bad movie. Even worse since I waited so long for it. I can imagine a two episode mini arch in the series doing the same job, but better. It's not unwatchable, just disappointing. :(

Complete Internet Explorer collection on a single computer

You know how difficult is to test a web site on the many (conflicting) versions of Internet Explorer browsers that were created. While most of us don't even bother to test for anything lower than IE 6.0, there are major differences between IE6, 7 and 8. I used to use something called MultipleIEs before that contained IE versions up to 6, but now I found something that looks even better: IE Collection, boasting IE versions up to and including Internet Explorer 8.0.

I have installed it and so far I had no major issues with it. It does seem to change some part of the default IE configuration, so take a look there after you finish installing it.

Monday, May 04, 2009

On infectious diseases

A while ago I wrote a little post about pandemics. I was saying then how little we know about them and how little we are taught about disease outbreaks as opposed to, say, war. This post, however, it about the reverse of the coin: mediatization of pandemic fears.

I was watching the news and there was this news about a swine flu pandemic in Mexico. Thousands were infected, more than 100 people dead and the disease had already spread in the entire world and it was impossible to contain. Gee, serious trouble, yes? I had to stay informed and safe. (see the twisted order on which my brain works?)

So I went directly to the World Health Organization site and subscribed to their disease outbreak RSS feed. And what do I read? 27 cases of infections and 9 dead. Come again? They said 150 dead on the news. The news can't possibly lie! It must be either a) a US site where they only list US citizens b) a machination so that people don't panic when the situation is so obviously blown. [... a week passed ...] I watch the news and what do I see? The reported death toll from the swine influenza strain has dropped to about 15 people. False alarm, people, the rest of those 150 people actually died of other unrelated stuff. So the WHO site was right after all, maybe it having to do with the fact that they work with data, not viewer rates. Hmm.

The moral of the story? My decision to stop watching TV is a good one. Get the real genuine source of information and "feed" from it. I am now subscribed to the new disease outbreaks feed and the earthquake feed and I feel quite content in that particular regard.

That doesn't mean the "Swine" flu is something to be taken lightly. As of today, there are almost 1000 cases of infection world wide and, even if the flu development has reached a descendant curve, this might change. The 1918 epidemic actually had four outbreaks, two consecutive years, in the spring and autumn.

On a more personal note, my wife has (and probably myself, too) something called toxoplasmosis, a disease that you take from a cat. I only heard about it two times, one from a colleague and one from Trainspotting. It a strange disease, one that is mostly asymptomatic, doesn't have a real cure, causes behavioral changes in mice and has been linked to a certain type of schizophrenia. Wikiing it, I got that there are about 30% to 65% of the world population that have it and that the drug used to treat it is actually a malaria drug. Is toxoplasmosis the malaria of the developed world? A lot of us have it, but we bear with it?

Stuff like that shows how fragile is both our understanding of as well as our defense from the microscopic world. Could it be that, with all the medical advances from the last century, we are still in the Dark Ages?