Archive for March, 2009

The USA as a Third-World Country

Friday, March 27th, 2009

In The Quiet Coup Simon Johnson, former chief economist for the International Monetary Fund (IMF), says that the current financial crisis resembles on a larger scale the sort of messes that emerging markets get into. He says that if we don’t want things to get worse we need to impose the kind of reforms that the IMF would demand of a small country that came to it for help.

Megan McArdle seems sympathetic to this notion, but in Foreigners + Money = Crisis? she points to claims that the IMF thoroughly botched its handling of the Asian financial crisis of 1998, which like the current crisis had a lot to do with countries being flooded with volitile foreign investment.

.NET Dictionary with Case-Insensitive Comparison

Tuesday, March 24th, 2009

How do you create a IDictionary that does case-insensitive key matches. There are a number of solutions posted on the web, but none of them seem quite correct. The following should work.

IDictionary map = new Dictionary(new StringCompInsensitive());

where

public class StringCompInsensitive : IEqualityComparer
{
    public bool Equals(string x, string y)
    {
         return String.Compare(x, y, true) == 0;
    }

    public int GetHashCode(string obj)
    {
          return ((string)obj).ToLower().GetHashCode();
    }
}

The Six Dumbest Ideas in Computer Security

Thursday, March 19th, 2009

I can’t give proper credit to the author of this piece. He may be an expert on computer security, but he doesn’t seem to know much about how to set up a web site (there’s no link back to the home page.)

Nevertheless, The Six Dumbest Ideas in Computer Security is well worth reading if you have any interest in how to secure a computer or a network.