docs icon indicating copy to clipboard operation
docs copied to clipboard

Tutorial: how to not create kata with code restrictions

Open hobovsky opened this issue 4 years ago • 3 comments

Create a tutorial explaining to authors why restrictions related to code are a bad idea. Point out possible pitfalls:

  • blocking things is an arms race
  • dynamic evaluation
  • obfuscation
  • reflection
  • macros and preprocessor
  • equivalent functionalities in libraries
  • fetching answer from separate process
  • untestable requirements: "use recursion", etc.
  • updates to languages, libraries, runner
  • ... anything else?

Think about a series of language specific articles explaining how to enforce things which are possible to be realized more or less reliably:

  • module forbidder for Python
  • DasBrain's kumite for detecting class references in Java
  • hobovsky's kumite on parsing java source files (no kumite yet, but idea can be seen in this translation)
  • IIRC there's something about blocking modules for Haskell?

hobovsky avatar Jan 16 '21 04:01 hobovsky

IIRC there's something about blocking modules for Haskell?

https://github.com/codewars/hspec-codewars#hidden

kazk avatar Jan 16 '21 05:01 kazk

fetching answer from outside: network

I wouldn't want this possibility documented. It's well known, but still.

kazk avatar Jan 16 '21 05:01 kazk

JS Specific, suggested by @XRFXLP: https://github.com/codewars/docs/issues/214#issuecomment-755304491

Suggestion:

Freeze the Object which are being as method for validation for solutions: (For example: Math, Array, Function, String....) For example there are many katas in which validation process uses String.prototype.split, but the translators or author usually forget to freeze or constantify the handler function, which led user to modify the prototype itself to pass the tests.

And I think this is not detected my anti-cheat system, because I've recently seen couple of such solution for few 1 kyu katas.

hobovsky avatar Jan 24 '21 17:01 hobovsky