DEV Community

Discussion on: Common Myths and Misconceptions of Test Driven Development

Collapse
 
szymach profile image
Piotr Szymaszek

I am a guy who really struggles to program TDD style because I lack self-discipline and have been not using tests at all for years. I am forcing myself to get into it, because I get increasingly frustrated with cases where a simple test would save me from a huge headache later on. Also, despite what people may think, it is faster to program with than without TDD, mainly because you immediately know if you broke something and it needs fixing, without you having to manually go through who knows how many use cases of you code. Without writing the tests from the start it is a real struggle to go back and write them.

Collapse
 
mrlarson2007 profile image
Michael Larson

Sounds similar to my experience. When I first started out I wrote no tests and tried testing everything manually myself. So hang in there! It will get better with pratice.

The time savings in my experience come from three areas. We spend less time in the debugger, we avoid logical errors and bugs that can suck large amounts of time, and we only write the bare minimum amount of code needed to get the tests passing.

One extra time saving I almost forgot about, if we really spend the time refactoring it can help us make our code easier to understand, which helps others save time.