Magic!

One time during my grad student days I had dinner.

Unbelievable, yes, but true.

With a friend. Yes, even more incredible, but true.

At a restaurant. Now I’m really pushing it, aren’t I?

2817-so-rdvreveillonrusse-photofancy1-fr2Well, ok, since we’re over the top, I might as well go the whole hog and say it was even a fancy restaurant. One of those places where, as you dine, a happy violinist in shiny tux and a big smile comes by and plays a nice tune.

I used to say that’s a great idea to distract you from realizing that the food was awful. When you’re poor you have to wear your wit to keep warm.

I had initially resisted the suggestion to eat there. But my dinner companion said that they were gonna have a magician that day. Their violinist had gotten sick from the previous night’s dinner. It was usually on the house for them. I’m guessing he wasn’t happy. Or smiling.

I like magic. So I went. Sure enough, no sooner than I’d washed down my first mouthful with a large gulp of affordable water, a short friendly dude in a tall hat came by and asked if I’d like to see a trick.

Would I ever? So I said “Absolutely” which was my Ph.D. advisor’s favorite word. Before he took me on as his student.

I used to think I was pretty bright. But this guy did a trick that had me completely stumped. With cards, no less. Try as I might I couldn’t figure out how he did it.

Then I did some quick mental calculations.magician-restaurant

“Ah…” I thought. “That’s how it works. A 10% chance that he’d flub it, which would be about one of ten customers. And when that happens, he’d distract you quickly with a follow-up trick so you’d forget he messed up.

Even if he doesn’t have a pretty assistant.

And then something cool happened. He must have sensed what I was thinking. Magicians are like that. Now magicians never do the same trick twice. Even to different people. Yes, magicians are like that.

But this short dude adjusted his tall hat and said “You know what? I’m gonna do this trick again. I’m gonna do your friend now.”

He did it. With the same awesome effect. My friend wasn’t into magic as much as I was. So he just smiled. Which I always thought was a great cover up for bewilderment. But me? I was floored. What are the odds that the trick works twice in a row? It’s the probability that it succeeds both times. And 90% percent squared is just 81%. That means one in five pairs of customers could be disappointed. Double the risk of embarrassment. I doubt a professional entertainer would accept that.

Even for dinner on the house.

So how did he do it? The inquisitive me couldn’t resist. So I posted my take on the whole thing on the Quora of those days – USENET. I said that I just saw an amazing trick and “here is my oh-so-clever take on how it’s done. And can anyone do better than that?

Professional magicians are tech savvy. They were on the Internet long before many of you discovered it. Usenet days. Maybe they had a hand in conjuring it up. One of them responded to my post the very next day.

He said I was clever. No magic there.

But then he said that the pro magicians were cleverer. That they’d never do a trick that didn’t work 100% of the time. They take no risks.

He said he could tell me how it’s actually done if I was interested. But that it would snuff out a tiny bit of magic from my life.

I said “Absolutely.”

I was way too brilliant then. And way too young. And way too stupid. Now I like to believe I’m only one of those.

So he broke it down for me. One email. One sentence. That’s all it took to kill the magic.

That trick has never been the same for me since. But I got to appreciate the compassion of magicians more.

When they ask “Was it good for you?” they don’t mean it like when we say “Was it good for you too?” I know what they’ve given up.

That’s what I told my students recently. They had to generate random and unique ID numbers for a million pets – Random numbers ranging from 1 to ten million. So if you were to guess a random ID, you’d only have a 10% chance of finding an actual pet with that ID. They were working on a Pet Store app.

petshop

And one more thing… the distribution of IDs to pets had to be uniform. Not all bunched up in some range. Or you could simply assign the first million numbers to your million pets. And of course, two pets can’t have the same ID. That’s what unique means, right?

That what makes it interesting for them. Coming up with a scheme to assign uniformly random IDs to a bunch of pets. Without conflict.

It’s simple. But they’re beginners. Some students try to concoct fancy schemes. Some of these are quadratic. “Look up each ID before issue to see if it has been used” for instance. That’s a good baseline response. Ripe for a suggestion to make it faster. To make it linear.

But some say they’ll just do random IDs without checking. “It’s gonna be unique 90% of the time. What’s the problem?”

Probably not the right time to ask whether they’d settle for a 90% (B+) in the final. But here’s where I bring out the magician story. It’s not enough to be correct 90% of the time. You need to be right always.  

The story makes them appreciate proofs.

At the very least, it gets them thinking about algorithm correctness. What it means to provide guarantees that a program does what it says it does.

One of them says that’s why we trust computers more than we do humans.

Some humans.

&

And oh, if you’re curious about that magic trick, you can see my sloppy version of a similar one on YouTube. I did it for my students.

Posted in Stories, Student Motivation | Tagged , | Leave a comment

Baseless Arguments

Yippee! I get to reflect on one more thing this week. Thanks to Charles Witschorik’s feedback. He got me thinking about Basis in induction. That he did.

Learning a new language

Every quarter, predictably, at least one student asks me which language they should learn. Should it be C++, Java, Python or something else? My response to them has been the same. I talk to them about human languages. We all have different words for different things. But beneath the covers, as it were, the direct sensory experiences that these languages convey are the same. When I say I’m hungry, or angry, or in love, I mean the same as when a Spanish speaker says estoy hambriento, or enojado, or enamorado.

FlowDiagram2

