NewsBot
1
What are your thoughts on TDD?
I find that writing tests first helps me determine the behavior of legacy systems when writing software to integrate with them. Unexpected and undocumented behaviors in legacy software are exposed through testing. Truth. It seems that these same anomalies would have taken much longer to surface without TDD.
Writing tests first also seems to*yeild more time to consider design patterns to use in new code.
What is certainly true is that once a threshhold is passed, somewhere along the path of adopting TDD, it is much too compelling to stop using it. It's fun and it builds confidence that new code is a best possible design.
Those who have not tried TDD seem, to a person, to bring three arguments against it: 1) it takes too much time, 2) it does not add any inherent value to the deliverable, 3) it breaks the object-oriented design principles into more procedural designs.
Only argument 3 has any possible merit, but it is also false. TDD*leads*many to*a change of philosophy to simplify object models.
Single-purpose classes are more readily testable and simplicity proves best design regardless of the rationale. Monolithic objects now appear the way flat-table designs did after the widespread switch to relational database designs.
The difficulty for TDD is how to test UI components' interaction with codebase. This one issue proves difficult for TDD advocates to "sell" to holdouts. The use of Model-View-Presenter does mean more code; seperating the UI from its state and events (in order to mock the UI programmatically in tests)*is more work. TDD coders are OK with more work, but those who don't want to start using TDD can argue to management that this is waste and attempt to obscure the benefit of TDD on argument 1 again.
Good news is that management is becoming more primed to advocate adoption of TDD; "we're an Agile shop" is the bellweather.
In summary,*have one sentence to use for kicking sand at others: 99% of programmers who reject TDD have never used it, and the other 1% are trying to save face.
More...
View All Our Microsoft Related Feeds
I find that writing tests first helps me determine the behavior of legacy systems when writing software to integrate with them. Unexpected and undocumented behaviors in legacy software are exposed through testing. Truth. It seems that these same anomalies would have taken much longer to surface without TDD.
Writing tests first also seems to*yeild more time to consider design patterns to use in new code.
What is certainly true is that once a threshhold is passed, somewhere along the path of adopting TDD, it is much too compelling to stop using it. It's fun and it builds confidence that new code is a best possible design.
Those who have not tried TDD seem, to a person, to bring three arguments against it: 1) it takes too much time, 2) it does not add any inherent value to the deliverable, 3) it breaks the object-oriented design principles into more procedural designs.
Only argument 3 has any possible merit, but it is also false. TDD*leads*many to*a change of philosophy to simplify object models.
Single-purpose classes are more readily testable and simplicity proves best design regardless of the rationale. Monolithic objects now appear the way flat-table designs did after the widespread switch to relational database designs.
The difficulty for TDD is how to test UI components' interaction with codebase. This one issue proves difficult for TDD advocates to "sell" to holdouts. The use of Model-View-Presenter does mean more code; seperating the UI from its state and events (in order to mock the UI programmatically in tests)*is more work. TDD coders are OK with more work, but those who don't want to start using TDD can argue to management that this is waste and attempt to obscure the benefit of TDD on argument 1 again.
Good news is that management is becoming more primed to advocate adoption of TDD; "we're an Agile shop" is the bellweather.
In summary,*have one sentence to use for kicking sand at others: 99% of programmers who reject TDD have never used it, and the other 1% are trying to save face.
More...
View All Our Microsoft Related Feeds