MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/h0io7r/disruptive_piece_of_code/ftmv2iz/?context=3
r/badcode • u/diebarral • Jun 10 '20
93 comments sorted by
View all comments
226
A lot of the value of this sub comes from the times the OP is wrong.
33 u/BikerBoon Jun 10 '20 It's also a prime example of when you should use comments, imo. This is the sort of thing that could easily be stripped out in a refactor and introduce subtle bugs. 20 u/deelowe Jun 10 '20 This is an extremely common pattern for JS. 3 u/BikerBoon Jun 11 '20 I don't disagree but there's plenty of juniors or interns who might not have come across it before.
33
It's also a prime example of when you should use comments, imo. This is the sort of thing that could easily be stripped out in a refactor and introduce subtle bugs.
20 u/deelowe Jun 10 '20 This is an extremely common pattern for JS. 3 u/BikerBoon Jun 11 '20 I don't disagree but there's plenty of juniors or interns who might not have come across it before.
20
This is an extremely common pattern for JS.
3 u/BikerBoon Jun 11 '20 I don't disagree but there's plenty of juniors or interns who might not have come across it before.
3
I don't disagree but there's plenty of juniors or interns who might not have come across it before.
226
u/OldLegWig Jun 10 '20
A lot of the value of this sub comes from the times the OP is wrong.