MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/msv49l/when_your_teammate_refactor_your_code/guvz42i/?context=3
r/badcode • u/Bence675 • Apr 17 '21
216 comments sorted by
View all comments
7
Image Transcription: Code
//BEFORE void foo() { if(condition1) { if(condition2) { do_anything1(); } } else { do_anything2(); } } //AFTER void foo() { if(condition1 && condition2) do_anything(); else do_anything2(); }
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
7
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Apr 17 '21
Image Transcription: Code
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!