The superficial representations are different, but the emotions and feelings they signify are the same. I then use that as an excuse to emphasize the importance of fundamentals. I tell them that regardless of the language they write their programs in, by the time their program reaches the CPU it’s been transformed into a completely different language: Machine language – Bytes of instructions for the particular chipset that the computer is based on. The CPU can’t tell the difference between a program written in one language and another because it never sees it. What it sees are just CPU instructions. Far better therefore, I tell them, to learn how the CPU reacts to instructions because you can always learn a new language in terms of what the CPU will need to do for you.

Is a dictionary sufficient?

Once an (imaginary) friend told me he didn’t need a tutor or immersion for learning a new language. Claimed he could do it from a dictionary.

“That’s impossible.” I said. “You only get words defined in terms of other words. It’s circular.”

“That’s true.” he said. “And I have a photographic memory. Like Dr. Strange. Or Holmes.”

I looked perplexed.

“I mean the detective.” he added quickly, as though I was dense. Said he could instantly recall which word or words any other word was defined in terms of.

The truth is, he had a point. If learning a language was all about remembering the rewrite rules – how one set of squiggles (symbols) maps on to other sets of squiggles – then in a curious, theoretical, outside-perspective way one could be said to have learned a language when they manage to successfully masquerade as a squiggle manipulator. Or a “symbol transformer” to sound more erudite.

I mean, you can go to translate.google.com today and type in a sentence in a bunch of different languages. It will faithfully map it to another target language of your choice. Most of the time Google gets it right. I know that teens routinely use it for their language homework.

ChineseRoom2009_CRsetDoes Google translate understand these languages? You’re probably thinking that all this harks back to The Chinese Room experiment by Searle. And I continue to hold the view that naive symbol shuffling, by itself, does not understanding make. It’s entirely possible that machines in the very near future (in fewer than five years) could well have real understanding of a language, but at the moment they do not. What’s missing is the important link between certain root words in the language and our direct experience.

One day, soon enough, we’ll have sophisticated machines that hold concepts –  internal representations of objects and events in the external world. They’ll be able to forge live links from words to these concepts. And stitch together rich tapestries of concepts made of links to other concepts. And have goal directed behavior where the goals have been installed in them by us, their creators.

ideas-things-network

This will mark the emergence of consciousness as we know it in the machines. At this point it will make sense to say that the machines have experiences, like our own. Or transcending ours even. But until then, our machines can at best be said to exist in only highly rudimentary states of consciousness – not unlike primitive organisms that simply respond to stimuli.

ROCHRF-00014572-001All knowledge is ultimately grounded in direct experience. This is a fundamental postulate of epistemology. That’s why learning a language exclusively from a dictionary is futile. Some words – root words – must necessarily leap out of the dictionary and point directly into the real world from within our heads – either to objects, events, or ideas combining them and other ideas. But ultimately tying them to one or more direct sensory experiences. That is the final link. The experiential mile. The feeling mile. The last mile. When this happens is when a word finally comes alive. If not for these hooks into our direct experience, what we have is simply a network of primitive symbols to primitive symbols. The network could be elaborate and sophisticated. But if it isn’t pinned to experience, it lacks reality. Since fact is based on reality, and the only absolutely true facts are the facts of our own direct experiences, it is the crucial link of having a direct experience that lends reality to any idea, concept or thing that may exist objectively out there in relation to other ideas, concepts and things.

To be sure, that network of ideas, concepts and things is indeed elaborate, sophisticated, and huge. But by itself it’s useless until it’s nailed down to direct facts. These direct facts are the bases for our knowledge.

Charles prompted me to further elaborate my notion of basis in mathematical induction (my previous post) and I was going to. But what accelerated my output was his alternative observation of the basis as a “sterile predicate function”. While he’s right in one sense, from another, the one I talk about here, the basis is anything but sterile. It is that which gives meaning to the whole exercise of induction. Without a basis, the inductive proof is sterile, impotent, and as useful as a castle in the sky. Just as without direct first hand experience and feeling, this whole world out there is hollow, meaningless, and worthless. Pure fiction awaiting realization.

That’s why we say “There’s simply no basis to your argument” when we disagree with someone else’s point of view vehemently, at a fundamental level.

Thanks for the prompt, Charles.

&

Posted in Stories, Student Topics | Tagged , , | 1 Comment

Lateral thoughts on Math Induction, and the Importance of Having Fun.

Startup Stock PhotosToday I taught my class about recursion in computer science. As a precursor to this important topic, I also review the concept of Mathematical Induction. For those not in STEM, even if symbolic logic isn’t your cup of tea and Math isn’t your forte, please read on. I promise not to meditate on the Math in the topic. Instead I will focus on the Fun of it. This article contains digested material from various sources, classical and modern, laid out in lay terms for bedside reading.

Kinds of arguments

As those of us who studied philosophy know, there are two major kinds of philosophical arguments: Deductive and inductive. Deductive arguments give you conclusions that are guaranteed to be true if the premises are true. Suppose the first premise is that all men are mortal and the second premise is that “Socrates is a man”. The deductive conclusion you can draw from these two premises is that Socrates is mortal. There are no two ways about it. The important thing to keep in mind is that the argument is valid even if the conclusion is false. How can that be? Well, one of the premises could be false. If some men are immortal, or if Socrates is a god, for instance, then it’s entirely possible that Socrates could be immortal – yes?

Inductive arguments, in contrast, appeal to statements about the real world. Their domain is the universe of observations and measurements. Induction is what lies behind our daily lives (“It’s not gonna rain today so I’m gonna go on a hike”). The entire field of empirical science is based on inductive logic. It allows us to form tentative conclusions about reality while accepting the possibility that the premises do not necessarily lead to the conclusion always.

