I found this interesting article from Julian Bucknall. He points out some things I've noticed over the past couple of years related to test driven design/test driven development.
First is that there seems to be a push from some companies (Microsoft is one with their Team System) to write code first and then generate unit tests. This has always seemed strange to me. Where is the “Red, Green, Refactor” in this? :-) I find a certain satisfaction in writing that first test, seeing Red, refactoring and then seeing Green. I write only the code I need to solve the problem and don't get caught up in extra stuff that I “might“ need.
Second, he discussed getting some pushback regarding TDD at work. Specifically, people said things like:
we get paid “to write code the customers will use." His response of “customers pay us to write code that works, they don't want nasty surprises “ should be plastered all over his office. :-)
Of course, in my current environment, I'm finding it tough to do any kind of TDD because I'm stuck in the VB6 world and I haven't found a good unit test tool like NUnit for VB6. Of course, the culture of my employer is that “we're a production shop“; this means we're always in firefighting mode (which really sucks). Hell, at least people in his office have heard of TDD. I struggle with how to bring it up when the group of people I work with are still writing VB6 code every day. TDD is such a shift in thinking that it's gonna be tough to get them to see the value.