Had another interesting problem today. A test that really should have worked started failing most of the time. The test was designed to make sure that a certain DateTime value did not change on update under a special circumstance. It was designed something like this: [TestMethod]
public void Updating_Foo_Will_Not_Update_ChangeDate()
{
//Create a Foo to work with
Foo foo = new Foo()
{
Name = "Update test foo",
};
foo = repository.SaveFoo( foo );
DateTime lastChan...
Had an interesting error today. An database query that should have returned thousands of lines returned nothing. Turned out it was due to how the inequality operator works in SQL. In most programming languages, like C# or java the inequality operator handles null, so for example the following code (although extremely stupid) will work. bool? nullValue = null;
bool? trueValue = true;
bool? falseValue = false;
Console.WriteLine((true != nullValue) );
Console.WriteLine((true != trueValue) );
Conso...