For example, my premise could be that the sun has always risen in the East every morning and my conclusion from this premise that the sun will rise in the East tomorrow. While it’s most likely true, there’s a slim chance that a comet could strike the Earth at night causing it to reverse its spin before dawn. In this case, my conclusion would be false even though the premise is true – The sun has indeed risen in the East every morning thus far.

The point about deductive and inductive logic is that by guaranteeing the truth value of the premises, the factory of deduction faithfully promises to deliver a true conclusion. But the factory of induction could only give you a conclusion that’s likely true.

Mathematical Induction

Knowing this, we can now look at the amazing technique of mathematical induction which combines deduction and induction in a clever way to arrive at absolute (not tentative) truths about an infinity of things. It’s important to appreciate the distinction. Both induction and math induction rely on observations or experiments on some small set of things. In the induction example above, the observations were regarding where the sun rose for every day of recorded history. Its ambitious conclusion was that it would rise in the East every day of the future. Clearly, this conclusion will be wrong some day. In contrast, math induction is able to examine a similarly finite set of observations, but pronounce a truth that is guaranteed to be true for an infinite set of similar items – not just likely, but guaranteed. Imagine that! A technique that allows you to make true statements about everything by examining a small set of things. How does it do that?

It starts by combining an absolute truth you can establish using deduction with an observable truth about one or a few items. The items, however, share an important trait. They are related in some sequential way. They can be put in order.

Suppose you’re trying to prove a statement about life and all humans – say, “All humans like ice cream”. Math Induction says to first use deductive logic to prove a statement about the statement – specifically, prove that “If the statement is valid for some human, THEN the statement is valid for some other humans.” Typically “other humans” will be the next set of humans in some imaginary line such that as we progress down the line we’d eventually cover every single human.

People-Queue

So the first step is to show that IF some person likes ice cream, then the next person will also like ice cream. Note two important things about this step. First, the choice of “some person” should be purely arbitrary in that it could apply to any human, not just Bob, whom you know to like ice cream. Second, the establishment of that fact must be deductive, that is, bulletproof. Effectively what you’ll be saying is that IF A likes ice cream then B is guaranteed to like ice cream as well. And A could be any person in the infinite line of humans.

Often, proving this is no small feat, of course, and you may have to resort to fancy logic to simply establish this fact. But the critical thing to note is that this proof by itself, magical as it may be, DOES NOT GUARANTEE that all humans will like ice cream. It may still be that no humans like ice cream.

To conclusively prove that all humans like ice cream, you need one more important ingredient. That’s the second step, which is called the basis of induction. All you have to do now is to inject the result of an experiment or direct observation into this chain. Now you go and test if the first human in the line of humans likes ice cream. Suppose she does. Then BAM! You’ve instantly proven that every human likes ice cream. Why? Since person #1 likes it, person #2 must also like it because of the first step where you showed that if someone likes ice cream then the next one MUST like it too.

People-Queue-With-Basis

And since person #2 likes it, by appealing to the same logic, #3 must like it, and so ad infinitum. Sweet?

The beauty of this technique is that it combines deductive logic with direct experimental data to make a grand truth. The first step is the deductive logic (strangely called the inductive step) and the second is the experimental validation for a particular case (called the basis). It’s like you have this grand castle of logic in a different intangible dimension, and by tethering it to a small part of our testable and observable world you’ve brought it down to impact the entire world.

Having mindful fun

As I say in my mindfulness blog, the discriminative mind is the mind that plans. It is the part of our consciousness that wields the scalpel of logic. Clearly it must be kept sharp and incisive. But we must always keep in mind that the discriminative mind is a humble servant. To what end do we plan? Why do we do the things we do? A moment’s reflection suffices to show that all cerebral activity is geared towards generating positive experiential responses in our feeling mind. What good is it to have a powerful tool with nothing to use it on? Even those who claim they practice pure logic or art for its own sake only do so because it makes them feel good. To claim otherwise is disingenuous. On the other hand, a desire to feel good only, at the expense of a sharp and keen intellect (the discriminative mind) goes nowhere either. It’s only the fruitful union of the two – the feeling mind and the discriminative mind – that results in harmony.

How does this all tie in to having fun? Well, we like to have fun – that’s a no-brainer. We’ve already seen that. Learning a skill for the discriminative mind, say Math, Computer Science, or indeed any other endeavor, is surely useful, but serves no purpose by itself. One can become mechanically perfect in playing the piano, for instance. But what shines through to the audience is not their mechanical perfection, but their passion for the piece, their love of the art. I liken the perfection of a skill like programming to the mechanical calculus required to turn one thing into another.

Mechanical perfection, which is important, is like step 1 of Math induction – Elaborate, sophisticated and requiring much training, intellect and expertise. But if it doesn’t serve the “feeling master” within us, then it’s worth precious little. The positive experiential response that practicing the skill causes in you – I liken to the basis, and it’s priceless. It is that which grabs the ornate floating castle of logic and anchors it to the ground so we may enjoy it. Neither by itself will suffice.

So the first step in learning any skill is to cut a fast path to sampling the fun in it, and thereafter always keep the fun in focus. To this end, I try to get my students to appreciate and enjoy computer science as quickly as possible. The routine technical skills then come naturally as the desire to have fun with Math and CS takes root.

&

Posted in Student Motivation | 3 Comments

Anxiety Meltdown

anxiety-banner

Anxiety meltdowns are no fun. I’m sure you’ve had them at some point in your life. Especially if you were a student. Or child. Or parent. Or teacher. Or employee… Or HUMAN.

anxiety-2If you’ve had one (which you probably have), you know EXACTLY what I mean.

If you think you haven’t, then chances are that they’ve happened in a distant past nook of your life – so distant that it’s in the tape archives of your brain, rather than in its RAM (nor even in its hard drive).

