Thoughts on cast-iron seasoning, programming and everything…

First Contact

| Comments

At the time, I was infatuated with a particular video game. This game was called Neverwinter Nights and it was a sword-and-sorcery adventure game. This was one of the reasons that I loved it so much; it brought to life all of my favorite childhood stories about dragons and elves and magic.

This was not the first such game I had played. It was however, the first game I encountered that gave players the ability to use the tools of the game to construct their own world and scenarios. The developers of the game actually included for free all of the tools that they had used themselves to create the game. I was enthralled by this toolkit.

I spent hours simply exploring it. I would browse the apparently endless menus and dialogs, marveling at the enormity of this program and captivated by what it promised to allow me to do. I fiddled around with placing groups of fantastic creatures in small worlds of my own creation. But I quickly came to realize that the real key to making living worlds lay in something called NWScript.

My curiosity in exploring the toolkit exposed me to the existence of a programming language embedded within it. This language allowed you to do nearly anything in the context of the game. It was through “scripts” - short, specific programs written in NWScript - that you could make pulling a lever cause a door to unlock, or make it so that a sleeping dragon would awaken with a terrible roar when a character tripped over a stone while trying to sneak past.

Somehow, I found a set of tutorials for learning NWScript on the internet. From what I recall they were excellent; very informative, and engagingly written. I worked through them diligently, and gained a rudimentary ability to do things with NWScript. But I was at a loss of what to do with my new-found power. I fiddled around making little toy things. I expanded on the idea of a switch unlocking a door by requiring two switches to be thrown. But I had no idea how to go about constructing a compelling story for other players to interact with, and without a motivating context my little magic tricks meant nothing.

In retrospect, although I was technically capable of writing simple scripts, I actually fundamentally missed one of the central points that the tutorials tried to teach me. One of the most basic tools of a programmer is the ability to abstract. Dictionary.com provides several definitions for using ‘abstract’ as a verb. The one that suits my usage the best is

“to consider as a general quality or characteristic apart from specific objects or instances: to abstract the notions of time, space, and matter.”

To really talk about what abstraction in programming means though, first we need to dive into what programming is a bit. To do that, I’d like to defer to one of the giants of the field, Harold (Hal) Abelson. Abelson is responsible for an enormous amount of important work in the world of programming and Computer Science. Among the most well known of those contributions is his co-development, along with Gerald Jay Sussman, of MIT’s introductory computer science course 6.001 Structure and Interpretation of Computer Programs. There is also a book bearing the same name, which is colluqially referred to as “the wizard book” or simply SICP (“SICK-pee,” pronounced like chickpea).

There are videos available online of the lecture series, delivered by Abelson and Sussman. The first lecture begins with Abelson greeting the classroom:

I’d like to welcome you to this course on “Computer Science.” Actually, that’s a terrible way to start. That is a terrible name for this business. First of all it’s not a science. It might be engineering or it might be art, but we’ll actually see that computer so-called science actually has a lot in common with magic and we’ll see that in this course. So it’s not a science. It’s also not really very much about computers. And it’s not about computers in the same sense that physics is not really about particle accelerators, and biology is not really about microscopes and petri dishes.

This gives a brief sense of what programming is not. But that just raises the question of what it actually is. What follows is an excerpt from the preface to the first edition of the SICP book.

“… we want to establish the idea that a computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology.”

This was an incredibly novel concept when the book was first published. In many ways, it is still novel to many professional programmers. It was certainly mind-expanding to me.

There is so much more that I could say about programming. I’ve been immersed in that world for a large portion of the last six years; I can talk almost endlessly about it. I think what’s more interesting though is to try to communicate why I’ve chosen to live in that world these several years.

Most of the time when people close to me ask “Why programming?” I say something about how programming is like puzzles. This is true. Especially the kind of puzzles where two pieces of metal have been formed and twisted together and need to be teased apart in just the right way. But it only goes so far. I like puzzles, but I love magic.

I talked earlier about my love for fantasy novels. Especially the kind with magic in them. The idea of magic has always intrigued me: the invocation of mysterious powers through the precise usage of arcane knowledge. To me the best kind of world to live in is one where magic abounds.

In many ways, the process of programming is very similar to this conception of magic. The practitioner (programmer), learns obscure and bizarre languages. Through long and diligent study they gain the ability to command formless spirits that are capable of affecting the real world.

This is what programming means to me. It is an immensely powerful form of expression. It requires serious commitment, and hard work to bear fruit. And like any superpower, with great power comes great responsibility.