One interesting concept that
aegisknight uses to reason about code is the notion that duplication in source code is always inherently bad and should be attacked mercilessly at all times. This is an interesting idea in and of itself, but that's not the idea of the day. (besides, it's Chad's idea, not mine
(
Read more... )
Comments 4
Until today, though, I'd never heard the hidden duplication argument. Does that mean that any duplication found in tests should be folded into the API?
Reply
Reply
Besides, if you're doing TDD right, you test your tests every time you write a new one. If it's not red the first time you ran it, then it is probably broken. (the whole point is to use the test to determine that you've changed something successfully, so it should be red if you haven't changed anything yet)
Reply
Writing the tests first can do things like expose the need for utility functions that you may not know that you need if the implementation only uses the functionality once. (or not at all!)
Reply
Leave a comment