Learning a foreign language vs learning to code

Amelia Elton
6 min readJan 25, 2021

--

In this article, I aim to compare and contrast my journey learning to code vs learning a new language. I have started and stopped learning both coding and spoken languages at various times in my life, so will start at the beginning.

Photo by Brett Jordan on Unsplash

Learning out of Necessity

A young child learns to speak out of necessity. Speech not only allows for communication, but also forms an essential bond between child and caretaker. Words and the ideas they communicate deepen the relationship between individuals, allowing us to form communities.

Many computer programmers begin learning to code at a young age. Code is a way to communicate directly with the devices that have become ubiquitous in many households across the globe. As household computers become more widely available and affordable, and also appear in a wide variety of forms, children interact with them with regularity, and benefit from the ability to understand how they work and how to communicate directly with these objects. Alternately, many adults must learn to code out of necessity as fields become more and more evolved and entrenched in modern day technology. Coding is a way to stay relevant in an ever changing work environment.

First Steps

The first steps of learning any second language are the same; start with the basics. In both language and coding, breaking the language up into simple steps that repeat and build off on another is the easiest and most effective way to learn. When I am learning to ask the question of “Where is…”, I will use it in many ways before I am comfortable asking naturally. The same goes for learning to use Ruby enumerables. To be able to search comfortably for a specific piece of information takes practice asking simple questions again, and again, and again.

Oops…

Mistakes are a wonderful way to learn, though they often don’t feel that way in the moment. When you make a linguistic mistake speaking with someone, especially if it is not in your native tongue, local speakers will politely 🤞🏻 guide you to the correct terminology, or at the very least, respond with the correct syntax. When speaking a new language, you always have the benefit of communicating with another human. Even if you do not understand each other completely, there are often ways to make up for your lack of language. The word toilet (in your target language) combined with a questioning expressions can usually substitute in for the properly asked question of “Where is the toilet”.

Similarly to spoken language, mistakes are a vital part of learning to code. Unlike spoken language, computers cannot point you in the correct direction to the bathroom when you do not know how to ask it properly. For example, if I were searching through an array of important words to know for the word bathroom…

important_words = ["please", "thank you", "restaurant", "post office", "bathroom", "city hall", "cafe", "bus station"]

… and I was unsure about how to ask the computer this array contained a bathroom, I could try typing

bathroom?

and depending on the language I am using would get a variety of responses, none of them having to do with the question I am asking. In Ruby, my response would be a error message of:

NoMethodError (undefined method `bathroom?' for main:Object)

Getting Experience

The best ways to get experience when learning a spoken language and learning a coding language are remarkably similar. Experiential practice and learning is best. It is much easier and more enjoyable to learn Japanese in Japan, surrounded by the language and writing, immersed both linguistically and culturally, than it is to learn Japanese in, say, Long Island, NY. The same goes for learning a coding language. When you are actively using your skills to solve interesting and relevant problems, learning a new language, or even furthering your current skill level will be much more enjoyable than if you were simply following along instructions in a textbook.

A Closer Look

Similarly to learning a new language, learning a coding language requires becoming comfortable learning new vocabulary, forming sentences, and learning various idioms and linguistic anomalies.

Vocabulary

Each coding language has its own syntax and lexicon that you must learn before you can be comfortable understanding how to proceed. When starting it can be difficult to wrap your head around loops, arrays, hashes, methods, enumerators, keys and the plethora of new terminology that often times varies and contrasts between coding languages. Getting a grasp of each language’s vocabulary is key to comfortable communication.

Sentences

Once you are comfortable with vocabulary, you can start true communication. At this level, you have mastered basic terminology and can start building methods and classes (reference is again, in Ruby) to build programs that are more complex in nature.

When you encounter terminology that you do not know, you are comfortable looking at its surrounding text for context clues, and have the tools to search for and learn new words as they come. They do not come at a volume that feels unmanageable.

This is also the level where you have enough understanding to play with language and make it your own. Coding languages have the ability to reflect the personality and stylistic preferences of their speakers in a similar way to spoken languages.

Natural Conversation

Natural and fluent conversation takes time in any language, though often can come much more rapidly with a coding language than with a spoken foreign language. After a few months of learning, I am still very much a novice with a foreign language, but may have reached a level of comfortable conversation with a coding language.

At this level, you can make choices about the best ways to go about saying something, and have foresight into the outcomes of your conversation. You are able to comfortably have a conversation that includes mistakes (they will always be there), but are able to recognize and move past them with an understanding that was not there when it was taking the majority of your energy to form sentences.

Some Key Differences

With all of the similarities between learning a new language and learning a coding language, there are some key differences.

Interaction

As we saw with mistakes, interacting with another human and interacting with a computer have their differences. Though our languages may be different, many of our ideas and needs are the same. Basic communication and connection can happen between people with little shared language. If one person does not understand, they can usually find another who can communicate at a higher level. Computers will not go find their friend who is better at interpreting impromptu hand signs or has a basic understanding of your vocabulary.

Logic

Spoken language and coding language are processed in slightly different areas of the brain. I am not a neuroscientist, but there is some interesting work being done on this that I will attach in references. From a non scientific point of view, coding languages involve much more logic than spoken ones do. Coding involves a great deal of data manipulation that is not present when learning a foreign language. It involves problem solving in a way that is more similar to mathematics than language formation.

Evolution

Spoken languages evolve over time, but not with the regularity and formality in which coding languages are updated. Coding languages that are in use are in almost constant change as computing needs and abilities evolve. New versions of a language are revised and released to keep a language relevant over time. A spoken language will never see the same level of close analysis and universal revision. To obtain fluency in a coding language is a skill that must happen again and again, even with the same language.

To conclude

Learning a new language is hard, be it a spoken language or a coding language. Over time, however, a new language grants you access to a world that was once outside your grasp. Thankfully, with both spoken and coding languages, once you learn one, it is often times easier to learn a second, third, and perhaps even fourth.

Further Resources

--

--