3 ms·
To all the people telling stories about rewrites they have been involved in, I am curious if the code you were rewriting had tests? If so, do you rewrite those
by japhyr 14y ago
To all the people telling stories about rewrites they have been involved in, I am curious if the code you were rewriting had tests?
If so, do you rewrite those tests? Or do you keep them, no matter how ugly they are, because new code still has to pass all the old tests?
- ollysb 14y agoI've done a few rewrites, in all cases they were projects that were written entirely by junior developers (company took a while to learn the costs of cheap developers) and with absolutely no tests whatsoever. If you're rewriting a project then you're probably going to have to bin the unit tests. If you're rewriting it's because you want to make some drastic structural changes and unit tests are just too tightly coupled. Integation tests on the other hand can be an absolute godsend, you can swap out the entire stack and they'll still provide just as much value as before.