Postpartum Pondering Programming Paradigms

by Mike Levin SEO & Datamaster, 01/11/2011

Those last two articles were doozies. Having recently switched my primary programming language after a long investigation, and then having my first baby, has clearly put me into the mood to think about the role and power of language. I recently heard a podcast that discussed a study of rats and children remembering the location of objects in an all white square room with only one wall colored blue. You’d think merely coloring one wall blue would be a strong enough cue for purely visual thought to kick in and let relative positions to be memorized. Not so! Both rats and young children were identical in their inability to commit object locations to memory.

Postpartum Pondering Programming Paradigms

The magic event to accurately memorize relative locations happened only in children who had recently developed some language skills, amounting to: “to the left of” and “to the right of”—and never in rats. Only then could the children reliably remember where objects had been put in that all white room with one blue wall. In other words, language enabled what we would call thinking, and subsequently memory. Language is the stringing together of discreet symbols into complex notions that are committable to memory and therefore able to be later acted upon… thought!

This would account for the notorious inaccuracy of eyewitnesses to crimes, how only “verbalizing it”, so to speak, is required for you to have accurately recorded it in the first place. It also says a lot about how one’s choice of languages affects one’s ability to think. Describing things quickly is a likely factor in memorizing quickly. So, the efficiency of language probably affects your bandwidth, or ability to absorb information quickly. So both the development of an “internal voice”, or the ability to talk to yourself inside your own head and the traits of your primary native language determines a lot about you—specifically, the quality of information you have for basing your decisions.

One might say that your native language is the operating system of the human animal. Further programming can then be loaded in through the written or spoken word in that same language, or you won’t understand it. Language let’s you interoperate with others who speak the same language in sophisticated and complex ways. The expressiveness and nuances of that language predisposes you towards certain types of own programs. There may or may not be words for certain concepts, and the syntax of the language may even make certain ideas difficult to express, and therefore become unimaginable—like how Eskimos have words for so many different types of snow.

The point is that language directly impacts your ability to think. Without stringing together symbols for complex notions, you’d have no more ability to remember relative positions than a rat. You need tools like “to the left of” and “to the right of” just to have any real advantage over non-human animals. And when competition over resources kicks in, superior language skills becomes a huge advantage. Humans don’t need the built-in magnetic compasses of birds and cows. We can invent better systems throughout the mere power of thought.

Your ability to learn things and commit it to memory goes way up when you force yourself to write it down or speak it out loud back to yourself. Why do students take written notes? You don’t necessarily learn better from studying your notes, so much as remember better in the first place by forcing all that information through the part of your brain responsible for language. You’ve heard it said that the best way to learn is to teach? This is why.

So narrating things to yourself, either silently standing there or with diary-style writing actually helps you practice thinking and think better. If you narrate in your head what you’re seeing as you walk along the street, your observational skills will improve. If you say out loud to yourself what someone is wearing or what color their eyes are, you will remember these details much more easily when you have to. If you observe more things more accurately, you can start to recognize more opportunities around you and make better predictions. You can judge what you are told against what you can see, and have a stronger individual mind, and be less vulnerable to bad information.

There’s not much you can do about the native language you’re born into if you didn’t have the opportunity very young to have a second native tongue. You will probably always think in your native tongue, even if you pick up another language later on. There’s a window during which research proves that children just pick up a second language (or language in general) better. And from my perspective as a new father who believes that the ability to program automation directly impacts your power in society, I’m facing interesting choices about when, how and which programming languages to introduce to my child—the goal being to equip her to become whatever and whoever in life she so desires.

Here’s the rub. We live I’m the age of babel as far as computer programming languages go. Different languages are good for different things, and indeed made for special tasks—like running blazingly fast or being ridiculously easy to use (mutually exclusive today). There’s no lingua franka for the world of computer languages, and many are philosophy charged, encouraging you to behave this way or that, such as object oriented or functional—the former biased towards how humans think, and the later towards how computers work. And neither is easy!

