Hacker News new | ask | show | jobs
by AndrewDucker 3277 days ago
Would have been nice to hear about the bit where they actually got banned from Codewars.

(Rather than the bit where they found a way of cheating at Codewars. Also, does that still work, or have the Codewars people now patched the bug?)

2 comments

Still works[0], I just had to rename mymethod to the tested method. Pretty poor show from CW.

[0] - http://imgur.com/a/QC1gf

they could just use a different interpreter, i.e disable some monkeypatching.
I'm not sure disabling monkeypatching would suffice, couldn't you then just create your own type equal to everything and return that? I assume assert_equal just does `a == b` internally so `a` could be an AlwaysEqual instance rather than a monkeypatched nil.

A more sensible alternative would probably be to serialise the assert_equal parameters and check the results externally.

Adding negative tests (using `not a == b` to avoid the same monkeypatching of !=) would also help

They could just add a test that makes sure trivial comparisons still work.
sure that would work too :)
So is there no way to check the call stack and only "tweak" the result if you are being called from the verifier?

Or only return "true" on the 2nd call to the comparison?

Just some random ideas.

you mean sandbox the interpreter that the kata runs in? Extract the value and then de-serialise it for an equality check in another instance of the interpreter?
I agree, it seems poor sportsmanship on the part of Codewars. I mean they could have a special leaderboard for those who "hack" the game in one way or another. It seems in the best interest of the software itself, but also of the community, to foster this kind of creativity.
They're not very chivalrous to be sure. I managed to break out of their sandbox and sent them a proof with a repro. A year later the glaring hole is still there, and my account was banned.
I didn't know they started banning people.
IIRC Starfighter explicitly okayed exploits that didn't "ruin the fun" (e.g. don't trash another user's data, DoS the game, etc).