• RalphWolf@lemmy.ca
    link
    fedilink
    English
    arrow-up
    22
    ·
    1 年前

    Document your code like the guy who will be maintaining it is Dexter, and he knows where you live.

    • Aurenkin@sh.itjust.works
      link
      fedilink
      arrow-up
      16
      ·
      edit-2
      1 年前
      // This function calculates applicable discounts given a customer's loyalty status
      // STOP BEFORE SEASON 8 DEXTER PLEASE 
      fun calculateDiscountRate(loyalty: LoyaltyStatus): Set<Discount> {
          // No seriously you can hide out at my place if you need to just please don't let them do it 
      ...
      
      • NeatNit@discuss.tchncs.de
        link
        fedilink
        arrow-up
        8
        ·
        1 年前

        That ... at the end made me think there was more code and my client was refusing to show it to me no matter what I did.

      • Anna
        link
        fedilink
        arrow-up
        2
        ·
        1 年前

        And don’t watch that new dexter spin off

    • pfm@scribe.disroot.org
      link
      fedilink
      arrow-up
      1
      ·
      1 年前

      That’s why we keep notes… Literate DevOps is a solution for my preferred editor, but there definitely are solutions for other tools too, even if they don’t work exactly the same.

      I can’t recommend keeping notes too much.

        • pfm@scribe.disroot.org
          link
          fedilink
          arrow-up
          2
          ·
          1 年前

          I’m not going to argue, because I don’t know your work environment, but the notes I mentioned weren’t supposed to be published or attached to the product. They’re more of a personal knowledge base, where you can look up former approaches, issues found in the past, reasoning, decisions with context… All the zettelkasten tools out there do exactly that: help maintaining a useful knowledge base.

  • vampira@lemmy.eco.br
    link
    fedilink
    arrow-up
    4
    ·
    1 年前

    If I get off my computer for an hour and come back I’m already unable to recognize my code lol

    • qprimed
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 年前

      this resonates so much…

      “ok, which one of you crackheads decided an unconstrained recursive C function was a good idea right her… oh.”

  • biggerbogboy@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    ·
    1 年前

    this was me while writing my website for my screen and media course, I come back a week later and try to interpret these ancient runes inscribed on my IDE, had to stare at it for like half an hour to finally get what I made.