【TDDを再定義したほうがいいって話だったのさ】UncleBob, Martinfowler, DHHのツイートまとめ
@unclebobmartin @bdruth @pragdave They may well be doing it wrong. Or overemphasizing TDD's role. Nobody seems to object though.
2014-04-27 06:21:12@unclebobmartin @bdruth @pragdave "If it isn't easy to test, or the tests can't be fast, it's bad design" is a prevalent fallacy.
2014-04-27 06:22:30@unclebobmartin @bdruth @pragdave As is "if you're not doing test-first, you're not a professional". Don't find that helpful.
2014-04-27 06:23:23@unclebobmartin @bdruth @pragdave But I do find your "don't be afraid of your code or changing it" very helpful. Regression protection +10!
2014-04-27 06:24:23@unclebobmartin @bdruth @pragdave And I prefer to work on common ground. So that's a banner I'm fully behind! Rails can do more for it too.
2014-04-27 06:25:10@unclebobmartin @bdruth @pragdave Maybe all we need is a TDD 2.0 :). Focus on the eradication of fear, enable confident changes. Less design
2014-04-27 06:27:14@rtlechow @unclebobmartin @bdruth @pragdave I don't believe that. Plenty full coverage apps have shit design, some no test apps have great.
2014-04-27 06:33:19@rtlechow @unclebobmartin @bdruth @pragdave At least if you define confidence as "passing tests". Integral confidence is a different matter.
2014-04-27 06:34:25@dhh @unclebobmartin I've always felt that self-testing code is the most valuable outcome of TDD. I often find design aspect useful too.
2014-04-27 06:37:35@martinfowler @unclebobmartin Main contortions I see in the Rails world are around trying to isolate controller tests and prevent DB access.
2014-04-27 06:40:49@martinfowler @unclebobmartin Which lead to some IMO seriously convoluted architectures with layers of cognitively expensive indirection.
2014-04-27 06:41:39@martinfowler @unclebobmartin The path from TDD to hexagon as it pertains to Rails is one of the clearest examples of that.
2014-04-27 06:42:43@dhh @unclebobmartin Neither of which is something I consider to be part of TDD. (Using a double for DB is common but not necessary)
2014-04-27 06:43:41@martinfowler @unclebobmartin I respect that Bob has a very different opinion on the key objective of architecture, though: delayed choice.
2014-04-27 06:44:05@martinfowler @unclebobmartin They come with the territory of test-first isolation and outside-in mocking. As well as the speed focus.
2014-04-27 06:45:07@martinfowler @unclebobmartin And even outside those forces, I consider the test-first approach overrated as a design driver. Rarely fits me
2014-04-27 06:45:59@dhh @unclebobmartin There are some TDDers who use mocking heavily. There are many who don't. I know TDDers who test Rails AR as you do.
2014-04-27 06:47:08@martinfowler @unclebobmartin Which wouldn't be as much of an issue if TDD wasn't sold as a pro/am divider, but it is. Not just helpful view
2014-04-27 06:47:11@martinfowler @unclebobmartin Right. Which brings us to a more fundamental discussion: which practices are essential to TDD, which not?
2014-04-27 06:48:40@martinfowler @unclebobmartin And it relies on the definition of "unit test" too. I agree with "case runs independently of other cases".
2014-04-27 06:49:51@dhh @unclebobmartin I think it would be an interesting discussion to explore how different teams do their testing.
2014-04-27 06:50:10@dhh @unclebobmartin I agree with you that the whole "unprofessional" angle gets annoying.
2014-04-27 06:50:38@martinfowler @unclebobmartin But very often "unit test" is presented as free of collaborators or context. Hence no DB and no controllers.
2014-04-27 06:50:50@martinfowler @unclebobmartin Yes, range of acceptable TDD is too narrow. And it's IMO harmful to mvc web apps. Much conceptual overhead.
2014-04-27 06:51:58@martinfowler @unclebobmartin BUT, I stand fully behind the wonders of automated regression tests. Love the "don't fear your code" angle.
2014-04-27 06:52:40