3 ms·
> TDD is cargo cult. No, but like any practice that becomes known of outside a narrow group of highly-competent, highly-motivated experts in the relevant area,
by dragonwriter 5y ago
> TDD is cargo cult.
No, but like any practice that becomes known of outside a narrow group of highly-competent, highly-motivated experts in the relevant area, TDD can be (and often is) cargo culted. It is thus often the case that people's only practical contact with “TDD” is with a cargo cult application of it.
- cjfd 5y agoThis is true. The most important way in which TDD can turn into a cargo cult practice is to test every class and every method separately. This then turns into the testing of implementation details that are very much subject to change. It can also lead to the testing of trivialities, like 'can the standard library of my language still add elements to a container'. One should in most cases write tests about somewhat higher level properties of a system where the user might actually recognize the tests as being about stuff that they value. In most cases one would write tests about a small set of closely related classes. There should also be tests about somewhat larger clusters but there should be fewer of them because they tend to be more brittle and have worse performance.
- mbrodersen 5y agoAgree. Automatic system/user level testing is awesome. Automatic unit/module/class testing is a waste of time.