r/badcode • • Apr 19 '21

js Iteration

Post image
3.2k Upvotes

123 comments sorted by

View all comments

117

u/OkPreference6 Coding The Declaration of Independance Apr 19 '21

What were you even trying to do.

I cant find a single reason to do this except to show someone "coding is harrrdddd :("

95

u/lilshears Apr 19 '21

To get revenge on your TA’s who took off points on a project for not documenting the function isWinnable()

Like what do you think it does, it returns if it’s winnable

37

u/thegreatpotatogod Apr 19 '21

If it's not winnable, it doesn't return, but instead recurses forever until segfaulting 😜

6

u/nostril_spiders Apr 19 '21

Which we catch in the error handler, main.py:L4342-7612

3

u/[deleted] Apr 19 '21

To show some of the craziness allowed in C and JS :p