If you truly haven’t had one, well, then you can count yourself amongst the lucky and incredibly tiny fraction of our population that may be in your situation.

todo-listI unabashedly admit that I have had anxiety meltdowns many times in the past. As a grad student, I delighted in my discovery that making lists of things to get done helped somewhat, but promptly realized that it was no panacea. Pretty soon, I’d found myself with an overwhelming list of TO DO items that were never getting done – there simply was no good reason to start at any particular task. Of course, I could rationalize that I must start somewhere and that getting one thing done was better than getting nothing done at all. But that was the rational and discriminative mind speaking, even tragically conscious of the fact that it was unable to spur the sweating body into action.

fear-2Anxiety meltdowns are crippling. We find our feeling mind to be completely aware of what needs to get done, and yet the body is too paralyzed to act. We are forced to watch with increasingly despondent anticipation of impending doom even as the torture of involuntary inaction is inflicted upon our most beloved one – our own self. Enough to make even a cold-blooded Bolton bastard shiver in his socks!

Can you relate to this? I bet you can if you were one of the many students who have talked to me about stress in their lives and how your medication isn’t helping. Medication may not help, but meditation will. Like making lists, medication alleviates the symptoms, but unless you leverage that temporary respite to step back and reflect deeply, it doesn’t solve the underlying (and growing) problem.

anxiety-cartoon

teachers-mindful2The answer that helps the anxious ones is clear when we admit that we have once been victims of the same affliction ourselves. Then we think back to how we came to address the situation and pass on the learned knowledge to the next generation so they can also put it to good use.

So, how do we, as adults, avoid (mostly) these anxiety meltdowns that seem to plague the lives of the little ones? Speaking for myself and those that I have observed and talked to, I see that we do this by nipping issues in the bud. An introspective nature equips you with the tools required to reflect upon your life. We calmly observe what we did, should have done, and should not have done to avoid certain painful situations. 

heart-attackAs always, this is best illustrated using an analogy of an unforeseen physical setback. Of course, nothing can be done about sudden calamities. An unexpectedly sudden stroke, heart attack outta the blue or a devastating accident – these are things we have no control over, and need to learn to accept in order to carry on. That’s a different skill which is not the subject of this article. Here, we’re concerned with the non-sudden calamities. Those that happen with sufficient warning. Suppose a man has survived a heart attack. We find that he is usually acutely aware of any symptoms that might suggest the onset of the next one after the fact. When he notices one, he doesn’t ignore it. He doesn’t wait until the symptoms mushroom into a full-blown attack. He seeks medical attention promptly to put it to rest, yes?

mindful-student

So it is with those who have learnt to deal with anxiety. Because we have gone through the painful experience of an anxiety meltdown ourselves (YES, WE HAVE. And we know just how sickeningly awful it is. It’s nothing to look forward to. And everything to fear and loathe), we’ve developed such an aversion to it that we’ve started looking out for its earliest symptoms.

Because having one is such a personally traumatic experience, we are constantly evaluating everything to see if it has even the slightest likelihood of causing an anxiety attack. If so, we douse it as soon as we see it so it never even gets a chance to flare up into a full grown attack.

stitch-in-timeSometimes age brings wisdom. With reflection and insight born of wisdom we can see and evaluate situations for what they’re really worth, and consider the value they bring to our lives. But being young comes with its handicaps. Because every situation and experience is so new, the mind is completely overwhelmed by them leaving little if any time at all to reflect. Here is where it helps to meditate. By training your conscious mind to calm down, you get an opportunity to peer into its inner workings. You get to see and observe the life cycle of your personal experiences and evaluate them. You discover new ways to tackle painful situations. You learn to identify common patterns at an intuitive level so you can respond appropriately to them before they even percolate up to your discriminative mind. You will then truly understand what your grandfather meant when he said that a stitch in time saves nine.

I believe that’s what we, as adults, do to avoid anxiety meltdowns. You should know that if we were in the same situation as you, we’d react exactly as you did. We too would melt down, incapacitated, hopeless, sorry, and almost every other emotionally negative adjective you could think of. But since we don’t want to get there, we’ve gotten good over the years in making sure to avoid them.

We address small problems when they’re still small not out of discipline or some other pride-making quality, but out of fear, and the knowledge born of experience that letting the situation get out of hand may well destroy us. Isn’t that why Google tried to buy out Facebook when it was still in its diapers? Isn’t that why Facebook tried to buy Snapchat?

storm-sailing

It’s not that the sea is calm everywhere when we command our ships. It’s just that as seasoned captains of the sail, we’ve learned how to steer clear of storms by spotting dark clouds from a distance.

&

heart-leaves

oOo

Notes

This article has been cross-posted to my meditation blog at https://MindfulAtFoothill.wordpress.com

Posted in Student Motivation | 2 Comments

Starting Trouble

Starting Trouble

Lao Tzu said that a journey of a thousand miles begins with a single step. Likewise, an article of a thousand pages starts with a single sentence. Yep! But although I didn’t plan on writing much over 25 sentences, it took me well over a day to put down the first sentence after deciding to write it yesterday. Why this inordinate delay? And how can I fault our poor students for putting off getting started on their laboratory assignments until the day before they’re due?

painters-blockStarting trouble is all too real, and getting older and wiser doesn’t make it less ubiquitous, although it equips one with strategies for overcoming it. Writers have a writer’s block. Painters have a painter’s block. And sculptors have, well, a block. I’m not especially proud of that last pun, but I wrote it down as part of a content dump for this article, and so I’m gonna let it stay to make a point later.

