
How I got banned from Codewars - Poilon
https://medium.com/@poilon/how-i-got-banned-from-codewars-c21ad6ebee1e
======
mcguire
" _Of course this is cheating, but if someone had done this during code
interviews, I think he would have a really good chance of being hired !_

" _Ruby is love, ruby is jazz._ "

Yeah. No, thanks.

------
tianshuo
I reported multiple bugs in Codewars for Javascript, and created one of the
hardest katas with anti-cheat here([https://www.codewars.com/kata/mystery-
function-number-2](https://www.codewars.com/kata/mystery-function-number-2)).
The founder remarks that Codewars has sanity checks if you are meddling with
the test system and will punish you if you abuse it too much. Testing out one
or two cheats is okay, using it for too much katas will get you banned.

------
zem
that was delightful, both the content of the writeup and the happy voice in
which it was written :)

------
jlebrech
1 they should give his account back, 2 did they fix it. and 3 they should have
different categories of points: unverified, checked and stolen.

then if you have the most "stolen" or hacked points you can boast your haxxor
skillz.

~~~
sleepychu
[https://news.ycombinator.com/item?id=14686918](https://news.ycombinator.com/item?id=14686918)

------
greyfox
I read the blog post but I didnt quite understand it. Specifically the coding
part. Can someone break it down for the noobs please?

~~~
strangecasts
His solution always returns _nil_ , and forces all comparisons with _nil_ to
be true.

Thus, every time the reference result is compared against the result of his
solution, both are considered equal, leading the validator to conclude that
the solution is valid.

------
Kenji
I jumped into CodeWars.com just to see what it's about. Take a look at this
puzzle:

 _The code does not execute properly. Try to figure out why._

int multiply(int a, char *b) {

    
    
      return a b;
    

}

WTF? Who the hell multiplies a char pointer with an int? Why not just a char?
Do I need to multiply the pointer address or the value the pointer points at?
Do I need to check for NULL?

Why not write proper code instead of solving these "puzzles"?

~~~
0x6c6f6c
You can only make an account on the site if you solve a "puzzle" in one of the
languages. It's meant to be extremely obvious to programmers but be absolute
jargon to anyone else.

Your comment is exactly the point of the puzzle. Change char to int and you
gain access.

~~~
Kenji
Nope. It was the multiply sign between a and b that was missing. And a cast of
char* to int in the line with the return statement. That was the actual
solution. Besides, I have no intention of joining this site because the real
world poses enough actual puzzles that are worth solving.

------
fworm
Uh, oh. You're the James T Kirk of CodeWars. It's like beating the kobayashi
maru...

~~~
huene
This is CodeWARS, not CodeTREK!!!

But also like James T Kirk, he was banned for cheating after beating the test.
:)

~~~
stcredzero
I should implement a CodeTrek MMO!

------
pjc50
I'm surprised that the test for pass/fail is within the interpreter, rather
than a string match against the stdout of a sandboxed interpreter.

~~~
masklinn
Yes indeed, does that mean similar katas across multiple languages have to be
fully duplicated? I'd have expected an external checking system (à la TAP),
doing everything internally with languages like Ruby or Python seems like a
pretty bad idea.

~~~
mikeash
I think it's a bad idea for most languages. Even with C, C++, Go, Rust, or
Swift, it's pretty trivial to exploit anything running within the same
process. Any user-submitted code needs to be isolated from any code you need
to be able to trust.

------
AndrewDucker
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?)

~~~
superplussed
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.

~~~
fishnchips
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.

~~~
deadowl
I didn't know they started banning people.

------
kronos29296
So the Ruby guys have an unfair advantage. As a non-Ruby guy hope they fix
this. But it still feels bad. I only found that site a few days ago and it
looked all flashy compared to codeforces but now - It raises severe questions
about its accuracy. Kinda like Chrome dinosaur high scores.

~~~
jhbadger
If they allowed FORTH it would be even worse -- _everything_ in FORTH is
redefinable -- you could make 1 equal to 2 if you want.

~~~
kronos29296
Is that why nobody uses it anymore? Only thing I know about it is that it used
stack like expressions. (kinda like RPN but for everything)

~~~
Lev1a
I think nowadays more interpreters/compilers are being written for FORTH than
stuff in the language itself.

~~~
kronos29296
Kinda like BrainF __* I see. Turing complete but a readability nightmare.
Maybe I should try to write one for FORTH like for BrainF __*. Was an
interesting exercise especially the loops.

~~~
Jach
No, the parent is wrong. Maybe on Github Forth interpreters dominate as
people's pet projects but there's a good chunk or niche of the embedded
industry writing real Forth code every day for new things, not just legacy
support. But their code usually isn't on Github. It's a great language for
bare metal programming and quite readable, unlike BF which is intentionally
unreadable. Forth was designed for low level really (edit: though I remembered
there's this if you want an idea of the philosophy [http://thinking-
forth.sourceforge.net/](http://thinking-forth.sourceforge.net/)), I think it's
less suitable for higher level general purpose programming just for its
untyped nature alone.

[https://www.forth.com/embedded/#Annotated_example_source_cod...](https://www.forth.com/embedded/#Annotated_example_source_code)
contains a version of the canonical washing machine program.

    
    
        \ Top-level control
        : WASHER ( -- ) WASH SPIN RINSE SPIN ;
    

You can then look at the definitions for 'WASH' and 'SPIN' and 'RINSE' and so
on until you get down to what IO bits you're turning on or reading when and
for how long.

