4 ms·
I think I’d distinguish between rewrites and refactors. A rewrite starts from a blank slate, where a refactor starts from the previous version. Being unable t
by MereInterest 2y ago
I think I’d distinguish between rewrites and refactors. A rewrite starts from a blank slate, where a refactor starts from the previous version.
Being unable to understand the code in its entirety does not mean that somebody is unable to understand pieces of the code. Refactoring those pieces into easier-to-understand portions can be done, even when the end-to-end flow is still being contemplated.
- 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.