4 ms·
Agreed. Essentially if you don't have an existing code structure in place, TDD will be very confusing and you'll end up tangling yourself into a coding mess.
by LouisSayers 4y ago
Agreed.
Essentially if you don't have an existing code structure in place, TDD will be very confusing and you'll end up tangling yourself into a coding mess.
On the contrary, if you have a structure in place and need to ensure the correctness of the code you're about to write, it is incredibly useful.
Building my own stuff, I hardly ever write any tests tho as in the early stages of a project, testing will slow you down as the tests are essentially locking your code in. For me personally, I prefer to have my code be more fluid so I can rapidly change it without having the overhead of having to write and rewrite the corresponding tests.
When I come across some tricky logic tho I will definitely crank out some tests as it actually helps to create the solution.
As usual context is key to knowing whether TDD (or even testing) is appropriate or not.