When choosing a computer programming language there are many aspects to consider, including speed and functionality. But two factors that may be important for newcomers to keep in mind is the time needed to learn a language as well as the time needed to create the project.
Catch up on the rest of the articles in the programming languages series:
One Language to Rule Them All
If you’re learning a programming language for the first time, you may wonder which language is best to learn. One fact that is often overlooked is how easy it is to pick up other languages once you become comfortable in your first programming language.
For example, my first language was C++, and after using that language for a year, I was able to make a program that could simulate basic physics, including orbits and forces.
Then I started to use microcontrollers. These were coded in assembler and C, which turned out to be very easy to pick up. Not long after that, I was programming in VB.net and C#, which were also very easy languages to learn, thanks to my prior knowledge of C++.
Despite what many may say about different languages, most computer programming languages follow similar syntax and/or operate in similar ways. Instructions are nearly always executed linearly, functions usually have brackets and arguments, types are normally declared, mathematical operators work in the same way, and high-level languages are rather easy to read. But this does not mean there are no differences between languages! Some genuinely take more time to write and others are easier to debug.
So, back to the million-dollar question: which programming language should you use?
A Beginner's Language
The language you should learn depends on many factors, including:
- Your understanding of computers
- Your previous coding knowledge
- Time to learn the language (days, weeks, months)
- Final application
If you are completely new to computers and you want to start learning how to do some basic code, as strange as it sounds, you may want to consider learning BBC BASIC or other BASIC languages found on popular ’80s computers. They are incredibly simple and provide a few useful functions while teaching the basics of computing. While these languages are no longer valid in the commercial world, they are great for teaching, and using BASIC interpreters is rather easy to do.
However, you may not want to learn BASIC if you need a programming language that will be useful in the industry. If this is the case, the next most simplistic language you can learn will either be Python or VB.net. Python has the advantage of being similar to BASIC and is very easy to use with the Python IDE, while VB.net (in conjunction with VS Express), can provide a user-friendly language for creating form applications (those with buttons, text inputs, and images).
Time to Code
There may be times in your life when you are faced with a project that has a time constraint. Assuming you already know every single computer language in existence, you still have to choose a language for the project. When time becomes a factor, you will be surprised how some languages can cause issues as they may take too long to code in or take too long to debug. Usually, the higher level a language is, the less time needed to do the same task. A classic example is Hello World, which can be found in most languages.
Hello World in C++
Hello World in Python
As you can clearly see, C++ requires a lot more effort to get even the most basic code to run, whereas Python does the same task in far fewer lines of code. But this is not limited to printing text to the screen.
Languages such as C++ require a lot more code than other languages to do the same task, including sockets, serial ports, graphics, and GUI applications.
However, C++ does come with an advantage: languages that need more lines of code to do a task usually give more control to the user. On top of that, the code can often be optimized to improve performance, while in languages such as Python you are at the mercy of the interpreter.
Choosing a programming language can be a difficult decision. More often than not, you will be focusing on the functionality of the language and it's library support when you start a project. Just remember to consider the time aspect, too, or projects could end up taking way longer than you ever anticipated!