2 added 195 characters in body
source | link

While this method is better than just starting to code, it does not at all prevent you from breaking existing functionality at all. And that's normally the greatest danger when fixing a bug.

If you really want to be safe, there is no way around adding all tests required for the module you are working on. However it is very unlikely that you have the resources for doing so. Therefore some kind of compromise is required. There is no simple recipe. The less you understand the existing code, the more complex it is and the higher the quality standards to be fulfilled, the more effort is required to implement tests.

Aside from that, I would try to do some refactoring of the existing code before modifying its functionality.

While this method is better than just starting to code, it does not prevent you from breaking existing functionality at all. And that's normally the greatest danger when fixing a bug.

If you really want to be safe, there is no way around adding all tests required for the module you are working on. However it is very unlikely that you have the resources for doing so. Therefore some kind of compromise is required.

Aside from that, I would try to do some refactoring of the existing code before modifying its functionality.

While this method is better than just starting to code, it does not at all prevent you from breaking existing functionality. And that's normally the greatest danger when fixing a bug.

If you really want to be safe, there is no way around adding all tests required for the module you are working on. However it is very unlikely that you have the resources for doing so. Therefore some kind of compromise is required. There is no simple recipe. The less you understand the existing code, the more complex it is and the higher the quality standards to be fulfilled, the more effort is required to implement tests.

Aside from that, I would try to do some refactoring of the existing code before modifying its functionality.

1
source | link

While this method is better than just starting to code, it does not prevent you from breaking existing functionality at all. And that's normally the greatest danger when fixing a bug.

If you really want to be safe, there is no way around adding all tests required for the module you are working on. However it is very unlikely that you have the resources for doing so. Therefore some kind of compromise is required.

Aside from that, I would try to do some refactoring of the existing code before modifying its functionality.