| ▲ | pjmlp 3 hours ago | |||||||||||||||||||||||||
Exactly one of the reasons I never went down with all the TDD dogma of only writing code to fix broken tests. There is a reason conference talks are always about plain algorithms and data structures. | ||||||||||||||||||||||||||
| ▲ | bob1029 2 hours ago | parent | next [-] | |||||||||||||||||||||||||
The biggest flaw I've seen with TDD is the fact that correctness does not compose upward. Every time two units come into contact, you've got an entirely new kind of unit. The tests from constituents do not cover emergent properties of the new things. You will repeat this same exercise the entire way up to the top, and the moment you come into contact with the customer (they want to change everything), the house of cards comes crumbling down and you have to start your agonizingly-slow process all over from the bottom again. The only thing that the business seems to care about is top-down UI testing. This is also convenient because you can leave it until the very end after the customer has already seen several prototypes. I do think TDD makes sense in isolated scopes (prove this specific custom parser works at the edges), but as the general policy for the entire product it's definitely not a viable practice. Much of the time if comes off as an ego trip to see just how cleverly we can mock something so that we can say we technically tested it. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ▲ | e12e 27 minutes ago | parent | prev | next [-] | |||||||||||||||||||||||||
> TDD dogma of only writing code to fix broken tests. Isn't red-green-refactor pretty ingrained in TDD? Only write code to make a failing test pass; then refactor while making sure the tests still pass? Then write a test that fails, repeat? | ||||||||||||||||||||||||||
| ▲ | zuzululu an hour ago | parent | prev [-] | |||||||||||||||||||||||||
yup and I find it weird that people still remain so defensive of the Church of TDD even against empirical studies that show its limited benefits | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||