• Lmaydev@programming.dev
    link
    fedilink
    English
    arrow-up
    72
    ·
    5 months ago

    I find for coding problems it’s actually better to walk away and let it tick over in your mind.

    You’ll often get a shower thought type moment.

    • Dagwood222@lemm.ee
      link
      fedilink
      English
      arrow-up
      32
      arrow-down
      1
      ·
      5 months ago

      That works for pretty much anything.

      Get up and do anything else for a while. School teaches us to sit at our desks and work on the problem. Stop acting like a sixth grader.

      • brbposting@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        11
        ·
        5 months ago

        That works for pretty much anything. Get up and do anything else for a while.

        This got me fired from the daycare

        • Dagwood222@lemm.ee
          link
          fedilink
          English
          arrow-up
          5
          ·
          5 months ago

          You were just staring at the kids. You were supposed to be changing diapers and feeding them. Insert obvious misunderstanding here.

      • Deebster@programming.dev
        link
        fedilink
        English
        arrow-up
        4
        ·
        5 months ago

        One place I worked had a small park, so sometimes I’d go for a lap or two to think something through - the fresh air, mild exercise, change of scenery and lack of distractions wroked wonders.

    • Amerikan Pharaoh@lemmygrad.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      5 months ago

      Nothing more enchanting than when the answer to your coding problem literally comes to you in a dream. Had an array issue in C++ where I literally woke up saying "I don’t need a ghost array to search after all is said and done, it’s already sorted!"

    • blaue_Fledermaus@mstdn.io
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      Once, the answer to a problem that was stumping me came while driving in the middle of nowhere at 01:00am back from a weekend trip.