• @nothacking@discuss.tchncs.de
    link
    fedilink
    71
    edit-2
    10 months ago

    Put #define true (rand()%1000 != 0) in some obscure C or C++ header file on their system/project. This makes true evaluate to false one in a thousand times, and will make them spend hours trying to figure out why things like infinite loops, aren’t quite infinite.

    Other languages should also allow you to do things like this, if not messing with constants, messing with standard library functions.

    • Doc Blaze
      link
      fedilink
      3610 months ago

      This is not harmless. This is evil. You are chaotic evil.

      Although, most static analyzers like those in visual studio or clion would give you away once you hover mouse over true. Also, real C programmers don’t use booleans so I think those dudes are safe.

      • Doc Blaze
        link
        fedilink
        210 months ago

        depending on the language feel like that one would cause syntax errors for some keywords so their IDE might give you away there