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.

  • Canonical_Warlock@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    18
    ·
    17 小时前

    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.

  • becausechemistry@piefed.social
    link
    fedilink
    English
    arrow-up
    148
    arrow-down
    3
    ·
    1 天前

    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
        7
        ·
        1 天前

        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
          3
          ·
          17 小时前

          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
      11
      ·
      22 小时前

      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
      10
      arrow-down
      3
      ·
      1 天前

      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.

    • Cellari@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      20 小时前

      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 :)

    • affenlehrer@feddit.org
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      1 天前

      But this rubber duck knows about programming. However, especially early on the duck lied a lot and now often insists that the API version it learned a year ago is still the latest and everything you’ve done with the new one is wrong. Well, now you l can let it read the new documentation beforehand but it’s still a weird rubber duck.

      • affenlehrer@feddit.org
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        1 天前

        I hope NPU hardware like CIX Clawcore will become more common for Developers. They can run 30B models locally and these smaller models are getting better and more efficient as well (MoE etc).

        The hardware still burns energy and resources and costs money but locally so you are responsible for it and don’t externalize everything into some data centers and investor / public money.

        • 4am@lemmy.zip
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 天前

          I admire your optimism.

          You know what hardware is going to become common with developers? Dumb terminal tablets and cloud accounts, unless we stop the capitalists right away.

          • affenlehrer@feddit.org
            link
            fedilink
            English
            arrow-up
            1
            ·
            19 小时前

            You’re not wrong. At work I have the bizarre situation that I have a laptop which is pretty powerful but I’m not allowed to develop on it and have no admin rights on it so I have to remote desktop into a less powerful VDI running in a different country with exactly the same access to company information but I have local admin rights on that machine. Also development is super cumbersome because it’s a windows VDI so I have to use WSL2 for a lot of the things I’m doing. Really weird, inefficient and expensive.

    • MoonRaven@feddit.nl
      link
      fedilink
      English
      arrow-up
      9
      ·
      17 小时前

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

  • doesit@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    4
    ·
    17 小时前

    I used to teach design. Before a presentation, I always asked my student to explain their project to someone with no knowledge on the subject, like their grandmother or so. Mainly to discover the logic flaws in their presentation.

    • nullptr@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      18 小时前

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

  • kurikai@lemmy.world
    link
    fedilink
    English
    arrow-up
    27
    ·
    1 天前

    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
      8
      ·
      1 天前

      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.

    • [object Object]@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      17 小时前

      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.

    • cageythree@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      20 小时前

      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

  • fibojoly@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    17 小时前

    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
      1
      ·
      11 小时前

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

  • da_cow (she/her)@feddit.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    17 小时前

    While I havent explained my code to a rubber duck I did find The solution to my Problem just because I started to write it down in order to get help in a forum.

  • 4am@lemmy.zip
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 天前

    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