Finally the light has come on with me and TDD. I totally get-it from a process perspective. I totally get-it from a qualitative perspective. And as a software engineer, I am innately averse to fear-based coding. To be perfectly honest I'm not entirely there either. I've fiddled with TDD - in so far as most of us have. Exploring the novelty of writing a test, running it to failure and then coding it to success. There were/are several issues, but the one that was second on the list is best expressed: "so what, I have a lot of tests"
Well, due to some prodding by my adopted boss and some ribbing from a fellow blogger (Jonk), I've started to find TDD actionable. I've "seen the light" all along, but how to make it real was always the problem. The other day I wrote a method called CityStateZip() on an Address class. You get the picture, you always want that pretty one line of the address for display but constantly doing the string.Format() gets really old. Yes I am aware that some of you out there just realized that in your mind I 'adulterated' a business object with display logic. All I have to say it bite me. It's a standard format, standard to the domain of Addresses in general. So dismount your separation of concerns high horse and lets move on. Proud of myself (um, yeah) I checked it all in and went about my business (What no code review? Bite Me). The next day my adopted boss, let's call him Tony, said, "Hey, you guys gotta watch those tests. You checked in a method CityStateZip and didn't add a test for it."