• jubilationtcornpone@sh.itjust.works
    link
    fedilink
    arrow-up
    49
    ·
    1 month ago
    /*
    By all accounts, the logic in this method shouldn't work. And yet it does. We do not know why. It makes no sense whatsoever. It took three weeks and numerous offerings to the programming gods, including using one of the junior devs as a human sacrifice, to unlock this knowledge. DO NOT LET HIS VIOLENT AND UNTIMELY DEATH BE IN VAIN! Touch this at your own peril.
    --jubilationtcornpone 12/17/25
    */
    public async Task<IResult> CalculateResultAsync()
    {
         // Some ass backwards yet miraculously functional logic.
    }
    
    • ChickenLadyLovesLife@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      ·
      1 month ago

      That long-ass horizontal scroll bar reminds me of how I used to put unfindable easter eggs into my Visual Basic apps. I would have amusing little messages pop up from time to time in message boxes. To prevent anyone from just searching for the exact text in the message box, I would reduce it to a series of concatenated Chr() statements and then I would put like 200 characters of whitespace in front of the message box call. The only way anybody would spot it would be if they noticed the horizontal scroll bar this produced and nobody ever did.

      At least that’s my theory. It’s also possible that nobody ever used the software that I produced.

      • Hudell@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 month ago

        A friend of mine used to teach coding decades ago and one story I’ll never forget is about the student who had an assignment that asked for a “for” loop to be used, but they didn’t quite know how to use it so they just wrote a broken loop there and then hid a “while” loop at the far end of the line.

        Code compiled, had a “for” loop and had the right output.

  • Someonelol@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    13
    ·
    1 month ago

    I’m living this right now. The lead programmers are long gone for a setup that uses Python, C++, and Linux. The only other guy who knows it is pulled to three other projects and I only have a C++ class taken over 15 years ago under my belt. I’m somehow expected to decipher this shit and explain the function of a few dozen variables and it’s going as well as one might expect.

    • SleeplessCityLights@programming.dev
      link
      fedilink
      arrow-up
      8
      ·
      1 month ago

      I started writing a giant note. On the last day in the morning I start it and add anything that I need to do after the break to it. These are very highly detailed including line numbers ro point me at the exact spot I need, names of bookmarks for reference, page number on documentation, anything that is going to unfuck the morning of the first day I come back.

  • ZILtoid1991@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    The self documenting code: short acronyms, that will make you go “AHA!” after hours of rubber ducking.