Worse is Better, or Worse now is better than better later

Worse is Better by Richard Gabriel

The paper above is old news for many people, but in my continued search for ‘better’ ways to build ‘better’ software I only just came across this paper. In many ways this can relate to Agile methodologies in which delivering value as soon as possible is key to the success of the project. XP uses short iterations, SCRUM uses sprints, although there are some big differences in the way these two work.

Continue reading

Random NUnit Tip

Often when writing NUnit tests I find myself wanting to output some stuff to the Console in order to make sense of a failing test. But, you don’t want the console window filling up with rubbish when the test is passing, so instead of doing this…

[Test]
public void DoesSomething()
{
string expected = “some expected result”;
object someObject = new SomeObject();
string actual = someObject.DoesSomething();
Console.WriteLine(expected);
Console.WriteLine(“—-“);
Console.WriteLine(actual);
AssertEquals(“SomeObject should do something”, expected, actual);
}

you can do this…

[Test]
public void DoesSomething()
{
string expected = “some expected result”;
object someObject = new SomeObject();
string actual = someObject.DoesSomething();
try
{
AssertEquals(“SomeObject should do something”, expected, actual);
}
catch(AssertionException)
{
Console.WriteLine(expected);
Console.WriteLine(“—-“);
Console.WriteLine(actual);
throw;
}
}

Then the Console output only shows up when the test fails. Nice.