Development Environments

Programs, languages and compilers

Initial concepts

  

1. Software

If we look for the definition of software on the Internet, we can find some of them, although they are basically the same. We call software the set of programs, documentation and data closely related in order to make up a computer application.

Each software product is (or can be) different from the rest, because it is developed for a different customer, or to fulfill a different purpose. So, developing this product implies some previous steps: understand what we have to do, make a previous design and implement it, as we will see later. Therefore, we can’t compare software development with industrial production (such as keyboard manufacturing, for instance), where everything is much more automated. Software development requires the creation of a software project, and a group of people working in a coordinated way. Besides, software does not break along time, although its performance can be reduced because of its own updates and improvements.

1.1. Software components

From previous definition of software, we can figure out that it is composed of three elements:

1.2. Software types

There are two main types of software:

2. Languages and compilers

We have seen that programs are sets of instructions that are provided to a computer to complete a task. These instructions are written in a programming language of our choice, and this way we create some text files called source code, written in the chosen language.

2.1. Language types

When we want to choose a specific programming language, we distinguish between high level languages (close to human language, and so, easier to understand by the programmers), and low level languages (close to machine language, and so, harder to understand by the programmers, but more efficient).

Here we can see a simple program written in Java that just prints “Hello” on the screen:

public class Test
{
    public static void main(String[] args)
    {
        System.out.println("Hello");
    }
}

The same program written in C could look more or less like this:

#include <stdio.h>

int main()
{
    printf("Hello");
    return 0;
}

2.2. Language processors

Computers can’t understand any of the programming languages that humans use to create their programs. In order to make them work, their instructions need to be translated into a language that computers can understand. This language is called machine code, and is composed of bits (zeros and ones).

If we want to translate a given programming language into machine code, we use a tool called compiler, although this assertion is not completely true. There are some different language processors that can be used, depending on the language itself:

There are some studies and analysis that try to classify the programming languages according to its popularity or current usage. Some of the most popular ones are:

Regarding this last one, it is based on crossing data between the main source code repository (GitHub) and the main programming help page (StackOverflow). Take a look at both rankings, check the results and see if they differ in some importan language(s). Do you miss any other language in the top 10?

Exercise 1:

Look for an online code editor that lets us work with many different languages. Here you can get one: Ideone. Find out how to write a program to say “Hello” in some different languages, such as Java, C, Python, JavaScript, or PHP.