The Default Non-Zero Enumeration Re-Visited
One of the motivations of the 184.108.40.206 release was address a problem in which default instances of Money had an undefined enumeration value. I kind of solved, but thinking about it later on I found a more convenient and performing way of solving the problem: using good old nullables and the not less venerable Nullable<T>.GetValueOrDefault(default).
I did some performance testing to confirm my suspicions and although it became a non 100% consistent (sometimes the first execution turns out in a failing test) test it is pretty representative of the issue. I will be ignoring the test for the next release, though as the point is proved.
I confess I am not a fan of static analysis. I acknowledge its merits and value, but it is not something I use for every build. Shame on me (or maybe not). Thing is, FxCop (or whatever name it has today) pointed out some interesting issues to the codebase, which were pretty much solved.
And I say pretty much, because I rediscovered why I am not so fond of the tool. The reason being that it is pretty difficult to filter all the noise from the results from the really important warnings. Nonetheless it was a good exercise and I will be doing it more regularly and I will use some other analysis tools, just to try them.
It seems “they” are always busy and “they” brought a new currency: the Sucre.
I found about it because the ISO web site changed the way they deliver the information and I updated my tools to scrape that information and check whether there is new information (having lost any faith left in their change notification system).
That change in format made me read information from an Excel file. For that purpose I started with plain vanilla ADO.Net code, but finally decided to use the really easy to use Excel Data Reader and some Linq2DataSet goodness.
Go Get It
Daniel Gonzalez Garcia