• ripcord@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    3 hours ago

    This code makes me really unhappy

    Although I am really desensitized right now. Earlier today I had to review a PR for that guy that maintains that one project that has things like 8000-line functions of mostly nested ifs. And they won’t let me reject them anymore with “BURN IT. BURN IT ALL”

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      18
      ·
      7 hours ago

      I actually doubt that somewhat. The language models do still go off of words to a large degree.

      • PastafARRian@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        2
        ·
        1 hour ago

        Sure, let me help you with that!

        Thinking for a better answer… (4 minutes later)

        Square 1 has a bug, the variable “docu” is not defined Square 5 has a bug, the function _ is not present. Square 17 has a bug, the function “Skip” is also not defined.

        Let me know if that was helpful to you!

      • calcopiritus@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        6 hours ago

        They may be worse than a very good programmer. But will be much faster answer. The real captcha is not to check if the answer is correct. It is to check the time it takes to answer.

        Except humans that are not very good programmers will just give up and answer quite fast. Or just click away lol.

  • humanspiral@lemmy.ca
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    4 hours ago

    can’t tell if C or Javascript. Could this be meta that all squares of javascript are always all buggy?

    • So there’s some data its concatenating from some lists and running some checks on. If one if the checks succeeds it runs a function called clearInfo, I don’t know js so idk if that’s a built-in or if they defined it elsewhere in the script. If that check fails it runs clearInterval. This is all wrapped in a function called setInterval, and it looks like if all the checks succeed and the interpreter isn’t moved to a different section of code by those functions called earlier then it will set whatever this interval is to 10000, presumably milliseconds. That’s the big block in the middle.

      The top block calls some code referencing a document, which appears to be stored as a list, index 12 is referenced and another obfuscated argument is applied to it.

      The bottom block appears to be defining a function that will interact with the document referenced above. Calling the function showInfo and presumably concatenating and formatting some data into a pretty output for a user to get info regarding the document being referenced.

      Someone who actually knows js could probably tell you more, I know python and c++ and this looks kinda like python but the syntax is a bit different so I could be way off