Basic Coding
A mini document that I had made to quickly explain the basics of programming.
translated quickly and dirty with Google translate
What’s the point ?
Programming automates a task that a computer/machine can perform. To do this it is necessary to translate an algorithm into a language that the computer can understand (binary).
The variables
Variable types
Here is a short example of a program in pseudo-code (fictional language):
print("What's your name?"); // displays What is your name?
string name = input(); // read what the user writes
print(name); // displays its name
print("How old are you?");
int age = input();
print(age);
In this pseudo-code I used 2 different types of variable:
Basic Command Line
Little tutorial about the command line :)
translated quickly and dirty with Google translate
To know
The command line is a text interface between the user and the machine, the language used to interpret these commands may vary, under windows it will be dos or powershell and under linux it will often be bash . But here we will focus on the command line under linux.
For the examples I will use bash but that to work with other languages like zsh, fish, ksh,…
We often represent a command with a $ in front of it to show that it is indeed a command to be done in a terminal.
In bash this will often be username@hostname:current_folder$.
The bash configuration file is in your home file as .bashrc. For ease of reference, the prompt in the examples will be like this > but the prompt will probably end in a $.