r/SoftwareEngineering • • Mar 10 '25

TDD on Trial: Does Test-Driven Development Really Work?

I've been exploring Test-Driven Development (TDD) and its practical impact for quite some time, especially in challenging domains such as 3D software or game development. One thing I've noticed is the significant lack of clear, real-world examples demonstrating TDD’s effectiveness in these fields.

Apart from the well-documented experiences shared by the developers of Sea of Thieves, it's difficult to find detailed industry examples showcasing successful TDD practices (please share if you know more well documented cases!).

On the contrary, influential developers and content creators often openly question or criticize TDD, shaping perceptions—particularly among new developers.

Having personally experimented with TDD and observed substantial benefits, I'm curious about the community's experiences:

  • Have you successfully applied TDD in complex areas like game development or 3D software?
  • How do you view or respond to the common criticisms of TDD voiced by prominent figures?

I'm currently working on a humorous, Phoenix Wright-inspired parody addressing popular misconceptions about TDD, where the different popular criticism are brought to trial. Your input on common misconceptions, critiques, and arguments against TDD would be extremely valuable to me!

Thanks for sharing your insights!

45 Upvotes

126 comments sorted by

View all comments

Show parent comment

2

u/flavius-as Mar 10 '25

You're creating an artificial separation between "architecture" and "design" that doesn't exist in practice. This is exactly the kind of compartmentalized thinking that leads to poor system design.

TDD absolutely influences those architectural decisions you mentioned. Take event-driven vs REST - TDD at the boundary layer forces you to think about how these interfaces behave before implementing them. I've literally changed from REST to event-driven mid-project because TDD revealed the mismatch between our domain's natural boundaries and the HTTP paradigm.

Your "single box" characterization misunderstands modern TDD practice. We don't test implementation details in isolation - we test behaviors at meaningful boundaries. Those boundaries directly inform architecture.

Think about it: How do you know if your DB schema scales well? You test it against realistic usage patterns. How do you develop those patterns confidently? Through tests that define your domain's behavior.

When I apply TDD to use cases (not functions or classes), I'm directly shaping the architectural core of the system. Those tests become living documentation of the domain model that drives architectural decisions.

The fact you're separating "broader design" from implementation tells me you're likely building systems where the architecture floats disconnected from the code that implements it - classic ivory tower architecture that falls apart under real usage.

Good TDD practitioners move fluidly between levels of abstraction, using tests to validate decisions from system boundaries down to algorithms. The tests don't just verify code works - they verify the design concepts are sound.

Your approach reminds me of teams I've rescued that had "architects" who couldn't code and programmers who couldn't design. The result is always the same: systems that satisfy diagrams but fail users.

2

u/vocumsineratio Mar 11 '25

I've literally changed from REST to event-driven mid-project because TDD revealed the mismatch between our domain's natural boundaries and the HTTP paradigm.

Excellent. I'd love to hear more about the specifics.