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.

  • becausechemistry@piefed.social
    link
    fedilink
    English
    arrow-up
    172
    arrow-down
    4
    ·
    11 days ago

    Now, hear me out: what if the rubber duck burned tons of energy, poisoned the water and air, caused a global shortage of computer parts, was built with material without the permission of creators, made it easy to make nonconsensual sexual images of people, and lied to you?

      • halcyoncmdr@piefed.social
        link
        fedilink
        English
        arrow-up
        9
        ·
        edit-2
        11 days ago

        exploit and traumatize developing country workers to filter nsfw/nsfl

        I’ve always felt like there’s a place in there for the early internet users through millenials (and maybe some early Gen Z) who spent a lot of time getting tricked by places like 4chan to see nsfl stuff and developed a tolerance to that sort of crap.

        I’m sure there are a lot of people that already gave up on humanity years ago and have the psychological damage/callouses to deal with that more than a random selection of a population that hasn’t been affected yet. Let the already damaged use that ability, like a super power, to save those who haven’t experienced enough to the point where they’ve given up yet.

        • oce 🐆@jlai.lu
          link
          fedilink
          English
          arrow-up
          5
          ·
          10 days ago

          I don’t think they care as much for minimizing trauma as they care for cheap labor from a developing country. I doubt there are a lot of 4chan users there.

    • shrugs@lemmy.world
      link
      fedilink
      English
      arrow-up
      12
      arrow-down
      1
      ·
      11 days ago

      Yeah, but it always tells me my ideas are good and he is wrong. So there is that

    • 4am@lemmy.zip
      link
      fedilink
      English
      arrow-up
      14
      arrow-down
      4
      ·
      11 days ago

      It’s a moron detector.

      Most of us would avoid it like the plague, but morons will let it write their code in the first place.

    • AA5B@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      9 days ago

      Obviously then you’d trust everything it says and fire half your staff to replace them with a row of ducks

    • Cellari@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      10 days ago

      You can fix the world by putting an AI into the rubber duck without electricity and expensive parts and it still works!

      AI enhanced by that smile and those eyes and quiet posture helps solve problems :)

  • kurikai@lemmy.world
    link
    fedilink
    English
    arrow-up
    36
    ·
    11 days ago

    works even for non programming stuff. its letting our brain process the information in order ans organising it

    • WHARRGARBL@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      11 days ago

      I used to tutor college chemistry and calculus. I secretly sucked at both, but I knew what questions to ask students to start them thinking. They got excited to discover the answers while explaining it to me.

    • cageythree@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      10 days ago

      Yeah. I’m no programmer but I’ve had it often that I couldn’t find a solution for a problem myself, said ‘fuck it, I’ll have to ask the internet’, and by writing out what my problem was I figured out the solution so I never even posted the half-written posts lol

    • [object Object]@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 days ago

      I write a lot of notes, because I can’t trust myself to remember details of any project after a day or more of hopping through multiple other tasks and online information onslaught. This particularly concerns any problems on which I get stuck — and whaddayaknow, writing out what specifically doesn’t work and how it should work, helps with realizing why it might not work.

  • Canonical_Warlock@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    35
    ·
    10 days ago

    Not a programmer but at my last job I couldnt count how many times I would walk into our engineers office and start explaining a problem only to stop mid sentence and say “wait, I’m an idiot” then walk back out. Sometimes talking about it is all you need to make the pieces fit.

    • nullptr@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      10 days ago

      the number of times I found the error, while describing the error on stackoverflow …

    • HubertManne@piefed.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 days ago

      came to say this and in addition its more effective with an actual person even if they don’t say anything. Even a small amount of feedback helps that much more although ironically though it kinda palteus if it stops you from jumping on your new ideas and getting them down.

    • TrackinDaKraken@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 days ago

      Works with writing fiction, too. I read the section aloud and explain the reasoning behind the choices, and that helps me figure out what isn’t quite working. Also, reading aloud makes awkward dialog stand out more so than reading silently.

    • MoonRaven@feddit.nl
      link
      fedilink
      English
      arrow-up
      14
      ·
      10 days ago

      It might have escalated a bit after that though. There are hundreds of rubber duckies all around the office now…

  • 4am@lemmy.zip
    link
    fedilink
    English
    arrow-up
    8
    ·
    11 days ago

    Every single popcorn flick from the 80s and 90s has a main character make a big plot-resolving realization while doing early act 3 exposition

    If this is such a universal human experience that we wrote it into movies made for general audiences, I think that programmers are not the only ones debugging to their ducks

  • Caveman@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    9 days ago

    I call one of my coworkers once a week with “Can I rubber duck you?” which means I’m just going to talk about my problem and explain my thought process in hopes she spots an obvious solution.

    We do it to each other and 30% of the time the other dev says “why not just X” and we agree that it’s pretty obvious.

  • fibojoly@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 days ago

    A corollary to this is that it’s often very difficult to explain what’s wrong because if you could explain it clearly, you would probably be fixing it already.

    • RavenofDespair@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 days ago

      it is the process of explaining how your code works (or should work) to someone that you realizes the errors or solution.

      • fibojoly@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 days ago

        Precisely! The process of putting your thoughts in order to explain things usually gives me the answers.