sculptor_blockProgrammers are no different from any other artists when it comes to starting a project. When you have a clean slate, it’s tough to know just where to begin. Even in large projects involving several teams and millions of lines of code, individual programmers often find themselves in a similar situation when they sit down to write one or more smaller self contained modules for which they are responsible.

In class projects it’s easier because I walk around and help them get started. But the prudent student is always aware that the help she gets in class will typically not be available when she codes later on her own. And so she’ll be thinking about how she’d overcome the dreaded programmer’s block when starting a lab assignment by herself. Programmers often procrastinate not because they don’t know how to start a project, but because they’re just messing around not knowing exactly where to start. Often, once a start is made, like in an essay, the rest of the project falls into place around it.

Fortunately, most everything that works for literary authors also works for programming. Thus, by drawing upon techniques used by authors in the past, programmers have access to literally hundreds of years’ worth of strategies to get started on their projects.

One of the most common and promising recommendations I’ve heard for stuck authors is this: Just write – Don’t care for grammar, sequencing or even voice. Just write… whatever comes to mind. The goal is to create a content dump first, then worry about organizing it and finally about decorating it. But note that this is a meta recommendation. When an author is stuck for content, the recommendation says to write about anything at all. Even gibberish helps, like when I wrote silly things like “Sculptors have a block.” Writing anything at all helps because it sets the writing machinery into motion. That’s one less thing to worry about when trying to write real content. Here’s a scene from the movie Finding Forrester that illustrates this point.


jamalwallacefindingforresterAn aspiring and promising African American writer, Jamal Wallace, befriends the reclusive writing legend William Forrester. During a time when Wallace is struggling to get started on a school project, Forrester tries to get him started by having him type in the first few words of one of Forrester’s old essays. The essay blossoms into something original and splendid, but also lands Wallace in hot water for plagiarism.

Happily, we don’t always have to start copying someone else’s work to make a start on our own. I’ve found that, at least in Computer Science, we can start on one of our own past projects and morph it quickly into the soup du jour. So I tell my stuck students to start from an existing program, no matter how simple. It may even be one that simply prints “Hello World” and exits. I ask them to type it out (and to not copy and paste it) and go from there.

If they’re bootstrapping and don’t have any of their own code to draw upon, I tell them it’s ok to use someone else’s program or one they find on the web, with the following caveats:

  • It must be unrelated to the problem they’re trying to solve.
  • No matter what, the foreign content must be typed in by hand, letter by letter.
  • If the student is still stuck after copying in the content, they should start making stylistic changes to the copied code to introduce their own programmer’s voice into the program.

gathering-momentumIn the process of doing this, many students reported that they gradually edit the program to suit their needs. This morphing process picks up momentum to the point that the program eventually undergoes fundamental changes to result in the required solution.

As the program starts to look more and more like something they’ve written, students begin to feel an increasing sense of ownership of it, and so begin identifying places where they should change it to meet the needs of the current project. They develop a feeling that they’ve already started and are in the process of editing it, or tweaking its look and feel. After all, aren’t we all, as authors, guilty of spending more time putting the finishing touches on an article than actually writing it down in the first place? Don’t we look forward to it?

What a great way to overcome programmer’s block! If only everything were as easy.

&

 

Posted in Student Motivation | 2 Comments

Mindful At Foothill

holiday-1354563_1920

Today, more than ever it seems, students are most in need of ways to cope with anxiety and stress. Mindfulness is an excellent tool to help them. But unfortunately, it has also become somewhat of a fashionable term and everyone is into it in one form or another. There is a ton of information about mindfulness on the Net, and not all of it is accurate. In any case, reading and knowing about mindfulness in its myriad forms has almost become a barrier to its practice. But the practice itself remains remarkably simple, worthy of all the words that can ever be written about it, yet requiring few to exposit its sublime beauty and relevance. It can only be experienced, not intellectualized or known, in the conventional sense of the word.

The critical word above is practice. Like swimming, one may read all they can about mindfulness, enough fuel to sound wise and profound at every social they attend, but unless it is practiced (with surprising ease, I might add), it adds little of substance to a person’s life.

theravada-buddhism-1769592_1280I have been holding mindfulness meditation practice sessions during the 10 minutes before each of my 8am lectures (usually twice a week) since Week 2. When we started, we didn’t talk about mindfulness at these sessions, but actually did it. Any mindfulness related discussions were to happen on the blog I had set up for us. But I found that, just as in class, many students turned up before having read preparatory materials I had pointed them at. So after about Week 4, we decided to convene a minute before the session starts, at 7:49am. During that minute, I provide brief instruction and a reminder about what we ought to be doing. And then the session proceeds in noble silence and dimmed classroom lighting until a gong sounds at 8am and my subject class starts. We do not talk about the practice during or after class. We focus on Computer Science. Any discussion about the practice happens only at https://MindfulAtFoothill.wordpress.com.

To participate, I requested that students commit to attending all sessions of the quarter, be on time every time and promise not to disturb their co-meditators. If the classroom door had shut by the time they arrive, they were not to enter until 8am when the subject lecture would start.

In view of the relatively early hour and the many challenges our students face in getting to campus on time, attendance at these sessions was understandably low (about 5 students on average on a good day). Nonetheless, I’ve now had requests from a few students in neighboring classes that they’d like to attend too. To accommodate one such group which can’t make the 7:45 sitting because of a class at 8, I am currently trying to hold two sittings on each of the days – one at 7:30 and another at 7:45. Students are free to attend either or both.

phra_ajan_jerapunyo-abbot_of_watkungtaphao

The kind of mindfulness we work on is ana pana meditationan introductory primer to the non-sectarian technique of vipassana.

