3 ms·
> Are you saying you want to replace the specification with tests? That's really dubious to me. That's pretty much it. The value is that tests can be automati
by vikingerik 5y ago
> Are you saying you want to replace the specification with tests? That's really dubious to me.
That's pretty much it. The value is that tests can be automatically executed and verified. A specification document can't.
Writing a spec is still a step in the process - a bootstrapping step. The spec is a "write one to throw away" placeholder until you get far enough that the spec can be replaced with executable tests.
- js8 5y agoI 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.