Ted’s Rants and Raves by Ted M. Young

April 30, 2007

Test-Driven Development (TDD)

Test-Driven Development or Test-First Programming, or whatever you call it, is a way of programming where you create the test code before the production code. There’s a new push for doing this here at Guidewire, and I’m looking forward to doing more of it and talking about it here. In the meantime, I’m reading the early access of "Test Driven" by Lasse Koskela (you can pre-order it at Amazon). I’m hoping to see more of a focus on the "customer acceptance" part of test driven development, so we’ll see how that works out.

Bad Error Messages Waste Time

Filed under: General Rant

The only thing worse than content-free error messages such as "Error 0" (see The $4,000 Error Message) are those that mislead: telling you that X is wrong when it’s really Y that’s the cause of the problem. At least with "Error 0", you’ll look at everything and think about all of the possible things that could be wrong and either see your mistake or give up and try something completely different.

The evil misleading error message, however, causes you to spend your time and effort on fixing X, until you finally realize (after much cursing and coffee drinking) that there’s no problem with X, X is just fine and works exactly as expected. Only then do you see that Y is the real problem and, even worse, it takes only two seconds to fix it.

This is why programmers should never write error messages. Just like they should never write help text, button labels, menu items, or pretty much any text that the end-user is going to read. That’s the job of the usability/documentation folks: they know how to write. This is also why QA should pay close attention to the error messages (they are testing the error cases, right?) and ensure that they are correct.

Of course, the best solution is to prevent the error conditions in the first place, but that’s another rant. 

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com