banner



how long does it take to become fluent in a language

How to Become Fluent in Multiple Programming Languages

Unique tips to help you become multi-programming-language-lingual.

Madison Hunter

Photo by João Jesus from Pexels

Learning a new programming language is much like learning to speak a new natural language.

However, as I'm sure many of my bilingual and polyglot friends would agree, it can sometimes get confusing to switch between two or more languages.

For example, my native language is English, but I was enroll e d in French Immersion in school. While this certainly paid off and made me perfectly fluent in both languages, it did have some unintended consequences when I was working in English. For the longest time, I would add E's onto many words or I would place the dollar sign at the end of a set of numbers (32$ instead of $32), both things that are requirements of the French language, but don't exist in the English language. With time and practice, these mix-ups eventually went away and I'm now able to switch between the two languages seamlessly (more or less).

I've noticed this happening again for me, although this time, I'm trying to transition from the structured world of C# and Java to Python. While I was in college, all of my courses revolved around strict programming languages such as C#. Now, I'm trying to make a transition to data science, and I'm currently in the process of learning Python. For someone who likes things very organized, Python is a nightmare language. For me, there is a severe lack of semi-colons, curly braces, and typed variables. It's as if I'm learning a new language (Python), that is completely different from my native language (C#).

Learning similar programming languages (such as C#, Java, and JavaScript) is akin to learning similar natural languages. For instance, by knowing French, it would be easy for me to pick up similar languages such as Italian, Portuguese, and Spanish. However, learning a programming language (Python) that is semantically different from ones I already know, is similar to how my French background wouldn't be much help when learning Icelandic or Mandarin.

However, as I've discovered in the past, learning a new programming language is the same as learning a new natural language. Furthermore, becoming fluent in multiple programming languages involves some of the same fundamentals and tips I used when becoming fluent in multiple natural languages.

Learn the statically-typed and syntactically-specific languages first.

Nearly every article titled "Which Programming Language Should I Learn First?" suggests that Python is the perfect first language for someone to learn. While I agree that Python is a good first language due to its simple syntax and flexibility, I believe that several programming fundamentals won't be learned that will be necessary later on.

Therefore, I would offer some counter-intuitive advice: learn the statically-typed and syntactically-specific languages first.

Instead of learning the language that will hold your hand and will offer you a comfortable path to wade into the world of programming, learn the language that will yell at you if you forget a semi-colon or will refuse to work because your data types are wrong.

Statically-typed languages.

Statically-typed languages (such as C# and Java) require a data type to be assigned to their variables. Data types include strings, integers, and Booleans, to name a few. Variables are bound to the data types they are assigned when they are initialized and can't be changed, otherwise, errors will be thrown in the code before they run.

Dynamically-typed languages on the other hand (such as Python) don't require data types to be assigned at the initialization of the variable. The variable type will be checked to see if the types are correct at runtime (after the program has been compiled and run).

By learning how to work with statically-typed variables, you get a foundational understanding of data types that you can build upon in the future. For example, JavaScript is a happy little programming language that has no problems adding together integers and strings. However, not being aware of datatypes can cause problems later on when bugs arise. By being strict with your learning and gaining a firm understanding of data types, you can save yourself a lot of headaches further on down the road when learning a dynamically-typed language with variables that can change datatypes on the fly. Additionally, learning a statically-typed language first will add a layer to your coding process logic.

Syntactically-specific languages.

When learning a new natural language, you first learn your alphabet, and then you go on to learning the words, the sentence structure, the punctuation, and the grammar of that language.

Learning a programming language is similar, in that each language has a specific syntax you must use for the code to work. In other words, each programming language has a way in which it likes its sentences to be structured and its paragraphs to be formed.

Some languages, (such as Java and C#) are very specific about their syntax and will refuse to work if you forget a single semi-colon (semi-colons are often put at the end of a line of code, similar to how a period is placed at the end of a sentence to signify its end). Other languages, such as Python, have relatively no syntax structure that must be followed. For instance, Python has relatively no semi-colons, and very few curly braces to organize its code compared to C#.

Learning a syntactically-specific programming language first will give you a firm understanding of the proper structure you need to follow when writing code. By becoming aware of the proper indentation structure, the necessity to end your line of code with a semi-colon, and the requirement for your functions to be written within the confines of curly braces, you will be able to write code that is easily-understandable, more organized, and easier to maintain and debug. Furthermore, this will help give you a template with which to write your code when you begin venturing into new languages that aren't as strict with syntax.

In essence, learn the discipline now, and reap the rewards later.

Become fluent in your first language.

It would be rather difficult to live a life speaking a little of each language spoken around the world instead of speaking one language very well, wouldn't it? Furthermore, if you only understand a little of each language, then you wouldn't be of much use to anyone, would you? Because you would neither have a very large vocabulary nor a very strong understanding of any specific language, you wouldn't even be able to type something into Google Translate to try to communicate with someone from half-way around the world. The likelihood is that both of you would end up very confused!

In my opinion, the same applies to programming languages. Instead of trying to learn several different languages without understanding any of them to a competent level, become fluent in your first language, or your language of choice.

I'm not suggesting that you need to be 100% fluent in a programming language before picking up another one. However, you should have a firm understanding of programming concepts in a single language before attempting to learn a new one.

Why? Well, when you learn the fundamentals of code in one language, you can assume that the fundamentals will be roughly the same in a different language. For instance, if/else statements carry out the same function in every single programming language you come across, but the only difference is in the syntax you use to communicate them. For instance, an if/else statement in C# requires the statements to be organized using curly braces, whereas an if/else statement in Python has no curly braces and instead separates each statement using a single colon and code indentation. Fundamentally though, the statement works the same way in both languages.

It's like how you learn to say "Hello" and "Goodbye" in your native language. Once you understand what those words mean and how to use them, you can learn how to say "Hello" and "Goodbye" in a multitude of different languages. The words will mean the same thing in a different language, the only difference is that you write them using a different syntax and use them following different conventions.

By understanding whether your first programming language prefers a single class or multiple classes, if it has specific variable naming conventions, or if it requires an object-oriented structure, you'll become more fluent in your first language and the subsequent languages as you progress. Once you become fluent in one language, you'll be able to pick up on the nuances of other languages quicker as you become more aware of the differences between programming languages.

Don't code with an accent.

When speaking a natural language, you can understand someone if they are speaking with an accent. For instance, I was understood by people whose native language is French, even though I spoke French with an accent. Because I was using the French conventions, they understood what I was trying to get across even if I used a round-about sentence structure or mispronounced a word.

To become fluent in a new programming language, you can't code with it as if it was a language you already know. If you do, the likelihood is that the language won't necessarily understand what you're asking it to do, or it will do what you're asking in a very inefficient manner.

I fell into this trap during my college capstone project when we were using Angular for the frontend of the system. I understood JavaScript well at the time and knowing that Angular is similar to JavaScript, I tried to code in Angular using similar conventions that I would use in JavaScript. Unfortunately for me, trying to code with an accent didn't yield good code, and it likely stemmed from not understanding Angular's conventions. My code was all in Angular, but it was speaking with a heavy JavaScript accent.

In other words, don't repeat my mistake — use the new language in the way it was intended and don't code with an accent.

By immersing yourself in the new language and forcing yourself to understand all of its unique conventions, you learn how to code with the language in the way it was intended without using it as a language you already know. This will allow you to become fully fluent in multiple languages, without speaking them all with a thick accent.

For example, if English is your native language, but you decide to quickly learn five other new languages, you're likely to end up speaking Russian, Italian, Swahili, Yiddish, and Arabic, all with a thick English accent and using English conventions. If you had instead chosen to learn the conventions of the Russian language, native Russian speakers would understand you. The same goes for the other languages. If you were trying to speak Swahili using the typical English sentence structure, you would likely not be understood by someone from Kenya.

Take the time to read the documentation provided by a programming language, and get a feeling for the specific conventions of that language. Not only will this make you more fluent in the language, but it will also make you more valuable when working on team projects with others who understand the language and expect you to be able to follow their conventions.

You may have to force yourself initially to code without an accent, but the hard work will pay off when you can fluidly switch from language to language with few hiccups.

Final thoughts.

This article outlines some of the more unique ideas for becoming multi-programming-language-lingual that I have come across in my time of becoming a programming language polyglot. These tips all helped me tremendously, but it wouldn't be a fully useful article if I didn't mention some of the more conventional tips that are out there:

  • Become fully immersed in the language by reading the language documentation, reading source code, replicating code examples using your own "words" in the new language, write yourself a cheat sheet for the new language, etc.
  • Follow along with coding tutorials in the new language using a variety of sources such as Youtube, Medium, and StackOverflow. You need to be willing to get your hands dirty when learning a new programming language. In other words, active learning will be your friend here.
  • Re-create projects you've already completed (even the simple ones) with the new language you're learning and try to use the new language to the best of its abilities.
  • Enter into hackathons, Kaggle competitions, and coding challenges that require you to use your new language.
  • Work with someone who knows the language well. I always learned a lot from pair programming with individuals who were well-versed in the language I was trying to learn. Getting to hear their thought process while they were writing a specific piece of code gave a lot of insight into how the language works and why they were coding the solution in a specific way.

The best advice I can give is to be persistent. Learning a new language is tough, and programming languages are no exception. Don't discard the language if it takes a little effort to learn. Luckily, multiple resources around the internet can help make the learning process easier and more intuitive.

Most of all, don't forget to apply the advice and tools available to you when learning a new language. Not only will you come out understanding the language better, but you will also become a better developer or data science in the long run.

how long does it take to become fluent in a language

Source: https://towardsdatascience.com/how-to-become-fluent-in-multiple-programming-languages-9f473c146b90

Posted by: fowlerfortall.blogspot.com

0 Response to "how long does it take to become fluent in a language"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel