Best Languages to Learn How to Code
Tags: beginners, advice
Published: 2017-09-30 17:40:37

---
title: Best Languages to Learn How to Code
published: true
description: Today the computer language landscape is much more diverse. There are many useful languages and technologies to choose from. The decision can be difficult.
tags: beginners, advice
canonical_url: https://www.coderhood.com/best-languages-to-learn-coding/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/euwk0wllmyswxpmp3wo2.jpg
---

This post was first published on [CoderHood](https://coderhood.com) as [Best Languages to Learn How to Code](https://www.coderhood.com/best-languages-to-learn-coding/). CoderHood is a blog dedicated to the human dimension of software engineering.

[![](https://thepracticaldev.s3.amazonaws.com/i/6ybw3p7y4qs4jhhl8y5m.png)](https://www.coderhood.com/best-languages-to-learn-coding/)


English, Chianti, C and the old days
------------------------------------

When I discovered the existence of computers, I lived in a place known worldwide for art, food, Chianti and hand gestures;Â not so much for technology. I loved growing upÂ in Tuscany. Winters were sunny and crisp, summers hot and lazy, falls welcomed and refreshing, and spring the closest thing to paradise that I can think of. The resourcesÂ I had to learn computer programming in 1984 were rare Italian translations of american books, a few monthly magazines, a healthy dose of curiosity and passion, and a thick skin to fend off middle school bullies. Now that I think about it, for those, martial arts training helped even more.

The only human language I knew was Italian. The only English word I knew was "yellow" -- don't ask, my brother thought me that word for reasons I can't remember --Â and I was very proud of it. Little I knew that I would learn many more words like "if," "then" and "else" studying computer languages. Basic, C and Pascal were the onesÂ readily available to me, and I knew that only because IÂ spent a remarkable amount of timeÂ at the local library and bookstores.

Serious programmers coded inÂ C. CÂ is a no-frills language that gets immediately down to business. Wonderfully low-level, it is still the backbone for software such as operating systems and compilers. I used C and C++ (the object-oriented version of C) extensively throughout my career, and I still use it today for some personal projects. All serious professional developers, at some point early in their career, must at least learn to understand C and C++.

Basic, a very Simple interpreted language, was made famous by Bill Gates and Paul Allen and distributed as part of MS-DOS from the beginning of Microsoft. Basic was also included in low-cost home computers such as the Commodore product line. If you want to know more about this fascinating area of technology history, I urge you to read "The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution." Today Basic is mostly dead,Â with some arguable exceptions.

Pascal was designed in 1968-1969 and was later made popular by Borland, with a fantastic product called Turbo Pascal. It is a beautiful language, a joy to use and easy to read and learn. I wrote hundreds of thousands of lines of Pascal and Delphi (an object-oriented version of Pascal) in the 1980s, and early 90s. Like Basic, Pascal lost ground, and it is no longer a popular choice.

## Today you have many choices

Today the computer language landscape is much more diverse. There are many useful languages and technologies to choose from. The decision can be difficult. Over the years, I have had numerous people ask me what is the right language to start with. The answer is nontrivial, and it depends on what your goals are. A specific recommendation for a particular project would have to start with a list of questions ofÂ what you have in mind. I will not do that because If you are thinking about learning to code well, you need to get strong fundamentals and not worry about one particular project. For this reason, I am going to give you a prescriptive directionÂ to guide you toward a reliable pathÂ I know will serve you well in the long-term.

My recommendation is this: learn an object-oriented compiled language, a scripting language, and play with at least one microcontroller.

Start learning the fundamentals of Java
---------------------------------------

Java is an object-oriented, compiled language. Compiled means that a software program called a "compiler" reads the Java code you write (readable by humans) and transforms it into executable bytecode (readable by machines). In Java, the bytecode is not a specific CPU machine language (like in C), but a Java Virtual Machine (JVM) language. You can think of the JVM as a software emulation of a virtual CPU.

The bytecode generated by the compiler is executable on any computer with a JVM. JVMs are available on almost every computer, operating system and iOT device in the market; thus, if you have a computer, you likely have the hardware to run Java programs. You can download the Java development kit for free from theÂ [official java.com site](https://www.java.com/en/download/).

Java is a mature technology, has an active community and is used successfully for large-scale systems. It's a good language that runs real software and performs surprisingly well. Many developers specialize in Java, and there areÂ [plenty of jobs](https://www.pearsonfrank.com/blog/java-predictions-in-2017)Â for Java developers in the software industry. AtÂ [DreamBox Learning](http://www.dreambox.com/),Â the amazing company where IÂ worked for the past ten years, Java is one of the main languages we use.

Some examples of popular websites that are, at least partly, powered by Java are:

-   LinkedIn
-   [Amazon](http://highscalability.com/amazon-architecture)
-   [Facebook](https://www.quora.com/What-is-Facebooks-architecture)
-   eBay
-   Many of the Google services.
-   [Twitter](https://www.quora.com/Why-did-Twitter-switch-to-a-Java-based-front-end-after-successfully-using-Ruby-on-Rails-with-200-million-users)

Java commonly powers software on consumer devices. For example, if you have a Blue Ray Player, much of theÂ [software is written in Java](https://blog.jayway.com/2009/12/11/blu-ray-and-java/). Another example is the Android application framework, also written in Java (the OS itself is Linux, written mostly in C).

The Java VM can also be used to run code not written in Java; several modern languages compile to JVM bytecode. For developers, the advantage is that, once they are familiar with Java, they have access to many languages based on the same technology, easy to integrate with Java code. Examples of JVM-based languages are:

-   [Clojure](https://en.wikipedia.org/wiki/Clojure), a functionalÂ [Lisp](https://en.wikipedia.org/wiki/Lisp_(programming_language))Â dialect
-   [Groovy](https://en.wikipedia.org/wiki/Groovy_(programming_language)), a dynamic programming, and scripting language
-   [Scala](https://en.wikipedia.org/wiki/Scala_(programming_language)), a statically-typed object-oriented and functional programming language.
-   [JRuby](https://en.wikipedia.org/wiki/JRuby), an implementation ofÂ [Ruby](https://en.wikipedia.org/wiki/Ruby_(programming_language))
-   [Jython](https://en.wikipedia.org/wiki/Jython), an implementation ofÂ [Python](https://en.wikipedia.org/wiki/Python_(programming_language))

Hello World in Java
-------------------

Here is a simple example of Java program that just prints "Hello World" on the console:

~~~~~
public  class  HelloWorld  {
Â   Â   public static void main(  String[]  args  )  {
Â   Â   Â   Â   System.out.println("Hello World!!!");
Â   Â   }
}
~~~~~

And here is how you compile and execute it from a Linux command line:

~~~~~
$  cat HelloWorld.java
public  class  HelloWorld  {
Â Â Â Â public static void main(  String[]  args  )  {
Â Â Â Â Â Â Â Â System.out.println("Hello World!!!");
Â Â Â Â }
}
$  javac helloworld.java
$  java HelloWorld
Hello World!!!
~~~~~

Java development tools
----------------------

To get started, head over toÂ [www.jetbrains.com](http://www.jetbrains.com/)Â and download IntelliJ Community Edition. It is one of the best Java development environments available, and it is free.

Learn a scripting language
--------------------------

A scripting language does not need a compiler: it is executed directly by an interpreter. In a basic incarnation, an interpreter is a software program that reads a human-readable script, line by line, running it as it goes. Just like a human interpret translates a live speech from one language to another, a language interpreter translates running code into machine-executable instructions, running them live.

Many scripting languages are gaining traction in the software development world. I recommend learning Python: a popular and powerful language used extensively in the software industry. A few examples of websites that are, at least partly, written in Python:

-   YouTube
-   DropBox
-   Survey Monkey
-   Parts of Google
-   Quora
-   Bitly
-   Reddit
-   Yahoo Maps

Hello world in Python
---------------------

Here is an example of hello world in Python:

~~~~~
print("Hello, World!!")
~~~~~

And here is how you execute it:

~~~~~
$  cat helloworld.py
print  "Hello World!!!"
$  python helloworld.py
Hello World!!!
~~~~~

Python development tools
------------------------

There are many ways to author Python, but the best tool I know is PyCharm. The free community edition isÂ a great place to start. Go toÂ [www.jetbrains.com](http://www.jetbrains.com/)Â and download it for free.

Play with microcontrollers and the iOT
--------------------------------------

One of the most exciting innovations in the last few years has been the development of inexpensive microcontroller boards. A popular example of such board is Arduino.

![](https://thepracticaldev.s3.amazonaws.com/i/z1fcusz2qhyspzkux4m8.jpg)

This small marvel of technology costs about $18, and can run code written in C/C++. It does not come with a built-in display, nor a video connector. To program it, you connect it to a computer via a USB cable.

TheÂ [development environment is free](https://www.arduino.cc/en/Main/Software), and following some easy online tutorials, you'll be able to write code and run it on this incredible hardware.

Hello world with Arduino
------------------------

Here is an example of hello world written for Arduino:

~~~~~
void  setup()
{
Â Â Â Â Serial.begin(115200);
Â Â Â Â Serial.print("Hello World!");
}

void  loop()
{
}
~~~~~

ForÂ a complete exampleÂ [following this link](https://www.arduino.cc/en/Tutorial/HelloWorld).

The iOT is fun and at arm's reach
---------------------------------

With some basic electronics skills, you can also create amazing Arduino powered devices. I am not a hardware guy, butÂ [I used ArduinoÂ to build a device](https://github.com/lpasqualis/mirage_candles_controller)Â that wirelessly turns-on any number of flameless candles when it senses the presence of a person and turns them off when the person leaves. I installed it in the entryway of my house, and I am greeted every day by the lively bouncy light of candles when I come home.

I recommend playing with Arduino because it gives you exposure to two important elements that will make you a stronger developer: iOT devices and C programming. It is inexpensive, fun and powerful.

Another popular option is theÂ Raspberry Pi, which is an amazing little device. TheÂ Raspberry Pi isÂ a fullÂ Linux machine and doesn't feel like a limited iOT device. You connect it to a keyboard and a monitor, you boot it up with Linux, and you can run anything that you'd be able to run on any Linux machine, including X.Â If you don't have access to a Linux machine, a Pi is a wonderful way to gainÂ that access for only $35.Â To learn more low-level programming, I'd stick with Arduino.Â It will force you into a different paradigm that I believe is important to grow as a developer.

---

### If you enjoyed this article, keep in touch!

- [Find all my posts on CoderHood.](http://www.coderhood.com)
- [Join my professional network on LinkedIn.](https://www.linkedin.com/in/lpasqualis/)
- [Follow me on Twitter.](https://twitter.com/lpasqualis)
- [Join my Facebook page.](https://www.facebook.com/coderhood/)
- And finally, follow me here on dev.to!