2 ms·
I don't think tests can ever replace specification, it's like trying to replace a mathematical proof with a computer experiment. Unless it's something like prop
by js8 5y ago
I don't think tests can ever replace specification, it's like trying to replace a mathematical proof with a computer experiment. Unless it's something like property-based tests, but even there..
My take on specification is that you encode it to be executable as your program, during development. Ideally, the program should encode the specs in the most straightforward way possible. To "specialize" the spec into tests first and then "generalize" it again from tests into a working program seems like unnecessary hassle, and frankly prone to information loss.
It's interesting, because as I state in another comment, I have a big disagreement with a guy who loves TDD. I guess I am a theorist (I derive my feeling of correctness from simplicity of the code) and he is an empiricist (he derives his feeling of correctness from many small tests), and it somehow defines our approach.