XRDS

Crossroads The ACM Magazine for Students

Sign In

Association for Computing Machinery

XRDS: Resources for Students

 

Photo by dullhunk, Flickr.


Share |

How to Learn Programming Languages

By Ben Deverett

Learning a new language is difficult, and programming languages are no exception.

That being said, programmers get a bit of break when it comes to learning new languages, because all modern day programming languages are relatively new, and they are all based on the same fundamental concepts. So, whereas spoken languages are the culmination of thousands of years of modifications and off-stemming, programmers need only deal with about fifty years of linguistic evolution.

Consequently, the remnants of older programming languages are often very apparent in newer ones, and all these languages work in a very similar manner at their cores.
    

Why Are There So Many Programming Languages?

Certain programming tasks can be more efficiently completed with the help of goal-specific languages. The original programming language, binary, is very machine-compatible, but not so user-friendly when it comes to programming complex tasks. Programmers use low-level languages (languages that are easy for the computer to understand but usually more complex for programmers) to build higher-level languages that are more programmer-friendly. In these languages, it takes less time for the programmer to program, but more time for the computer to process. Thus, many languages of various complexity levels float around the modern day programming world, and programmers choose one or many of the most convenient languages to use depending on the specific task at hand.     

With all this in mind, it might be difficult for a new programmer to decide where to begin in terms of learning a programming language.
Here are some tips on how to navigate the world of programming languages.

Master a Core Language

In the programming world, most programmers have a “core language” - that is, the one they know best, and the one they prefer to use when it comes to their day-to-day programming tasks. The most common ones, and the ones we would recommend, are:
    •    C
    •    Java/C++
    •    Perl/Python

Often, the language you are taught first will become your core language, because you become more comfortable with it as you gain experience.

Whatever the language, learn it, practice it, and master it. Take the time to understand the meaning and usage of every data structure, keyword, and library of the language. This is important because as you learn new languages, you will find that a seemingly difficult new concept is analogous to one you already know from your core language, and this makes the new language easier to understand.

Mastering a core language is also useful because when it comes to difficult tasks, it is good to be able to work at your goal without being interrupted by troubles with the syntax of an unfamiliar language.

Learn When and Why It Was Written

Read up on the origin and goal of the languages you learn. Everything you learn about the language will become clearer and more relevant. 

For example, when first learning Java, you may wonder why the compilation process involves more steps than other languages. However, if you know that Java was created with the goal of being universal (meaning it runs on most platforms without changing your source code), then it is clear why its compilation must be more complex. As another example, learn the difference between object-oriented languages and ones that are not object-oriented, and know when to use each. While both can accomplish many of the same tasks, one may be more efficient or easier than the other to do so.

The Best Time to Learn a New Language Is When You’re Required To

Learning a new programming language is always a challenging and rewarding task if you’re up to it, but the best time to tackle a new language is when there is a specific task at hand which requires you to do so. If you have a goal to accomplish using the new language, you will be motivated to learn about it, and you will often find yourself writing all sorts of programs to try out different features of the language. Once you complete your task, you’ll be surprised by the depth in which you learned the language just by working through some problems.  

Learn At Least Three Programming Languages

 In the programming world, each course, research lab, or project will be based around a specific language. You’ll save yourself—and your teammates—a lot of time if you already know that language when you enter the situation. A particular professor, for example, may request that all work in his lab be done in one language (for example, Python may be used for readability) for compatibility reasons. Additionally, the more languages in which you are proficient, the more valuable you’ll be to potential employers. Sometimes you’ll need to learn a language just for a specific process, but that can never hurt. After all, the more you learn, the easier they get!