Rubber Duck Debugging - How to Solve a Problem

Поділитися
Вставка
  • Опубліковано 30 жов 2019
  • 👨‍🏫 Self-Paced .NET Bootcamp Course (includes FREE courses)
    learn.coderfoundry.com/
    📖 Buy Bobby's new book: Breaking the Code
    geni.us/breakingthecode-davis
    💻 How to get your first coding job
    coderfoundry.com/jobroadmap
    👕 Grab some CF merch
    shop.coderfoundry.com/
    🎥 The equipment we use at Coder Foundry
    kit.com/CoderFoundry
    DISCLAIMER: This video and description may contain affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!

КОМЕНТАРІ • 74

  • @ronnieoverby
    @ronnieoverby 4 роки тому +171

    This is not a joke. This technique is one of the most powerful tools a developer has.

    • @CoderFoundry
      @CoderFoundry  4 роки тому +5

      Ronnie we totally agree. I believe I have seen you use it! :)

    • @AwesomeBlackDude
      @AwesomeBlackDude 2 роки тому +1

      Remember the old Sonic restaurant with carhop on roller skates? Well, what would this look like today?
      You have a parking lot
      You have a place to park your vehicle
      You have a net tent & table near your car
      You have a cc menu screen on your table
      You have an overhead track to bring food
      You pay to park, sit, eat and go.
      RD B what am I missing here?!? 😬

  • @cosmic_417
    @cosmic_417 3 роки тому +78

    It's all fun and games until someone see you talking to a rubber duck

  • @alanhartmann3355
    @alanhartmann3355 4 роки тому +33

    If you don't have a co-worker or a rubber duck handy, the next best thing is to just put it aside for a few hours or even better overnight. Sometimes when you're in the midst a problem, the obvious are the hardest things to see. A fresh start often gives you a different perspective.

  • @Xcessive
    @Xcessive 4 роки тому +30

    3:53 "Taking a shi-ower"
    Great video. A common question asked by new programmers in general is either "how do I effectively debug", or "how should I code". New programmers will grasp concepts and syntax easily, but learning how to think like a programmer is extremely important.

    • @blakegreen1827
      @blakegreen1827 3 роки тому +4

      The anticipation at 3:55 of which way that was gonna go 😂

  • @timcain1418
    @timcain1418 Рік тому +3

    I once once had a programming problem that was driving me nuts and I ended up explaining it to my 73yo Grandmother!
    I was working in Java. We'd derived a bunch of classes from Swing components to give our application GUI a consistent look-and-feel, and we had this unique control, which was basically a rectangular array of buttons where clicking one of the buttons would affect the state/appearance of it's neighbors. Pressing the button worked fine, but then pressing it again didn't work as expected.
    I was mystified.
    So, I explained it to my granny, with her kindly, careworn old face, and amazingly my problem was solved.
    "Tim," she said to me, "Tim, I bet you've overridden the paintComponent method in your derived button class, haven't you? But did you remember to call paintComponent on the SUPERCLASS in your method, hmmm?"
    And she was right. Once I'd fixed that, everything was fine and I didn't worry too much about where an old woman who'd worked all her life hauling carts in a coal mine had gained her programming smarts.
    Now that Coder Foundry has explained the rubber duck method, we can get rid of her and save some money, so we've stacked her neatly next to the trash cans. Don't worry - she'll only be out in the snow, weeping quietly, for a couple of days before the next garbage collection.

  • @sarahbeth9365
    @sarahbeth9365 4 роки тому +11

    This is why one of my students said she needed me to come to work with her, and just stand behind her computer desk. Not say anything, just be there.

  • @tomas95go
    @tomas95go 4 роки тому +21

    This is been taught at one course on coursera, "Learning how to learn". Basically, there is two way of thinking, focused and defused, when you're focused on something, certain part of the brain are involved, but when you stop doing what you're doing, your brain just keep working on the background with different parts of the brain, second process is called defused mode.
    Now with my brainiac thingy aside, happened to me many times, specially when I wake up, even one of my teachers at uni told us to sleep with a notebook in the bedside table because of this or what you described (suddenly waking up with the solution), our bodies need rest, same goes for the gym, our muscle grows with proper recovery :).

  • @fakefake6770
    @fakefake6770 2 роки тому +5

    Beside the fact that this technique really solves your problems, I also love the fact that this technique always gave me that deeper understanding I long for.
    But the fact that THIS video gave me a deeper understanding of a technique that always gave me a deeper understanding is just mind blowing. Thanks a lot for this video!👍
    Have a great day!

  • @Roasty420
    @Roasty420 2 роки тому +1

    This is genius! I'm someone who is just now getting into Python and Java, and whenever I think I explain the problem on Facebook and I get no comments on my post, but this Rubber Duck could be my next best friend. Thank you! 😂😂

  • @cat6killa
    @cat6killa 4 роки тому +7

    I'm teaching my friend how to code and I told him about this 2 days ago then got this recommended. Perfect timing to send to him.

    • @Alekseybg
      @Alekseybg 4 роки тому +1

      Its a little creepy how GOOGLE knows what you talked about with your friend eh? It happened to me so many times as well!

  • @upendratrivedi7179
    @upendratrivedi7179 4 роки тому +4

    After struggling for the day, The moment I move away from my desk, I get solution within few minutes on my own. Some time I get the solution during same night in my dreams.

  • @FISS007
    @FISS007 4 роки тому +18

    It happens all the time. Infact, i try to talk to non programmers (accountants or any other non programmers) about my problems so that i can explain it realy well, by the time i am done explaining, i can see in my mind why isn't it working =)
    Nice video as usual =)

    • @FISS007
      @FISS007 3 роки тому +1

      @betterthangoat The key is that you are trying to explain it as best as you can, and by trying to do so, you will be subconsciusly mapping all your logic in your mind and when the entire picture is layed out (in your mind), you'll see exactly what's going wrong and you'll be able to fix it =D

    • @FISS007
      @FISS007 3 роки тому +1

      @betterthangoat I think you are in the wrong place here x) This is a software development topic not an electronics repair one ;)

    • @FISS007
      @FISS007 3 роки тому +1

      @betterthangoat mostly for intellectual work i would say...

  • @west221b
    @west221b 4 роки тому +2

    You're correct on those eureka moments during sleep or doing mundane tasks (showering): the mind is in what's called "diffuse mode" where it starts forming connections between chunks of encapsulated information. UCSD has a nice free course, "Learning how to learn" online that talks about how the mind works with learning.
    This video explains all those times when someone came to the doorway, started a hand gesture, opened their mouth to speak, then promptly halted, turned around and went back to their office.

  • @jamesspencer5180
    @jamesspencer5180 Рік тому +2

    This is an excellent strategy until you end up dropping your laptop in the bathtub.

  • @freegracetoronto3876
    @freegracetoronto3876 4 роки тому +5

    this is totally correct, most times I will come up with the solution while taking a break, like out walking the dog. There must be a rubber duck in my head as I tend to talk to myself about coding problems. People think i'm crazy but that's fine with me.
    I wish the company i work for was on board with teaching others. They won't let me create a youtube channel so I could make videos, the only time I get to teach others is before I go on vacation and I have to do a brain dump to whichever junior resource will be attempting to fill in for me. Apparently they view everything I do for them as proprietary and company property. They haven't yet seen the light on knowledge sharing to the public. Even though they claim they would like every employee to "build personal eminence" , I don't see how that's even possible without at least having a youtube channel in this day and age.

  • @stealthydragon791
    @stealthydragon791 4 роки тому +5

    I have never heard it called that. I have done it SOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO many times!!

  • @casachezdoom2588
    @casachezdoom2588 2 роки тому

    Love your posters! Also thanks for explaining what Rubber Duck Debugging is.

  • @dustinclark5620
    @dustinclark5620 2 роки тому +1

    The moment I first noticed this was one day I was driving home from a different city and bam. A solution to a problem I wasn't even thinking about came to my mind. It was weird. But it worked when I tried it at home.

  • @TheBlueCommet556
    @TheBlueCommet556 4 роки тому +12

    I've found throwing said duck helps 😂

  • @adriandegenaar5722
    @adriandegenaar5722 4 роки тому +3

    HAHAHA, I take walks and look like a crazy homeless guy while waking down the street talking to myself. Thanks, this just helped me solve an issue that I have been stuck on for 2 days now, got to love the rubber duck. Fun to talk to, fun in the bath, rubber duck you my best friend.

  • @rookybeats
    @rookybeats 3 роки тому +1

    A really helpful coding video that doesn't have a sales pitch? Subbed ☺️

  • @cdcavell
    @cdcavell 4 роки тому +1

    Another explanation, in my opinion, is pattern interruption. As a developer I, as many others, are pressed with time limits for deployment and fall into the trap of fixating on one solution. By getting up from the terminal and walking away you subconsciously open your thought process to new ideas you did not considered at the moment.
    On another note and not to promote Microsoft but I find the debugger in Visual Studio (and Code) an invaluable tool. Made it a point to learn how to really utilize and has saved a lot of guess work as to where a problem in a process really lies. Sometimes it is not obvious and not where you expected until you can see what is being set/called at run time.

  • @GroverStovepipe
    @GroverStovepipe 4 роки тому +1

    seems like a species of Feynman Technique

  • @pkxdandrobloxplayer6323
    @pkxdandrobloxplayer6323 4 роки тому

    Brilliant technique.

  • @DJRevan
    @DJRevan 2 роки тому +1

    Someone should tell this is the exact purpose of a rubber DUCK to Mr Weasley.

  • @shredder_plays
    @shredder_plays 4 роки тому +2

    i really love the way you talk 👌👌

  • @digitalman2112
    @digitalman2112 4 роки тому +4

    Yep, morning shower brings most answers.

  • @ilyesilyes6709
    @ilyesilyes6709 Рік тому

    Can I have one of that docks?

  • @donovanvaz3289
    @donovanvaz3289 Рік тому

    Was it only me but at 3:55 I was wondering what he was going to say "while I was taking a ssshhhhhower" - that extra long ssshhh had me worried what was coming next. 😁

  • @RichardGSweet
    @RichardGSweet 3 роки тому

    Sometimes solving a difficult problem is like trying to fall asleep. The harder you try the more futile it becomes. In the past I’ve solved problems while driving or doing the washing up, something mundane enough to just let your brain relax enough to breathe a little.

  • @mazdaknazemi8207
    @mazdaknazemi8207 4 роки тому

    so useful thank you, please give strong brainstorming for mern stack portfolio that recruiter will love. thank you.

    • @CoderFoundry
      @CoderFoundry  4 роки тому

      You’re welcome! Thanks for the suggestion.

  • @phuturemusic
    @phuturemusic 2 роки тому

    This technique must be used in corporate management. I guess it is.
    Also reminds of Henry Poincaré and his invention method

  • @hyperionlink
    @hyperionlink 2 роки тому +1

    Been torturing the people around me before I realized this was a thing. The ducky is a great substitute and has the same zoned out expression as a listener would.

  • @magetaaaaaa
    @magetaaaaaa 2 роки тому

    We've got a rubber duck at the office for this.

  • @fibonacci-dilemma3675
    @fibonacci-dilemma3675 2 роки тому

    This is actually interesting to think about for the next matrix movie, you see neo with a rubber duck on his head in the tub in the first matrix 4 trailer

  • @reeti5958
    @reeti5958 2 роки тому

    "I don't give a duck about your program"
    -Probably the rubber duck

  • @unknownakatsuki
    @unknownakatsuki Рік тому

    The scariest thing is when you do this and you go
    'Why doesn't this work, Ducky?!'
    Or even worse:
    'Why is this working when it has no business 9 ways till Sundays working, Ducky?!'

  • @pradeep422
    @pradeep422 4 роки тому

    Lol it happened to me bunch f times while coding... I used to thought it's only my brain now I feel comfortable...

  • @christiankpakpo6668
    @christiankpakpo6668 4 роки тому

    Thanks Man!!

  • @kvelez
    @kvelez Рік тому

    Great video.

  • @ImranAliyev
    @ImranAliyev 4 роки тому

    Complete truth!

  • @Ivanofkoshinkaisokanryu
    @Ivanofkoshinkaisokanryu 3 роки тому

    Some told me about rubber duck decoding I was thinking of doing it as an ever problem solver

  • @thesmallgamer319
    @thesmallgamer319 2 роки тому

    does it have to be a rubber duck? or can it be another thing

  • @KorhalKk
    @KorhalKk 2 роки тому

    Jesus, it happens all the time but it can be frustrating.

  • @1973sophia
    @1973sophia 4 роки тому

    I just bought from celebri-ducks. A Donald rubber duck. Has the hair of the president :) . Thanks for this idea.

  • @804E
    @804E Місяць тому

    Here because… of Neo sitting in the bathtub with a duck on his head.

  • @WorldAquariumSingapore
    @WorldAquariumSingapore 2 роки тому +1

    cool buy a rubber duck, not just a programmer

  • @davidrlifts
    @davidrlifts 2 роки тому

    Why a rubber duck though?

  • @edward_t450
    @edward_t450 4 роки тому

    Nice Intro lol

  • @AabirKashif
    @AabirKashif 2 роки тому

    I discovered there is a rubber duck inside me...😍

  • @srikanthdharmasastha8379
    @srikanthdharmasastha8379 3 роки тому

    I have a baby monk who does debugging for me instead of rubber duck.

  • @shounakchavan7669
    @shounakchavan7669 2 роки тому

    Okay. But why is it a DUCK ? What are other rubber toy that developers could use instead of a duck ?

  • @omkarbhat7
    @omkarbhat7 2 роки тому

    Matrix Resurrections brought me here
    😅😅😅

  • @dr.professour9606
    @dr.professour9606 3 роки тому

    I'm talking to myself.

  • @limitless1692
    @limitless1692 2 роки тому

    Like