2 ms·
> Refactoring those pieces into easier-to-understand portions can be done Right, but the main point still stands I think, that if you don't understand the full
by magicalhippo 2y ago
> Refactoring those pieces into easier-to-understand portions can be done
Right, but the main point still stands I think, that if you don't understand the full code, you run a risk at introducing bugs when refactoring portions of it.
Code that seemingly does nothing might in fact do something due to non-local effects, ie global variables in disguise, and other pitfalls. A "favorite" is using reflection to modify some non-local variable rather than accessing it directly, making it very difficult to find during code searches.
Sometimes these bugs can be glaring, other times they can be more subtle and only be detected once they've inflicted significant damage to customer data.