The Root of All Evil, Part Two

There were a number of interesting comments to yesterday’s posting about premature optimization. Several readers pointed out that there are various options we could take: Do nothing. Maintain backwards compatibility and spec incompatibility. Change the spec to exactly match the current implementation. Change the spec and the implementation. Make the weird behaviour a warning now…

8

The Root Of All Evil, Part One

People often quote Knuth’s famous statement that premature optimization is the root of all evil. Boy, has that ever been the theme of my life these last few weeks as I’ve been banging my head against the compiler trying to figure out how we’re going to make it work with LINQ without breaking backwards compatibility….

27

Do not use string hashes for security purposes

A recent question I got about the .NET CLR’s hashing algorithm for strings is apropos of our discussion from January on using salted hashes for security purposes. The question was basically “my database of password hashes doesn’t seem to work with .NET v2.0, what’s up with that?” To make a long story short, the answer…

11

FYI, C# 2.0 Has A Breaking Change in Enum Subtraction

A customer brought to my attention the other day that the C# 2.0 beta release has a breaking change from the previous release. Namely, this code enum E : byte {  A = 1,  B = 2}; // . . . E a = E.A;E b = E.B;int j = a – b; sets j…

16