Saturday, June 11, 2005

New Articles

Here are a couple of new interesting articles from Martin Fowler's web-site although not written by him.

Before Clarity - Michael Feathers

I think what he's saying here is that testability has first priority, sometimes even ahead of clarity. I think I'd agree. I'm coming to believe that the only way to have high quality software is to have tests. What good is clarity if the code isn't correct?

Fail Fast - Jim Shore

This article argues that it's better for software to fail right away if there is an error in the code, rather than trying to be "error tolerant" and hiding the error. I'd agree. I have this debate with my programmers. I'll say "we should put an assert here", and they'll say, "but we don't want the user to get an error". But they're missing the point - the purpose of the assert is to catch any errors before they get to the user. And if an error does slip through to the user, it's still better to know about it sooner rather than later.

This article also prompted me to change our user error message from "A program error has occured" to "An unexpected problem has occured". My support staff has wanted this changed for some time - they think that "program error" sounds like it's our fault. Of course, it usually is, but I guess there's no point making that too obvious!

No comments: