Popular programming languages - PROGRAMMING FOR BEGINNERS: All Concepts Explained (2016)

PROGRAMMING FOR BEGINNERS: All Concepts Explained (2016)

7. Popular programming languages

There are several popular programming languages today. The most notable ones are provided next. Each has it's advantages and disadvantages, there is no completely "better" or "worse" programming language in this case. It all depends on for what purpose you use programming language.

7.1 C

C is one of the most popular compiled, procedural programming language in the world today. C is important programming language in the world of programming languages because it is the foundation on which many other popular languages, like C++ and C# developed. C is procedural programming language, but has many advantages. It is compiled language and is close to assembly and machine languages. C is used to write low level softwares, for example for writing softwares that precisely control storage devices, device drivers or for softwares that can precisely control and/or process memory (RAM). Also it is used to write device driver softwares (i.e. softwares that are written specifically for particular devices to work with particular hardware; these programs have low level control over hardware). C is even used for writing Operating Systems and programming language compilers and interpreters. For example, Python programming language interpreter is written in C programming language (so, essentially, Python programming language is written in C). That's not all: C compiler can be also written in C itself. Because C allows low level control of hardware it is also used (most frequently) for writing malware (malicious software) by hackers. The reason hackers select C to write malware is that it allows them to write low level software (i.e. software that has more precise control of hardware); this allows them making malware more likely to bypass Antivirus software protection and to make their compiled malware hard to reverse engineer by using specific source code writing techniques. So, C is very powerful programming language but has one drawback: it is not easy for newbie's (but is easier than C++) because it is close to hardware and programmer needs to have some knowledge of hardware and know other technical informations. Today, programmers choose C++ instead of C (except if you are going to write low level software; C is more close to hardware than C++) because C++ is newer language developed from C and includes object oriented programming ability, which is convenient way for writing large softwares. See section about C++ to read more.

7.2 C++

C++ is probably the most commonly used programming language for writing commercial software today, and obviously commercial software is majority of all software.

C++ is created from C, so it has many features that has C, but main difference in these languages is that C++ has object oriented feature, while C has not.

C++ is commonly used for writing commercial software because of following reasons: 1. C++ is compiled programming language, which means that you can write high performance (i.e. applications that run fast) applications with C++. 2. Also, because it is compiled language,source code is completely translated into machine language, which makes real source code of a program hidden from theft, because selling your software with real (or not hidden) source code means you are giving away your software with all the unique algorithms you invented while writing program source code. Also, it means that you are giving your program to everyone for free and nothing will prevent them from copying your software and distributing with others. Commercial programs written with C++ have some type of copy protection mechanisms, common one being license key protection. Unfortunately, hackers still crack (i.e. disable software copy protection or find license key) software but it is still much better to write commercial software in compiled language (it will make reverse engineering and cracking program harder compared to reverse engineering and cracking interpreted language programs). 3. Another reason is that end user will not need to install interpreter applications on their computers in order to run your applications, which is not the case if you write your application with interpreted programming language. This requirement of installing additional software on end user's computers makes it somewhat inconvenient for some end users.

Today, C++ is more popular than C. It allows writing large software more easily because of it's object oriented feature. Majority of PC commercial software and PC games are written using C++. If you need to write programs that can access low level functions of hardware and precisely control hardware, then you can use C. C is commonly used to write system software, such as utility and antivirus softwares. But, if you want to create PC games, then choose C++ because most game programming librarys use C++.

7.3 Python

Python is very popular interpreted, cross platform (it means that programs written in particular programming language can run on different kinds of computers and operating systems), object oriented programming language. Python has many functions and large library, which can be used to build almost any kind of application. Python is often recommended as first programming language to learn if you are starting to learn programming in general, and it is truly good choice, because Python is very easy to learn and also very powerful language; don't think that because it is easy to learn it is weak language which lacks some functionality; even Google and expert hackers use Python. The only drawback of Python is that it is interpreted, it means that programs written in Python run slow compared to programs written in compiled languages. Also, when you write Python program, you write source code in plain text file with .py extension. When you run Python programs, you directly run this .py file with Python interpreter. If you will want to sell your Python program, you have to give this .py file to end users, which you don't want to do because end users can read your source code from .py plain text file. Fortunately, there are programs which help you hide source code of a Python program, but they are easy to reverse engineer, so few commercial software is written in Python. The advantage of Python other than being easy to learn is that it is cross platform. You can run same Python program on any computer if it has Python interpreter installed, which is not case for compiled languages.

7.4 Java

Java is a very popular interpreted, object oriented, cross platform programming language. You can use Java to program different types of computer devices, for example Android OS applications are mostly written in Java. Drawback of Java is that Java programs require Java interpreter software to be installed on computer on which you want to run Java programs.

7.5 C#

C# is modern, object oriented, interpreted programming language. Interpreted in this case does not mean that you need to give someone source code to sell your program written in C#. C# program's source code is first translated into bytecode, which is not human readable code. Then, this bytecode is run by C# interpreter program. So, it is possible to sell programs written in C#.

C# is generally Microsoft specific, because C# interpreter is available for Windows OS and on other Microsoft devices, but C# is also used in other places, too. For example, Unity game engine allows writing game's programming part using C#. C# is a Microsoft .NET Framework family programming language, which means you can combine it with other .NET languages and write single program using multiple languages. C# programs run faster compared to programs written in other interpreted languages.

7.6 Visual Basic

Visual Basic is a Microsoft specific, object oriented, interpreted programming language. Like Python, It is quite easy for beginners to learn, so it is also recommended language for first time learners of programming. Also, it has easy GUI (Graphical User Interface – programs that have graphical controls, such as buttons and windows compared to text-only programs, which are called command line programs) programming capabilities, so you can rapidly develop programs in it. Visual Basic is a Microsoft .NET Framework family programming language, which means you can combine it with other .NET languages and write single program using multiple languages.

Which programming language I should choose?

It depends on which category of programming you will choose. If you want, for example to create professional Windows applications, then your best choice would be to learn C++ programming language because most commercial Windows applications are written in C++, particularly in Visual C++. Visual C++ is essentially C++ but with slight differences; It is only available in Microsoft Visual Studio IDE, but is most popular since Visual Studio is the most popular Windows specific IDE. After learning Visual C++, you can learn MFC library to develop fully fledged native Windows applications. MFC is a GUI library which comes with Visual Studio IDE. It allows you to easily create application GUI visually, but first you need to know Visual C++ language. There is a good (and probably most popular in this category) book series to learn both Visual C++ and MFC and it's called "Beginning Visual C++" (author: Ivor Horton).

Learning Visual C++ is also great if not necessary to become professional Windows game programmer. Other thing game programmers will need to learn is DirectX graphics library, and because DirectX is created by Microsoft, it is fully supported by Visual C++ and Visual Studio IDE (also created by Microsoft). In short, most commercial PC games are created using DirectX and Visual C++, in Visual Studio IDE.

Other than Visual C++, today some desktop applications are written in Visual Basic or C#, and programmer vacancys often require knowledge of these languages, so you can consider this.

If you want to be an Android game or application programmer, then you'll probably need to learn Java, because these applications are mostly written in Java.

These are just concrete details, but in general, first you have to decide in which category of programming you will be working and then choose appropriate programming language to learn. But before learning your chosen programming language, it would be good if you learn some easy to learn programming language (such as Python or Visual Basic) to learn general programming concepts easily. Other than this, some people just can't learn complex programming languages in the first place, so it is good to start learning programming with easy programming languages, if you can't understand complex ones in the first place.

What kind of software can I create?

You are not limited in any way (except hardware processing power) in what kind of software can you make. You can even invent completely new kind of software. It is important to know that technically, there are no software categories; at the most basic level, the purpose of any kind of software is to manipulate data (i.e. computer data in binary format), send data over some kind of network or save data on some kind of storage device. So, you are not limited in any way of what kind of software you can make, as long as hardware has ability to run software written by you. Today, computers are very powerful; also, more and more powerful computers are engineered every day; so programming has almost unlimited possibilities and is very creative (and technical) activity.

Where to go from here

If you have finished reading this book, you should have enough general knowledge of programming to start learning specific programming language. At first, when starting to learn specific programming language, such as C++ for example, it might appear easy to you but learning can soon become harder as complex programming concepts will start to appear. Sometimes, it is possible that you won't be able to understand whole concept; programming concepts are very interconnected, so you need to know as much definitions as possible to further understand more complex concepts. My advice is that you don't stop trying to understand concept if you stuck. You should try many different books and other sources on the same subject to understand programming concepts. This is because unfortunately no single programming book is complete.

Good luck in learning programming - one of the creative, complex and interesting activity.