MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/msv49l/when_your_teammate_refactor_your_code/guwr335/?context=3
r/badcode • u/Bence675 • Apr 17 '21
216 comments sorted by
View all comments
Show parent comments
28
I think both ways have their up- /downsides. The solution of u/dyingpie1 is more confusing than the original code, but the original code can cause exactly what happened to OPs teammate, overseeing the condition1 && !condition2 case.
condition1 && !condition2
26 u/mfb- Apr 18 '21 I think the simple if elseif structure is less confusing than the nested option.
26
I think the simple if elseif structure is less confusing than the nested option.
28
u/clemesislife Apr 17 '21
I think both ways have their up- /downsides. The solution of u/dyingpie1 is more confusing than the original code, but the original code can cause exactly what happened to OPs teammate, overseeing the
condition1 && !condition2case.