Saturday, November 12, 2011

On Abstraction, Translation and Teaching

Quick what is the following:

struct Node
{
   Node *prevNode;
   Node *nextNode;
}

Most of the readers probably said something like, "Damned if I know" while a couple of you that followed from my day job might have said something like, "That's the beginning of a doubly-linked-list." For those of you that do not have Computer Science degrees let me explain what that is. A doubly-linked list is a group of entities in computer memory that allows for adding and removing entities as well as traversing back and forth, via the pointers that go backwards and forwards.  Do you know what a pointer is?

Of course in order to explain how this works I have to explain computer memory, pointers, what the hell I mean by "traverse" and why can't I just have a list anyway.  That is if I want to explain it to somebody who doesn't know how to program.  To explain it to a computer programmer I just say "linked list" and I'm done.  Yet those same computer programmers had to learn all the things that lead up to the structure above, and now write that cool iPhone software you're using to read this without really thinking about it.  What does this have to do with language?

As a teenager you likely took classes in a foreign language.  At some point you conjugated verbs, at least I did when I took Spanish.  The verb "cantar" meaning "to sing" conjugates like this:

canto - I sing
cantas - You sing
canta - He Sings
cantan - They sing
cantamos - We sing.

This is conjugation in the present tense.  When I make my weak attempts to speak Spanish I have to think about all these conjugations and tenses while trying to pick the right words and pronunciate.  It usually ends comically.  If I try to ask my wife how to speak it she often struggles to explain it to me because she doesn't think about all those things.  She just speaks.

So what is the key?  Beginning programmers often struggle with Linked Lists in particular data structures, so they practice.  They do them over and over again.  Eventually they can do them in multiple programming languages on multiple machines without a second thought.  That's how it works with learning any language.

No comments:

Post a Comment