Re:Why TDD isn't crap
by discreteevent on Tuesday October 31, 2017 @10:26AM
(#15593457)
This is exactly the problem. In general you should not be writing code for design flexibility. Your code should contain the minimum number of abstractions to satisfy its requirements. If flexibility is a requirement right now then that's ok. Otherwise refactor in the flexibility later. But don't make the code flexible for the sake of tests. It vastly over-complicates it for no benefit. Instead write tests as close to the requirements level as possible (ideally most of your tests should be just below the ui)
Re:Why TDD isn't crap
by humanrebar on Tuesday October 31, 2017 @12:26PM
(#15594428)
> Otherwise refactor in the flexibility later.
I'm saying, with experience, teamwork, communication (including through tests), you'll know when this proposition makes sense or not. It's not universally true that "we'll worry about it later" make sense.
> ...not code for your problems...
Right. It's not your problem now. It may be your (or your successors') problem in the future.
Is it always worth the effort? Nope. But experience, communication, and good teamwork will help with balancing short-term and long-term goals.