How I unwittingly learned object-oriented programming

How I unwittingly learned object-oriented programming

1993

In May of 1993, I first connected to a online virtual community called LambdaMOO. It’s difficult to describe the place in one sentence, but here’s one attempt:

A MOO is a text-based online virtual reality system to which multiple users (players) are connected at the same time

MOO—Wikipedia

LambdaMOO was created at Xerox PARC, where important inventions such as laser printers, the graphical user interface, Ethernet, and important aspects of computer graphics were created.

I didn’t really know any of the backstory at the time. I was an economics major and working in the tech industry wasn’t on my radar.

Like many people, I initially joined for social reasons. It’s was very much like a text-based adventure game only there were other people logged into the same virtual world.

You could walk around the world and read their descriptions. Anything you said would be heard by whoever was in the “room” at the time. You could speak to people directly as well as perform actions on people or objects. For example you could hug or tickle them, toss a baseball to them, or put them in a dishwasher and turn it on.

It was very rich and very fun. Unlike text chat, even with emojis, it was a very expressive environment that allowed much more meaningful interactions. You could describe yourself and pick your gender, which was a fascinating list.

Whenever you spoke, the gender pronounces would appear to you and others in an appropriate manner.

Many people just described themselves and then chatted. However, even describing yourself was setting a property on yourself, which could be considered a light programming task.

You could then create objects, describe them, and give them to people. And it got more advanced from there:

  • You could add “verbs” to yourself or an object (well, everything was an object) using their built-in verb editor and using its own programming language
  • You could create a child object that inherits all the functionality of the parent and then you can modify or add verbs or properties.
  • You could create rooms with properties and verbs. Perhaps when a person arrived, it could welcome their arrival or give them something.
  • You could create non-person “characters” that could interact with others. For example, the main room in the house where you start had a cockatoo that would spit out mangled snippets of previous conversations at random intervals.
  • You could create your own player classes, descended from other player classes, such that other people could instantly take advantage of the verbs you’ve written by joining your class
  • You could create feature objects that give people new functionality, an alternative to player classes which have single inheritance

People generally went as far as they wanted, but quite a lot of people ended up learning programming when they never had any intention of doing so. All I knew is I had a blast and I programmed what many considered to be quite clever things.

Here’s an example of a very simple verb I wrote that was part of a post office system. It consisted of:

A room that was a post office
In the post office, there was a verb you could use to compose a letter
A non-human character which was described as a bird
You could hand the letter to the bird and it would deliver it to the addressee

I liked this because the built-in messaging system was more like an email program and I wanted something more retro. Anyways, here’s some example code that runs when you hand the letter to the bird.

2000

Fast forward to the year 2000 and I had just joined Mail on the Mac OS X engineering team. I took a week long class in Cocoa, the programming language and frameworks inherited by the purchase of NeXT by Apple. I had learned Pascal in high school and done a lot of scripting in my life, but never did any serious programming.

About an hour into the class, as we were learning what the heck object-oriented programming was, I had one of the biggest déjà vu experiences on my entire life. Where had I seen something like this before?

LambdaMOO, of course!

Conceptually, Cocoa was a breeze for me because I had already learned the mental model 7 years earlier. The language was obviously different, but Objective-C is quite simple and easy to learn, so I was already so far ahead of the game. The hardest part was just learning how to write applications and to use very rich frameworks that enabled creating very complex projects.

Conclusion

LambdaMOO and other text-based systems declined in the late 1990s and it’s kind of a shame because it was a wonderful way to explore social interaction as well as learn technical skills. The source for LambdaMOO was also open source so you could modify it and run your own MOO if you liked (which I did). Then you learn more administrative skills and even how to run a successful community.

The modern equivalent to this is Minecraft, a very addictive game that is quite social and also allows you the opportunity to learn very sophisticated programming skills.