Showing posts with label pondering. Show all posts
Showing posts with label pondering. 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!


November 27, 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...

April 7, 2012

ये घटा नहीं बरस पाएगी...


आज फिर, लगता है, ये घटा नहीं बरस पाएगी...
आज फिर ये हवा साथ इसको ले जायेगी!
रोज़ ही, कुछ दिन से यूँ घटा छाती है,
रोज़ ही मगर, बिना बरसे चली जाती है.
रोज़ ही दिल में एक उम्मीद सी होते ही जवाँ,
मन मसोस, खड़ी देखती रह जाती है.
कि जो छाती है घटा उम्मीद के निशाँ लेकर,
वो कहीं और जाकर बरस जाती है!
 

aaj phir, lagta hai, ye ghata nahin baras paayegi...
aaj phir ye havaa saath isko lejaayegi!
roz hi, kuchh din se yuun ghataa chaatii hai,
roz hii magar, binaa barse chalii jaatii hai.
roz hii dil mein ek ummiid sii hote hii javaa.n,
mann masos, khadii dekhtii rah jaatii hai.
ki jo chaatii hai ghataa ummiid ke nishaa.n lekar,
vo kahii.n aur jaakar baras jaatii hai!

February 10, 2012

भोर अब हो ही गयी

थे अँधेरे घने, जलाए मैंने चिराग बहुत
थे अँधेरे घने,  जलाए रखे चिराग मैंने अब तक
अब तो सो रहूँ, जागा हूँ रात भर का मैं
अब तो सो लूं के भोर अब होने लगी
सो रहूँ अब, के भोर अब होने लगी
बस, सो रहूँ अब, के भोर अब हो ही गयी.

January 14, 2012

Anita

"Anita is on leave" one maid at the hostel was telling another...

Yeah, Anita has been on leave ever since her counterpart/co-sister (what ever husband's second wife is called) was diagnosed with leukemia. So, Anita now does all the household work, looks after 'their' kids, and takes care of the sick woman as part of her wifely duties...and bears the responsibility of finding the leukemia its way right into 'her' veins through her curses! Of course! Why else would it happen to her and none else?! Of course! Who else had any job cursing the poor woman?!

Wow! What rewards! What rewards for bearing it all silently, and compromising at every step...Well, didn't she do it as much for herself? To 'have' a husband's roof over her head and his name appended to hers. To belong to someone, to belong somewhere!

So, she bore it all...the ignominy of being the second best, the ignominy of being the barren daughter-in-law...the one who couldn't bear the family a progeny to take its name to gen next...the one who gracefully compromised to sharing him, so the family would keep going.

"The second wife passed away last night.", "...the poor thing!", "...she left behind two little kids", talked the maids among themselves.

Anita now has 'being the step mother' added to her bag! The price to pay, for asking sometime, somewhere in life, to be 'the only one' perhaps?!