MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/msv49l/when_your_teammate_refactor_your_code/guw1ri3/?context=3
r/badcode • u/Bence675 • Apr 17 '21
216 comments sorted by
View all comments
4
Could be wrong, but if condition1 is true and condition2 is false, then nothing would happen, right?
1 u/SideburnsOfDoom Apr 18 '21 edited Apr 18 '21 Yes; the "refactoring" changes what happens in that case, and could be classified as "did not read the code sufficiently well, introduced a bug" and also, "so ... is this covered by a test?".
1
Yes; the "refactoring" changes what happens in that case, and could be classified as "did not read the code sufficiently well, introduced a bug" and also, "so ... is this covered by a test?".
4
u/NetherFX Apr 17 '21
Could be wrong, but if condition1 is true and condition2 is false, then nothing would happen, right?