Best languages to learn how to code

Reading Time: 6 minutes

IMG_5749-300x300 Best languages to learn how to code technology programming learning languages advice   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 good 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 conspicuous 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 popular 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 on 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 an amazing 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 good languages and technologies to choose from. The choice 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 specific 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 specific project. For this reason, I am going to give you a prescriptive direction to guide you toward a solid 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 with 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.

Java is a mature technology, has a strong 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 for Java developers in the software industry. At DreamBox Learning, 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:

Java commonly powers software on consumer devices. For example, if you have a Blue Ray Player, much of the software is written in 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 a number of languages based on the same technology, easy to integrate with Java code. Examples of JVM-based languages are:

  • Clojure, a functional Lisp dialect
  • Groovy, a dynamic programming, and scripting language
  • Scala, a statically-typed object-oriented and functional programming language.
  • JRuby, an implementation of Ruby
  • Jython, an implementation of Python

Hello World in Java

Here is a simple example of Java program that simply prints “Hello World” on the console:

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

Java development tools

To get started, head over to 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, executing 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.

There are many scripting languages that 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:

And here is how you execute it:

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 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.

arduino-300x257 Best languages to learn how to code technology programming learning languages advice

This small marvel of technology costs about $18 (you can buy it here), 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, 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:

For a complete example following this link.

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 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 everyday 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.

Leave a Reply

%d bloggers like this: