アイソモカ

isomocha: 知の遊牧民の開発記録

Building an interpreter in my mind

Reading "Eloquent JavaScript" Chapter 5, many things popped into my mind. Many of them are related to why I started this book: I want to be a "true" programmer, but what does that mean?

The first thing I noticed is that readers of programs are not only machines but also humans (including the programmer). Yes, I know, I've read programs written by others and myself for several years (mostly in Python) without thinking consciously about it. A programmer should be someone who can both write and read programs, and I'm learning to do so. That explains what I want: to go beyond googling and copy-pasting. What's "beyond"?

For natural languages, it's something we call acquisition. Through acquisition, one becomes part of the community where the language is spoken, with shared culture and knowledge. (You may not know, I've learned to teach JSL (Japanese as a Second Language).)

I used to think programming languages were different from natural languages (because they are artificial and no one is their native speaker), but it's possible to think of them similarly. Indeed, there is a community where the language is read and written. Remembering the fact that programs are read by both machines and humans, those "community members" consist of both machines and humans. And moreover, the community has shared culture, knowledge... and ways of thinking...?

It is often said for natural languages, especially in second language acquisition, that learning a new language is learning a new way of thinking. I partially agree; it's interesting to see how different languages express things differently (my favorite is in Chinese, where we have to distinguish several kinds of "can"s and "can't"s for skills or permissions).

While some may say that in English everything should be more explicit than in Japanese, I don't think it is a matter of languages, as we can say things implicitly in English if we want. Usually, the differences are not so significant because our forms of life -- eating foods, sleeping well, making friends, asking where a toilet is, etc. -- are similar across languages and cultures. (In case you noticed, I owe Wittgenstein for "forms of life" in his work.)

On the other hand, forms of life in programming languages are quite different from those in natural languages. That makes it harder for many programmers, whether beginners or those with some experience, to grasp what is going on in front of them. It often leaves me feeling less confident, especially when I rely on googling and copy-pasting -- the code feels both mine and not mine at the same time.

You’re building your own maze, in a way, and you can easily get lost in it.
-- Marijn Haverbeke, Eloquent JavaScript

Machine members of the programming languages community (interpreters or compilers) have their own forms of life -- sets of logic, rules, and everything is data. They've been created that way, programmed, built, and installed in computers.

According to the metaphor of humans to computers, programming language acquisition is to be programmed, built, and installed to behave in a certain way, through learning with textbooks and life experience. In other words, the JavaScript community, including the author of the textbooks, myself, and machine interpreters, are building a JavaScript interpreter in my mind. Are you scared? You shouldn't be -- there's nothing to be scared of. Programs indicate its interpreters what is going on and what should/can be done next. That means it enables me to grasp the situation, empowers me to do things I could not do on my own before, with confidence.

I've come to realize that being a "true" programmer is more than just writing codes. Languages, whether natural or programming, are not static packages of our thoughts to send others. Rather, they are living systems actively used by different minds to work together within their lives.

While I'm still far from being a "true" programmer who has a reliable interpreter in their mind, I recognize that participating in and contributing to the programming community may be key. Yes (a nod to Wittgenstein again), the meaning of languages is in their use.