Sitting times for Winter 2017 are on Monday and Wednesday mornings as follows:

  • First sitting: 7:35am – Need to be there by 7:30
  • Second sitting: 7:50am – Need to be there by 7:45

Meditators who have made some progress and can maintain posture for the entire 30 minutes can feel free to come at 7:30 and sit right through into the second session. I will arrange for the second set of students to file in and take their positions as non-disruptively as possible.

If any of your students are interested in attending, please let them know that they’re welcome. If they haven’t read the primer on the blog and/or have questions they’d like addressed before the sitting, they should let me know to give the quick 1-minute overview before the sitting starts. I try to do that any time there is a new student in the sitting.

&

Posted in Uncategorized | 3 Comments

The Aryan Way

Swastika

Sometime ago, I overheard two students using the word aryan in casual conversation about someone they had met earlier. Although it seemed to be used in jest it struck me that the first step in overcoming xenophobic prejudice is to desist from using racially charged language, even benignly. The other alternative is to neutralize incorrectly charged terminology.

As it happens, at the end of last year I decided to take time out of the real world and attend a retreat that introduced me to The Aryan Way. Although the anglicized word was never used, we often heard the Pali version (ariya) of the Sanskrit original (arya). While the term itself was actually irrelevant to the experience – indeed, there is strong emphasis that the experiential aspect of the retreat is fundamentally ineffable and thus orthogonal to any terminological descriptions – we do come away with an understanding of various things aryan, especially the four Aryan truths about the nature of intrinsic dissatisfaction with existence and how to overcome it.

One of the most salient and relevant features of this 10-day silent meditation retreat is what I call the “Metta moments”. Every sitting ends with a voluntary and silent reflection of Metta which, in Pali, means benevolence, loving-kindness, friendliness, amity, goodwill, and active interest in others. Metta, as it happens, is one of the qualities expected of aryans. And yes, aryanhood is decidedly not something you’re born into, but a title you earn through righteous and noble actions.

I felt it opportune to revive this thought if only to lament how much the word has devolved over time from its original connotation. The word aryan means noble – in the sense of espousing compassion, inclusivity and loving kindness: all qualities we seek to show towards our students and engender in them. However, this powerful word has been hijacked and distorted to mean not just something slightly different, but actually the very antithesis of what its progenitors intended for it to mean. Ironically, in what might as well be the greatest tragedy of our times, the word has continued to retain its power while having lost its soul! – A true Voldemort of language, if ever there was one.

Some supporters of our present government are using the word to sow hatred and divisiveness amongst us. Rather than see unity amongst all beings and show empathy towards those in whose shoes we ourselves (or our ancestors) were at one time in this great nation, they seek to build walls (real and political) to keep passionate learners from getting what really ought to be their birthright. Rather than invite people in, they seek to push people out. I wrote elsewhere that Science and Spirituality are strong unifying forces of enlightenment, compassion and contentment based on testable claims (objective and subjective). Religiosity and non-science, on the other hand, are divisive force of discontent, contempt and ignorant violence. They are based on the bedrock of untestable (note – not untested) claims. Unfortunately, those in power appear to base all their decisions on such impulsive un-aryan sentiments.

unnamed

I do what I can during class to reassure anxious students that we, as professional educators, disagree with certain governmental policies, that we feel their pain and anguish as they face uncertain futures. And that we will stand for their right to be educated in this country. The commissioning of the Dreamer’s Mural by our college president two weeks ago was a fantastically bold and forward minded step.banned-7-flyer-2

I remember thinking that we now need to demonstrate the same kind of compassionate reassurance towards other international students who, for no fault of theirs, have been wrongfully penalized just because they were born in a country that our unenlightened government has stereotypically designated as evil. Imagine my pleasant surprise when just at that moment I received a message from our president inviting us to come and hear impacted students tell their story at “The Banned 7” forum! And boy, what a gathering it was – standing room only!

img_2903Watching a few students wince at some of the remarks made by our president on screen, I came to believe that regardless of what subject we each teach, imparting a sense of Metta to our students is hugely important – Who knows which of them may run for office tomorrow? We need to become a nation – nay – a world of aryans. But only in the sense of the original import of the word – not in its misguided sense as understood by ignorant xenophobes.

Besides being the socially responsible and humanitarian thing to do, the metta mindset also brings practical benefits to the classroom. The empathy it cultivates amongst students is conducive to learning subject matter in ways more subtle than being willing to help each other out with difficult concepts. Students learn not only to be kind to others, but also to themselves, which is even more important when faced with challenges and insurmountable obstacles. It gives them the courage to persevere in face of failure rather than resignedly think that some particularly difficult concept is beyond their grasp and will forever be.

To this end, I’m hoping to hold Metta Moments for my class before subject lectures start. This quarter I’ve already begun a mindfulness meditation practice (10 minute sittings) for interested students prior to my 8am classes on Mondays and Wednesdays. Anyone is welcome to attend, of course. I’ll post a more detailed note about this shortly, but in the meantime, you can point your students at https://mindfulatfoothill.wordpress.com for more information. From next week on, I plan to begin a minute earlier than usual so that we spend the last minute silently contemplating and reflecting upon Metta, our heartfelt wishes for peace and happiness to all beings.

&

Posted in Uncategorized | Leave a comment

Homage to the Humble Veshti

Welcome, Bienvenido, Huānyíng (歡迎), Namasté (नमस्ते), Vanakkam (வணக்கம்) – These are the words I used to greet my students on their first day of class. And I asked those who speak other languages to teach me how to greet them.

