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.

all 63 comments

sorted by: hot top controversial new old
[–] 174 points 7 months ago (8 children)

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?

  • source
  • hideshow 8 child comments
  • [–] 51 points 7 months ago (2 children)

    You forgot:

  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 7 months ago* (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 7 months 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.

  • source
  • parent
  • [–] 2 points 7 months 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 :)

  • source
  • parent
  • [–] 37 points 7 months 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.

  • source
  • [–] 37 points 7 months ago (2 children)

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

  • source
  • hideshow 2 child comments
  • [–] 2 points 7 months 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

  • source
  • parent
  • [–] 2 points 7 months 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.

  • source
  • parent
  • [–] 32 points 7 months ago

    This happens so often with my wife that she’s started saying “quack” when I figure it out

  • source
  • [–] 16 points 7 months ago (1 child)

    this is one reason I type questions out before asking them

  • source
  • hideshow 1 child comment
  • [–] 15 points 7 months ago

    It’s all fun and games until the duck talks back.

  • source
  • [+] 15 points 7 months ago (2 children)
  • [–] 4 points 7 months 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.

  • source
  • parent
  • [–] 3 points 7 months 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.

  • source
  • parent
  • [–] 14 points 7 months ago
    [–] 12 points 7 months ago

    True for everything I think.

  • source
  • [–] 10 points 7 months ago (2 children)

    This is why I put rubber ducks at all desks of my it colleagues. It helps.

  • source
  • hideshow 2 child comments
  • [–] 9 points 7 months ago

    I keep one on my desk just for this reference :)

  • source
  • [–] 9 points 7 months 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

  • source
  • [–] 8 points 7 months 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.

  • source
  • [–] 7 points 7 months ago*

    I do this to my main analyst as a last resort; have since day 1.

    "Sorry, I gotta rant this one out." Knowing full-well they have nfi what I'm going on about.

    Then eventually, that feeling of a clarity bomb going off followed by a period of dopamine fallout.

  • source
  • [–] 6 points 7 months ago

    My wife is my rubber duck. She doesn’t mind when I explain the most jargon-heavy stuff to her.

  • source
  • [–] 6 points 7 months ago (2 children)

    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.

  • source
  • hideshow 2 child comments
  • [–] 6 points 7 months ago

    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.

  • source
  • [–] 6 points 7 months ago (3 children)

    I have a few Lego kits my kids have gotten me, and a small toy penguin, which I talk through things with.

    Thankfully it looks like I'm just on camera. Though I work from home so it doesnt really matter.

    I also treat several coworkers like my rubber ducky. I warn them first though, so I feel like its not as bad.

  • source
  • hideshow 3 child comments
  • [–] 6 points 7 months ago

    Not quite the same, but sometimes when I’m doing a task I like to talk through what I’m doing out loud as if I was showing someone else how to do it.

  • source
  • [–] 5 points 7 months ago

    Hell, even just having a completely different conversation can sometimes lead to huge breakthroughs! I've seen it happen!

  • source
  • [–] 5 points 7 months ago (2 children)

    But isn't that well known, even from school days? If you've ever explained something to someone you've recognized that by doing that you're forced into overthinking the context, diving deeper into the subject.

  • source
  • hideshow 2 child comments
  • [–] 5 points 7 months ago (1 child)

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

  • source
  • hideshow 1 child comment
  • [–] 3 points 7 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.

  • source
  • parent
  • [–] 5 points 7 months ago (1 child)
  • [–] 4 points 7 months ago (2 children)

    fun fact, I used to do this and had a small mental breakdown because my piece of shit boss refused to listen to my solutions, ultimately causing me more work and stress because the solutions he forced me to implement failed even more spectacularly.

    I burned the duck as an effigy of my boss when he was finally fired.

    I will never have another duck.

  • source
  • hideshow 2 child comments
  • [–] 4 points 7 months ago (1 child)

    I do this, but with my half-naked anime figures.

  • source
  • hideshow 1 child comment
  • [–] 4 points 7 months ago* (last edited 7 months ago) (1 child)

    This has a name? I thought this was just how it works. It’s why we think out loud.

    eta: thinking + speaking + hearing engages more of your brain. That’s obvious, right? More engagement == more connections?

  • source
  • hideshow 1 child comment
  • [–] 3 points 7 months ago

    I don't know who initialyse selected the rubber duck as a symbol for that. But it can't be a coincidence that the method works even better for me while showering.

    (Although with that, the energy costs might rival that of AI use)

  • source
  • [–] 3 points 7 months ago (1 child)

    If rubber ducks are a sign of bugs, then I do not want a Jeep.

  • source
  • hideshow 1 child comment
  • [–] 1 point 7 months ago (5 children)

    Isn't that just brainstorming?

  • source
  • hideshow 5 child comments
  • [–] 12 points 7 months ago (3 children)

    No. Brainstorming is when you’re with a group and everyone is throwing out ideas unfiltered.

    Rubber duck debugging is when you are trying to solve an issue by describing your problem to another person (or a rubber duck) and through the act of describing the problem you gain a better understanding of the issue and often this causes you to get a ‘eureka moment’ where the solution is suddenly clear to you.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 7 months ago (2 children)

    I mean in my line of work that is the collaboration process. Our problems are not in "debugging". However it's real solutions to problems. We discuss ideas and execute the one we feel is best. Quite often these discussions create that moment you speak of. Perhaps it's nuanced to programming.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 4 months ago (1 child)

    No, it isn't nuance. You are describing a completely different part in the process.

    Rubber ducking is after you decided on a solution to a problem that you know should work but it isn't working the way you expect. "Why isn't the change I am making doing the thing? It works on the other site and oh shoot I forgot to add in the workaround for our goofy environment."

  • source
  • parent
  • hideshow 1 child comment
  • [–] 0 points 4 months ago

    I don't see the extreme difference you seem to make it out to be. There are plenty of instances in my industry where something should work but needs to be adjusted to work correctly.

    I still see it as brainstorming. But if coders need their own thing, cool.

  • source
  • parent
  • [–] 6 points 7 months ago

    I’d say brainstorming is what you do before writing code and rubber ducking is what you do to debug code that you’ve already written.

    They also work kinda differently. Brainstorming an idea is different from explaining it out loud, detail by detail.

  • source
  • parent