{"id":18950,"date":"2023-04-04T10:49:51","date_gmt":"2023-04-04T14:49:51","guid":{"rendered":"https:\/\/carleton.ca\/webservices\/?p=18950"},"modified":"2024-06-26T09:29:03","modified_gmt":"2024-06-26T13:29:03","slug":"quack-the-code-the-power-of-rubber-duck-debugging","status":"publish","type":"post","link":"https:\/\/carleton.ca\/webservices\/2023\/quack-the-code-the-power-of-rubber-duck-debugging\/","title":{"rendered":"Quack the Code: The Power of Rubber Ducking"},"content":{"rendered":"\n<section class=\"w-screen px-6 cu-section cu-section--white ml-offset-center md:px-8 lg:px-14\">\n    <div class=\"space-y-6 cu-max-w-child-5xl  md:space-y-10 cu-prose-first-last\">\n\n            <div class=\"cu-textmedia flex flex-col lg:flex-row mx-auto gap-6 md:gap-10 my-6 md:my-12 first:mt-0 max-w-5xl\">\n        <div class=\"justify-start cu-textmedia-content cu-prose-first-last\" style=\"flex: 0 0 100%;\">\n            <header class=\"font-light prose-xl cu-pageheader md:prose-2xl cu-component-updated cu-prose-first-last\">\n                                    <h1 class=\"cu-prose-first-last font-semibold !mt-2 mb-4 md:mb-6 relative after:absolute after:h-px after:bottom-0 after:bg-cu-red after:left-px text-3xl md:text-4xl lg:text-5xl lg:leading-[3.5rem] pb-5 after:w-10 text-cu-black-700 not-prose\">\n                        Quack the Code: The Power of Rubber Ducking\n                    <\/h1>\n                \n                                \n                            <\/header>\n\n                    <\/div>\n\n            <\/div>\n\n    <\/div>\n<\/section>\n\n\n\n<p>Why are we talking about rubber ducks on the Web Services blog? Turns out, rubber duck debugging is an actual thing that developers do&#8230;!<\/p>\n\n\n\n<p>As part of our <a href=\"https:\/\/carleton.ca\/webservices\/2023\/agile-an-overview-and-how-we-use-it\/\">Agile working process<\/a>, we have daily meetings where we update each other on what we are working on. And we talk about any issues we are encountering. During a recent meeting, one of our developers said he had \u201crubber ducked\u201d some code with some other developers&#8230; Hmmm, Mike, did you just say you \u201crubber ducked?!\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image alignright\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"628\" src=\"https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/rubber0ducking-1.jpg\" alt=\"Our team of developers surrounded by code with rubber duck in center\" class=\"wp-image-19094\" srcset=\"https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/rubber0ducking-1.jpg 1200w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/rubber0ducking-1-512x268.jpg 512w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/rubber0ducking-1-1024x536.jpg 1024w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/rubber0ducking-1-320x167.jpg 320w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/rubber0ducking-1-768x402.jpg 768w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/rubber0ducking-1-360x188.jpg 360w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/rubber0ducking-1-200x105.jpg 200w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<h2 id=\"what-is-rubber-duck-debugging\" class=\"wp-block-heading\">What is rubber duck debugging?<\/h2>\n\n\n\n<div class=\"public-DraftStyleDefault-block public-DraftStyleDefault-ltr\" data-offset-key=\"5gl5-0-0\">\n<p>Rubber ducking is a technique that programmers use to debug code. They explain it line by line to a rubber duck. Or any entity that understands almost nothing about the problem. It&#8217;s like having a sounding board to bounce your ideas off of. This helps to simplify and clarify problems. And by taking it step-by-step, the solution often presents itself.<\/p>\n<h2>How does it work?<\/h2>\n<p>Explaining something to someone helps you to better understand it. It lets you see things from a different perspective. And you may uncover or catch something that you missed before.<\/p>\n<p>Legend has it that Andrew Hunt and David Thomas (a couple of programmers from days gone by), would carry around an actual rubber duck. When they got stuck, they\u2019d explain their code to the duck. But not just the code itself. They\u2019d also describe their goals and what they wanted the code to do. And they would do this in as clear and simple terms as they could.<\/p>\n<p>Have you ever been in a situation where you are explaining a problem to a friend\u2026? And before you even finish, you\u2019ve come up with the solution. Same idea. The bonus with rubber duck debugging is that you don\u2019t even need to disturb anyone.<\/p>\n<p>To solve problems and to learn things, it often helps to teach them to someone else. This is the premise behind rubber duck debugging. Unfortunately, the duck doesn\u2019t give you the solution&#8230; But by talking things out and explaining issues, you clarify and uncover solutions.<\/p>\n<h2>Try it Out<\/h2>\n<p>Rubber duck debugging is a popular technique in the programming world, but maybe it&#8217;s not just for programmers&#8230; Anyone who is working through a complex problem or trying to brainstorm a creative solution could benefit from it.<\/p>\n<p>So, the next time you&#8217;re feeling stuck on a problem, grab a rubber duck (or your pet) and give it a try. You may be surprised at just how helpful it is. Quack quack!<\/p>\n<p><a href=\"https:\/\/confirmsubscription.com\/h\/t\/CF37F07A2B9A746D\">Sign up for our newsletter<\/a> for more web tips and updates \ud83d\ude42<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Why are we talking about rubber ducks on the Web Services blog? Turns out, rubber duck debugging is an actual thing that developers do&#8230;! As part of our Agile working process, we have daily meetings where we update each other on what we are working on. And we talk about any issues we are encountering. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":18955,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[369],"tags":[],"class_list":["post-18950","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-carleton-cms"],"acf":{"cu_post_thumbnail":""},"_links":{"self":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts\/18950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/comments?post=18950"}],"version-history":[{"count":1,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts\/18950\/revisions"}],"predecessor-version":[{"id":20616,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts\/18950\/revisions\/20616"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/media\/18955"}],"wp:attachment":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/media?parent=18950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/categories?post=18950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/tags?post=18950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}