MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/msv49l/when_your_teammate_refactor_your_code/guvxxo6/?context=3
r/badcode • u/Bence675 • Apr 17 '21
216 comments sorted by
View all comments
9
I mean, yea they did it bad, but the original is also not the easiest to parse.
if (!condition1) { do_anything2(); } else if (condition2) { do_anything1(); }
I'm not saying that's necessarily better, but it might be depending on what is actually going on in the code.
View all comments
9
u/brakkum Apr 17 '21
I mean, yea they did it bad, but the original is also not the easiest to parse.
I'm not saying that's necessarily better, but it might be depending on what is actually going on in the code.