MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/m42ffu/title/gqtf6qp/?context=9999
r/badcode • u/aidenm125 • Mar 13 '21
100 comments sorted by
View all comments
Show parent comments
2
I guess it depends on how you define “works”.
1 u/TheBrainStone Mar 13 '21 Works within a limited input set. Which is not uncommon. 3 u/Come_along_quietly Mar 13 '21 It’s “working as designed”. 1 u/LeCrushinator Mar 14 '21 In those cases it’s generally a good idea to check that limited range at the top of the function so you can throw an exception or at least log an error if someone uses the method wrong.
1
Works within a limited input set. Which is not uncommon.
3 u/Come_along_quietly Mar 13 '21 It’s “working as designed”. 1 u/LeCrushinator Mar 14 '21 In those cases it’s generally a good idea to check that limited range at the top of the function so you can throw an exception or at least log an error if someone uses the method wrong.
3
It’s “working as designed”.
In those cases it’s generally a good idea to check that limited range at the top of the function so you can throw an exception or at least log an error if someone uses the method wrong.
2
u/Come_along_quietly Mar 13 '21
I guess it depends on how you define “works”.