Programmers often discover solutions while explaining a problem to someone else, even to people with no programming knowledge. Describing the code, and comparing to what it actually does, exposes inconsistencies. Explaining a subject also forces the programmer to look at it from new perspectives and can provide a deeper understanding.

  • dan1101@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    Also going for a walk, driving, or the other morning I woke up spontaneously about 2 hours early and come up with a solution.

    • SlurpingPus@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      Prolonged and energetic walks jolt my brain so well that I have a standing task of maybe finding a way of recording audio clips right from the lock screen of my phone. Unfortunately, I know for certain that this will result in a pile of said clips collecting on the phone, as sorting them into notes isn’t a priority once I’m back home.