I find that past a certain size, even exploratory code base benefits from having tests. Otherwise, as I'm hacking, I end up breaking existing functionality. Then I spend more time debugging trying to figure out what changed.. what's your experience when it comes to more than a few hundred lines of code?
Re:I have complicated feelings about TDD
by is0tope on Thursday August 18, 2022 @02:14PM
(#32513038)
Indeed, but once you start getting to that point I'd argue you are starting to get beyond a prototype. But you raise a good point, id say if the intention is to throw the code away (which you probably should) then if add as few tests as will allow you to make progress.
I would however be more amenable to e.g. Prototyping first, and then using that as a guide for TDD. Not sure if there is a name for that approach though. "spike" maybe?
[1] https://www.machow.ski/posts/galls-law-and-prototype-driven-...