WIISC_EqualityEquity.pnge are proud to be an inclusive and welcoming educational institution. Nobody who comes knocking on our doors is denied an opportunity to learn for the wrong reasons. These are reasons irrelevant to the course work or the requirements to master it – reasons like ethnicity, nationality, sexual orientation or identification, and even physical or mental challenges that get in the way of a full appreciation of the subject matter. We boast one of the best accommodation centers of all colleges in the country that goes out of its way to make sure that each of our students is given the greatest opportunity to learn. Equity is not only our interest and focus. It is our mission.

Yet, despite the lengths we go to, some students feel intimidated in class because they incorrectly perceive the subject matter as being the privilege of some majority of the population – sadly, a majority they don’t feel a sense of belonging to. Recent research [1] has shown that student success could improve by as much as 2.5% if an instructor was also perceived to be part of a minority. Sometimes during our instruction, we get so involved in the subject matter that we walk, talk and behave in the “majority” bearing, simply because that’s the bearing we ourselves are most accustomed to espousing during our daily lives. We forget that by doing so, a minority would feel that they’re being given foreign matter to imbibe and assimilate, a task far harder than if one is given material they feel a natural affinity for.

So this time, on Jan 9, 2017, I decided I would point out that Computer anand-in-veshtiScience or Math is as universal as any other scholarly pursuit. Nobody has a better claim to it than anyone else. And to drive the point home, I decided that I would come to class dressed in my traditional Indian garb and lecture in it. What I’m wearing in the picture is called a Veshti in my native language, probably cognate with the Sanskrit term for clothing – Vastra (वस्त्र). In the North of India, it is often called a Dhoti. Besides being, in my opinion, one of the most remarkable and brilliant designs for clothing ever, it sends a strong signal to students in a Californian setting that their instructor is, or was at one point, a member of a minority population, and that didn’t prevent him from learning and enjoying one of the most beautiful subjects there is. If he can do it, then so can you!

Like the apparent simplicity that belies the tremendous sophistications of games like Chess and Go, both of which we owe to great ancient civilizations, the humble Veshti is a simple rectangular piece of cloth, but one which has highly condensed utility and elegance woven right into its fabric, as it were. It’s only variations are typically in the decorative stripes near its borders. And it is traditionally white or an off-white color that lets you quickly tell when it’s dirty and needs washing. By design, the Veshti keeps you warm in cold weather by maximizing skin-on-skin contact, cool in warm weather by maximizing airflow around your limbs, and transforms instantly in a fold from a full length article of clothing to one that’s half length to your knees. It’s easy to don, looks elegant and sophisticated, is utterly comfortable, supremely easy to wash, clean, shake and hang dry. You don’t need tips from Martha Stewart on how to fold it easily or store it compactly. Furthermore – and this is the feature I like most – one never has to worry about waist size when donning a Veshti – it’s literally a one-size-fits-all garment. Once you learn how to wrap it around yourself in one of many different ties, it stays put firmly until you take it off. Yet, sadly, despite my gushing praise of this amazing article of clothing, I don’t have enough of these to wear every day. I do, however, plan to grace the campus and my class with a Veshti as often as possible.

Just as “every student is unique and brings contributions that no one else can make” [2], every culture is unique and brings contributions that no other culture can make – a fact that I hope our incoming government will appreciate before they come to any hasty decisions about who is entitled a good American education. As Littlewood remarks in a recent movie about the mathematical genius Ramanujan, “Great knowledge comes from the humblest of origins” [3]. Let us not deprive this great country of ours from realizing its full potential by shutting its doors.

The Veshti serves as a reminder to me, and hopefully an indication to my students, of the value we each bring to this wonderful country from our respective cultures, and how not to throw the baby out with the bathwater. Hopefully, it also serves another important purpose – to our minority students – that the instructor also belongs to a minority group, at least temperamentally in the sense of feeling one of several belongings to, and that the subject he teaches belongs as much to one culture as another.

&

References:

[1] Fairlie, R. W, Hoffman, F and OreoPoulos, P. (2014) A Community College Instructor like Me: Race and Ethnicity interactions in the classroom (American Economic Review, vol. 104, No. 8, pp. 2567-2591)

[2] Bain, K. (2012) What the best college students do. (Harvard University Press, Cambridge, MA, p.72)

[2] Kanigel, R. (1991) The man who knew infinity: A life of the genius, Ramanujan (C. Scribner’s, New York). Movie (2016) http://www.imdb.com/title/tt0787524/

 

Posted in Student Motivation | 6 Comments

Is Three Better than Two?

HEWLETT-PACKARD and IBM used to have an annual boat race – or so the apocryphal story goes. For years in a row, HP beat IBM by miles. Eventually, IBM’s senior management couldn’t take any more of it.

“Enough of this public boat_1857918bembarrassment” they said. “Let’s put together a committee to get to the bottom of it. Why does our team infallibly lose to HP’s?”

So a committee was formed, paid well, and sent away on a corporate retreat to ponder this pernicious problem. Eventually, after six months of painstaking analysis over many games of golf, the committee returned with a recommendation.

“We know why our team always loses to HP.” They said. “HP has one person steering the boat and eleven persons rowing. But we have one person rowing and eleven persons steering.”

Impressed at this penetrating analysis by its committee, IBM sent them away for another six months to come up with a solution, which they did. When they returned, the spokesperson for the committee stood up and said. “We’d win the race if the person rowing the boat rows harder.”

