r/badcode • • Jul 30 '19

[deleted by user]

[removed]

154 Upvotes

98 comments sorted by

View all comments

Show parent comment

7

u/TinyBreadBigMouth Jul 30 '19

The key is to mangle the input until it matches the code's bad expectations. Also never use a nice language feature like in when you can be long, ugly, and explicit instead.

1

u/thegreyswordmaster Jul 30 '19

Exactly! I just had another idea to make it even less comprehensible. Now that it works, why not refactor variable names to completely unintuitive single characters like x for middle. Or an emoji if possible.