TDD is BS?
Jacob Carlborg
doob at me.com
Fri Jun 21 02:17:04 PDT 2013
On 2013-06-21 00:37, Nick Sabalausky wrote:
> I'm not saying that it's necessarily bad to write a function's tests
> before the function itself, I just don't see what it really matters to
> code the tests first. The important thing is that the tests get
> written, ideally before you move on to something else. If you have the
> discipline to write the tests before the function, then you have the
> discipline to write the tests after the function.
I agree. But the point is also, as other has mentioned, that you should
look from the client's point of view when designing your API. So if you
write the test firs you're writing the client code first. The you think
about how the API should look like from the client's point of view. If
the implementation cannot work or fit in that API you have to change the
API.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list