[Previous entry: "The most exciting progress?"] [Next entry: "CFP: Agile 2005"]
01/18/2005: "I wish I'd said it"
We, the test-infected, are frequently challenged by people who don't want to add or expose code "just for testing". I had always used rather long-winded arguments that generally included the idea that testing is valuable enough to be worth the perceived negative design effects, and that one could eventually refactor towards a design that is both testable and uses only the code that the production system uses. These people generally throw "YAGNI" back in our face.
Well, Ron Jeffries has honed his answer, and I wish I'd said it first:
I refactor now for tests, because I need tests now, not because I want the code to be testable.
