DEV Community

Discussion on: TDD Practicality

Collapse
 
cariehl profile image
Cooper Riehl

By implementing TDD, with all it's overhead, you will be setting up a playground to code the best logic you can in a clear way.

I love this comment, it's so true! When we have a well-tested project, it becomes so much easier to mess around with new features, and find the best way to add them to the project.

Writing tests first really forces us to break the logic down into the simplest possible operations, which naturally leads to cleaner interfaces and more self-documenting code. And clean code is a lot of fun to interact with, just like a playground!

Collapse
 
stevekaufman profile image
Steven Kaufman

Darn, nobody wants to play devil's advocate.

Thread Thread
 
theowlsden profile image
Shaquil Maria

Hahaha, I guess not😅

Collapse
 
theowlsden profile image
Shaquil Maria

Writing tests first really forces us to break the logic down into the simplest possible operations, which naturally leads to cleaner interfaces and more self-documenting code.

Yes! that self-documenting part is very important too. If you are working on a piece of code today and have to get back to it in a month, or another team member needs to interact with it, it really makes it easy to understand and continue to work on.

And clean code is a lot of fun to interact with, just like a playground!

It certainly is. I'm still a noob at testing, but I will for sure try to implement it in every project that I think is suitable.