So what even becomes your criteria for choosing a computer language for a child? Marketability? Who knows what the job markets will be like in 20 years. So, longevity? Perhaps. Two that have survived in day-to-day use (by programmers—not merely running code) for well over 25 years: FORTRAN and LISP—and LISP is just timeless and general purpose enough to be a real possibility. More on that in a moment.

What about one  of the granddaddy languages that influenced everything else, like ALGOL, the language of algorithms? You might as well teach them Latin. Well, many things derived from ALGOL, so how about the dominant algol-like language, namely, the C-languages like C++, Java, C# and Objective-C? Well, it’s just personal opinion, but C-derivative languages are encumbered with so much syntactic nonsense, that even adults are challenged by them, and it’s a big part of what gives programming a bad name (that name being “unapproachable”). I have tried picking up several C-derivative languages over the years, and eventually just got back to work. Likewise, I want my kid to just get back to play, while still really ENJOYING her time spent programming.

Therefore, fun and ease-of-use must really be a criteria for a child, right? Sure! But be sure be leading them towards a fully featured modern language, and not just the graphic user interface designed to move turtles around the screen. Again, we are led to LISP, because the language synonymous with the turtle happens to be LOGO, a LISP-derivative language. A reasonable path is from LOGO to one of the modern versions of LISP. Another approach is from the One Laptop Per Child initiative, who put designed a curriculum to move you from the fun visual language of Scratch up to to Squeak, which is a derivative of SmallTalk, one of the saddest stories in programming—the “pure and beautiful” object oriented language that lost to the C-derivatives. While the OLPC approach would certainly educate the child in programming, I have no desire to throw my child into the SmallTalk revival movement.

Along that thought-process, there is a whole host of languages I am discounting because they primarily exist only to teach programming, and are dead-ends, or require a great leap, to carry on your programming endeavors. There are enough language choices that are good enough for learning, and also have mainstream general programming language acceptance and longevity, so that we may discount special-purpose learning languages. Wow, there’s a number of things I’m discounting here, like BASIC and OZ, both of which were designed to teach, but with very different design goals—OZ geared towards programming anything (philosophically speaking), and BASIC geared towards programming at all (the language of dimwits).

And so we move onto considering Python, the language I chose for myself after great deliberation. If I choose anything Python-like (Ruby, for example), then I’m probably choosing Python, because it will have the advantage of the familiarity by the instructor. There is strong appeal to teaching my child the language that Daddy chose, and I have to be careful not to give in to that bias. Many of the things that I looked for in my own language are what I would look for in a child’s language: fun ease-of-use, longevity, mainstream acceptance, expressiveness, and philosophy and style compatible with my personality. From the discussion so far, one would have to ask: why Python versus the next big contender, LISP? I’ve already discounted marketability (in which Python has an advantage today) as a criteria, and so we consider longevity, philosophy, fun ease-of-use, and mainstream-ness. For myself, I chose Python over LISP based on mainstream-ness. I really don’t know how much fun LISP is. It certainly has a strong philosophy that allows itself to always stay relevant and a source of great competitive advantage for those who use it.

It comes down to: do I want my child to have a built-in great competitive advantage in a strange language that is likely to out-last all others, LISP, but will make the entire outside world she interacts interacts with slightly foreign to her? Or do I want her to learn a language that provides SOME advantage, Python, and is easy to work in, and which makes everything she interacts with fairly comprehensible—but doesn’t have the proven longevity? Switching from Python to other modern languages would be easier than switching from LISP. But on LISP, you may never have to switch—or at least, have plenty of modern dialogues to choose from. And am I missing anything other than Python or LISP?

The choice isn’t easy—but I do think it’s becoming increasingly obvious: LISP versus Python (barring any major revelations). But I can see that I don’t really know enough about LISP yet to make a judgement call one way or the other. So, I will continue my own personal journey, improving my Python skills for work and pleasure, but casually picking up LISP on the side, continuing to read the seminal Structure and Interpretation of Computer Programs, a.k.a. the Wizard or Purple book used to introduce MIT students to computer science, which was interestingly replaced with Python in 2006. You can get this same book in ePub format for free from github to your iPad, iPhone or any ePub reader https://github.com/ieure/sicp. I’ve got a few years to decide.