• tslnox@reddthat.com
    link
    fedilink
    arrow-up
    48
    ·
    1 year ago

    I’m not really a programmer but when I code something at work to make my job easier and I have to go before I finish it, I write a little comment for my future self to explain how I’m thinking at the moment, to help restore the flow.

    Usually it doesn’t work. :-D

    • chiliedogg@lemmy.world
      link
      fedilink
      arrow-up
      28
      arrow-down
      1
      ·
      1 year ago

      You didn’t have to explain you aren’t really a programmer.

      Saying you write comments implies it.

    • megane-kun@lemm.ee
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      1 year ago

      Because my work tends to have me working on a wide variety of features, and thus operating on vastly different parts of the codebase, I make it a point to comment out every change I make complete with the ticket that requested the change, and what the intended effect of the change is.

      Cue me returning to piece of code I made (after the inevitable bug has arisen) and me staring at my own code changes in bewilderment, wondering what past me really wanted to do. Hahaha!

    • jazir5@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Now you can try to get chatgpt to explain what it does. Or Facebooks code llama.