2 ms·
> TDD often doesn’t work for greenfield development because you have no idea how the software will be designed and structured until after you’ve done substantia
by motorest 2y ago
> TDD often doesn’t work for greenfield development because you have no idea how the software will be designed and structured until after you’ve done substantial implementation to prove out the viability of the software architecture and how implementation details interact.
I don't agree. TDD is only relevant regarding the interfaces used by units of behavior. Software architecture isn't something that you design or verify or even assess with unit tests. Software architecture is purely a design task, and redoing software architecture is a kin to rewriting the whole project.
- jandrewrogers 2y agoMost non-trivial systems software has minimal unit testing. It doesn’t measure anything important in those systems. Integration tests are everything because the main functional properties being designed are the dynamic behavior of interactions between components and the hardware. In performance-engineered systems, a component’s behavior in isolation is not its behavior in the system, and that behavior determines correctness. Basically the same fallacy as most micro-benchmarking. Resource availability and locality vary dynamically, and the software design has to account for this, which is extremely non-trivial to do without code you can measure in the system context. And yes, modifying software architectures to address design issues that show up in implementation details or to slice some non-obvious tradeoffs differently is expensive, but is almost always required to some extent. That’s a cost of business if you are doing non-trivial greenfield software, it comes with the territory.