And so it is with group programming. Williams and Kessler [1] talk about group programming as a natural extension to pair programming (p.84). Often I have a class with an odd number of students and I cannot successfully pair them all off. In such cases, and in situations where pairs specifically request it, I have tried to allow the formation of groups with more than two programmers. However, I have to be careful that I don’t end up with teams in which many programmers navigate and one drives. Even with my timed role rotation strategy, such a situation simply won’t work. At best, the teams with multiple navigators would end up completing their projects far too slowly and we’d have nothing to reflect upon and discuss by the end of class. Thus, I found the best compromise was reached with the following arrangement, which seems to work beautifully. The ground rules, which I typically explain to the students a few times during the first few lectures are:

  • No more than three students per group
  • Still only one keyboard and screen per group
  • Student A is the navigator – Calls out the code to be typed in.
  • Student B is the facilitator – Understands what the navigator is calling out and can interject with questions like “Why?”. This person cannot make suggestions, or change the design decisions of the navigator
  • Student C is the driver. Simply types in the code called by the navigator, which was possibly modified as a result of interjections by the facilitator.
  • Upon rotation, roles are switched thus: A assumes B’s role. B assumes C’s role and C assumes A’s role. The navigator must hit the ground running.
  • It’s important that design decisions once made are committed to even though the person taking over the navigator role may not necessarily want to solve the problem the particular way it’s being done. This maximizes the group’s chance of completing their task first to win the race.
  • The end-of-class prize of EC Bux for the first team to complete is adjusted to account for increased group size.

&

References

[1] Laurie Williams and Robert Kessler. 2002. Pair Programming Illuminated. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA., p.84

 

Posted in Uncategorized | 2 Comments

Two’s Better Than One

FRIEDA and GEORGE were quite happy to program on their own during in-class coding activities. The problem was that when either of them got stuck on a bug or at a place where they had a concept gap, they remained there until I stopped by during my rounds. They wouldn’t ask for help for fear that they’d be seen as the only ones with an issue. I’d been trying to find an elegant solution to this problem. Onthe-noobe that’s more scalable than my walking around frenetically to find out who was stuck and who wasn’t. That’s when I realized that Elaine Haight’s pair programming suggestion would work wonders in this situation.

In a previous post, I alluded to my implementation of a pair programming strategy in class to enhance the learning experience. A large body of research supports the idea of pair programming, linking with it both improved productivity and enhanced learning. Williams and Kessler provide a thorough discussion of the topic in their very readable book [1].

Briefly, the idea is to get students to program in pairs, with one student calling out the code and the other simply typing it in. The student typing in the code is called the driver and the person calling the code to be typed is called the navigator. Although Williams and Kessler offer several arrangements, I preferred to use an arrangement with exactly one keyboard/mouse and one monitor. The driver sits squarely in front of the keyboard and monitor and the navigator sits nearby with a clear view of the screen.

Overall, my experience with implementing pair programming has been productive thus far, as measured by both student feedback and the scores they’re receiving on their homework assignments. In a pair, I found that students:

  • Felt a lot more confident about their own abilities
  • Didn’t feel stressed or anxious about the possibility that they’d get stuck without making progress
  • Didn’t feel an overwhelmingly unproductive/paralyzing sense of responsibility for the end-product
  • Felt significantly bolder when it came to taking risks (essential for creative experimentation) because of the perception that a second pair of eyes would keep them from making catastrophic errors.

I also found rather quickly that pair programming needs to be implemented carefully. Otherwise, the driver often tends to take the back seat and lets the navigator do all the coding, simply becoming a conduit for the expression of the navigator’s stream of thoughts on the screen. Likewise, navigators were quick to realize that though they were programming, as it were, in a pair, in reality, they were really coding alone with the attendant loss of all the benefits I listed above. It is, however, easy to avoid this pitfall by implementing some simple ground-rules:

  • Students must switch roles periodically. I originally had them switch roles at functionally determined transition points. For instance, student A would navigate for the implementation of a particular method, class or module, student B for the next one, and so on. But it became clear that this strategy encouraged the tendency to mentally disengage from the task while they were driving since they’d start on an effectively new task when they took over as navigator. Elaine suggested that a better approach would be to trigger rotation on a timer. With timed rotation, students switch roles at predetermined intervals rather than after each functional unit. Timed rotation also meant that each student would have to stay in mental step with whatever the other student was doing – The timer would run out unpredictably. They’d have to take over any time and hit the ground running. To facilitate this, I hacked up a trivial web page during the first couple of minutes of class a few weeks ago. After establishing that the strategy worked, I moved the page to http://fgamedia.org/faculty/anand/siren. Feel free to use it if you want. I’ll polish it up with a better skin and variable interval if there’s sufficient interest.
  • Students must go with the flow: No drastic design changes should be introduced. This has the dual benefit of teaching students to work effectively in a team by rapidly adapting to another programmer’s viewpoint, and shepherding the team project to completion within an allotted time. If teams were allowed to change direction willy nilly, they often meander about without a strong sense of direction.
  • Students must physically trade places upon rotation, which involves getting up and moving, rather than shifting the keyboard and display. I find that physical relocation of coding agents is more conducive to mental readjustment when students must adapt rapidly to new roles.

I also provide scaffolding and guidance by simultaneously coding parts of the project on the big screen in front of the class (with a number of carefully selected TODO sections, of course) – This keeps the various groups aligned and approximately in step with each other.

PairProgDilbertFinally, I sweeten the deal by turning the whole classroom exercise into a kind of low-stress game/race by offering Extra Credit (ECBux) to the first group to complete the assigned project and present it on the big screen in front of the class. Thus every lecture turns out to be a group activity and a game that students seem to look forward to.

&

References

[1] Laurie Williams and Robert Kessler. 2002. Pair Programming Illuminated. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA.

Posted in Uncategorized | Leave a comment