Showing posts with label thoughts. Show all posts
Showing posts with label thoughts. Show all posts

February 24, 2021

Rubber Duck Debugging

I recently came across this interesting debugging technique named 'Rubber Duck Debugging'. The name is a reference from the book 'The Pragmatic Programmer' by Andrew Hunt and David Thomas, in which a programmer is able to debug a code by explaining it line-by-line, to a rubber duck.

Though this was not exactly an 'Aha! effect' for me, it did set some curious nerve tingling, prompting me to read on and ponder over it.

“A very simple but particularly useful technique for finding the cause of a problem is simply to explain it to someone else… They do not need to say a word: the simple act of explaining, step by step, what the code is supposed to do often causes the problem to leap off the screen and announce itself.”

Verbalizing our assumptions, forces an evaluation from different perspectives and can provide a deeper understanding of the problem because it forces us to pay attention to detail. As a result, we may immediately gain some new insight into the problem.

So is the case with teaching a subject. Teaching a concept to another person (or even "the Rubber Duck") is one of the most effective ways to grasp it. One may then say, "a coworker might be able to substitute for the duck". However, many a times teaching a rubber duck may be more useful than explaining to a colleague, because suggestions from a colleague may lead to distractions or digressions, making it harder to solve the problem. Hence, the 'Rubber Duck'.

The technique touches on the cognitive science behind this phenomenon. When we think to ourselves, our brain is locked in a symbolic representation mode of thinking and uses only single sets of neural pathways and neural processes. This tends to keep us in a repetitive mode, leading us into a loop. Instead, if we actually say it out loud, this activates entirely different regions of the brain, taking totally different pathways. So, saying something out loud is more impactful than just running it over in the head.

Evaluating from different perspectives gives us a better/deeper understanding. This is why, when we’re trying to learn something difficult or complex, activating as many different neural pathways as we possibly can, helps strengthen memory and establish connection with the concept. This is why hand-writing notes is more effective than just simply listening or typing them.

And this brings us back to the Rubber Duck Debugging concept (or simply, Rubber Ducking)! By explaining things out loud, we’re not only using different sets of pathways and processes in the brain, but also filling in the gaps in our reasoning and assumptions. Thus the act of explaining the problem step by step, to the 'Duck', makes the solution present itself. The concept can be extrapolated and applied to other tasks such as revising for exams, preparing presentations and editing essays. Reading an essay out loud, for instance, can help one decide whether the sentences are grammatically correct and whether the essay flows well.

Here's to teaching rubber ducks!


May 4, 2020

आज यूँ ही

आज यूँ ही बैठे बैठे याद उनकी चली आयी है।
फिर मुसकुराहट वो प्यारी लौटी है,
फिर आँख मेरी भर आयी है।
यूँ तो नज़र में रहता है उनका चेहरा हर पहर,
बात भी दिल में होती है उनसे शाम सहर।
मग़र आज शायद बात कुछ ख़ास हो आयी है,
ज़िक्र उनका कुछ ख़ास हुआ है दिल की गहराई में
जो आज यूँ ही बैठे बैठे याद उनकी चली आयी है।
फिर मुसकुराहट वो प्यारी लौटी है,
फिर आँख मेरी भर आयी है।
आँख मेरी भर आयी है।।

November 12, 2014

जो छू कर गुज़रती है मुझे


जो छू कर गुज़रती है मुझे, हवा,
आँचल तेरा भी छू जाती तो होगी।
के याद करता है तुझे हर घड़ी कोई,
कानों में तेरे कह जाती तो होगी।

सिहर उठता हूँ बारिश की जिन चंद बूँदों से मैं,
तेरे दामन में भी मोती यादों  के भर जाती तो होंगी।
जो तड़प के बरस उठती हैं आँगन में मेरे, घटा,
आँगन तेरा भी अश्को से भिगो जाती तो होंगी।

काँप उठती है जिनके छूने से कायनाथ मेरी,
होठों को तेरे भी यादें वो थरथराती तो होंगी।
जो सिसकती, मचलती हैं मेरे आसमाँ में बिजलियाँ,
रोशन तेरे घर को कहीं कर जाती तो होंगी।

जो जलाती, है चिराग निगाहों में उम्मीद के मेरी, चांदनी,
तेरे दिल को भी सुकूँ दे जाती तो होगी।
जिनसे रौशन है हर घड़ी दुनिया मेरी, यादें ,
चिराग दिल में तेरे भी जला जाती तो होंगी।

January 19, 2013

Dare I say?

Why do movies with item numbers make a bigger dent on the box office? Why does an item number always make it, even if the movie bombs? Why do movies 'have' item numbers, to begin with?
Right! We all have the answer...

There's no denying that we are a country of the masses, and are we talking masses around, these days?

Well, ours is a closed society, a closed culture, where most of the population still is far far from the 'urban' world. Here most families still have their daughters clad from head to toe, tucked into the deeper recesses of their homes--literate or not...sheltered, 'protected'!

Yes, ours is a closed society, a closed culture, but the fabric isn't sturdy as new anymore! It's not without peep holes!

What's all this here, about?

Well, aren't there guys that say why they 'enjoy' women's tennis games on TV? Or that they find dogs better off for their just whenever...with just 'whoever' advantage?

Oh yea! We are a closed society, a closed culture still, but not without these peep holes--the tennis in shortest of short skirts, the item numbers...the count just begins here!

It's the beginning of transition...a journey that's never easy! We have cities with their upcoming urbans juxtaposed with the 'not urban yet', still...and there have to be consequences!


Just the other day there was report of some north Indian states having a high ratio of crimes with a sexual orientation, and a low women to men ratio. Well, isn't the picture clear then? Do we need everything said out loud and clear?!


A closed patriarchal society, with members among the masses who excite at the sight of mere mini skirts in a game of tennis, teased by the likes of item numbers and left to fend for themselves...

Oh yea, there's people being heard saying girls have to be more clad, and not instigate crimes against them...and there's ridicule of it! But let's look at it. It's not all baseless! Yes, there are such crimes against fully clad women, and even little girls, then aren't the less clad ones easier targets, given that they would excite fancies easier?! No! We definitely aren't talking 'rights' here!

Ours has been a land of segregation, of purdah (veil) for many a century, and it's bound to enrage the the guardians of such a society, to see the purdahs being discarded...well, have we ever thought why this purdah even came into being, in the first place? No, I'm no advocate of it...of anything, nor a critic!

Well, why did women start 'jauhars'? Oh yea, they did it on their own...the cause, the reason not being 'their own' of course!

If we come to asking questions, there would be no end to it! Did we ever think, 'when it's between kings and kingdoms, why do the women of the overtaken almost always have to pay the price with their honour'? Be it a holocaust, an army siege...no matter what!

Well, for that matter, why do some countries need extreme punishments such as stoning to death/hanging for crimes against women?

It all needs to be thought through, and thought well...

July 2, 2010

They lie too deep

Thoughts oh so fragile,
from deep within
surface unbeckoned
at unsaid times.
Like effervescence,
oh! hard to hold!
so out of reach,
can't try and touch!

Thoughts oh so fragile,
from deep within
come and go
as they please!
They smile our smile,
and cry our tears
on stealthy toes
come rob our sleep!

Thoughts oh so fragile,
from deep within...