That supposes to have a clear idea of what youâre going to code. Otherwise, itâs a lot of time wasted to constantly rewrite both the code and tests as you better understand how youâre going to solve the task while trying. I guess it works for very narrowed tasks rather than opened problems.
constantly rewrite both the code and tests as you better understand how youâre going to solve the task while trying
The tests should be decoupled from the âhowâ though. Itâs obviously not possible to completely decouple them, but if youâre âconstantlyâ rewriting, something is going wrong.
Brilliant talk on that topic (with slight audio problems): https://www.youtube.com/watch?v=EZ05e7EMOLM