3 ms·
> Tests? No, definitely not on the first run. Maybe only for documentation purposes in legacy systems. But don't take away all the fun by starting with tests. Y
by de_watcher 7y ago
> Tests? No, definitely not on the first run. Maybe only for documentation purposes in legacy systems. But don't take away all the fun by starting with tests. You'll paint yourself into a corner.
Trying to squeeze in the tests into existing system is painful. So better do the tests before it had become a "legacy system to document".
Tests should be written before and during writing the new system.
That's because they are the executable language for the results you want to get from the system. The two other options are: use plain text to document your manual actions and expected results, don't document your manual actions and expected results.
- protonimitate 7y ago>Trying to squeeze in the tests into existing system is painful. So better do the tests before it had become a "legacy system to document". This, but also if you code first then write tests you try to write tests based on your interpretation of how the code you already wrote currently works, when its better to write tests to outline and define how the code _should_ work in the future. >You'll paint yourself into a corner. I find it is the exact opposite. If you write all your code first, then write tests, you will inevitably find a bug and refactoring working code to fit a test is infinitely harder than adding more tests or replacing irrelevant ones.
- marcosdumay 7y agoTrying to test ill-defined software is a recipe for failure. At the same time, trying to create well defined software without tests also leads to certain doom. Know where you are.