3 ms·
That's why you have version control and batches and fuzzing etc.
by thanatropism 8y ago
That's why you have version control and batches and fuzzing etc.
- vincnetas 8y agoNot sure how version control can help here, as unit tests are not run on old versions. About batches, could you be more specific, i might be missing something here. And for fuzzing, it will test your new function, but will not provide any guarantees that your new functions is working exactly like the old one. You might be surprised, bet there could be bugs in old function which can be fixed by refactoring. Sounds nice? But might be some legacy codes is depending on the bug that you fixed, and for backwards compatibility reasons that bug must stay be renamed from "bug" to "functionality".
- thanatropism 8y agoI meant "branches". Mobile devices speak for us, it's an unbearable situation.
- AlexCoventry 8y agoI think the point is to have a unit test like for parameters in parameter_generator(n=100): assert(old_version(*parameters) == new_version(*parameters), f"Versions produced different outputs on {parameters}") This lets you transform old_version with more confidence that you're not corrupting its logic.