Hello everyone!
I am very new to cubecraft (as seen by this being my first post!), but I would like to share some knowledge with those who are interested in development as I have been developing for 5 years now and have developed and worked on all kinds of interesting projects!
The languages I will be covering are non-web development one's. If you really are passionate about web-development, then feel free to tell me to make another post about it some time.
To start with I am going to give a brief overview of how computers process and execute information (see it's relevance later on).
The different levels/tiers/generations of programming languages
Generally speaking, there are 4 generations of programming languages.
1st generation : The 1st generation is as simple as it gets. You are literally writing your program in binary.
2nd generation: The 2nd generation is known as assembly code. It's written as commands which perform functions on certain addresses or values from addresses and can also be used to manipulate registers in the Processor.
Example 1: LOAD #21 - would load the number 21 into a register called the accumulator (which just holds the most recent instruction) to be executed.
Example 2: ADD 14 - adds the value from memory address 14 with the co-existing value found in the accumulator.
3rd generation: The third generation is where the big differences come into play. Third generation languages are abstracted (simplified) way more than lower generations through named variables, Object-orientated programming, etc.
4th generation: 4th generation programming languages are the highest tier. They are known as declarative languages whereas 3rd generation programming languages are imperative. In a 4th generation programming language you define WHAT needs to be done, and HOW you want to do it. Whereas in 3rd generation programming languages you only define WHAT needs to be done.
Since these programming languages aren't in machine code (binary), how the hell does the computer run the program?!
To transfer languages into machine code, system software called Translators are used.
There are 3 types of translators :
Assembler : This turns assembly code into machine code.
Compiler : If a programming language uses a compiler, it means that the code needs to be compiled before it is run. A compiler links all of your source files and turns them into object code. This can then be turned into an executable file, which is composed of binary.
Examples of languages that use a compiler : Java, C, C++, C#
Interpreter : An interpreter reads the source code line by line and executes it on the go.
Examples of languages that use an interpreter : Python, Ruby,
Compiler vs Interpeter vs Assembler(very important):
Compiled :
It is essential you bare these factors in mind when choosing what language you want to uptake - ask yourself "What do I want to use it for?"
Syntax of programming languages and What they do
Unfortunately I cannot answer this as it would take wayyyy too long. They are all very different.
What I would ask you to do is look at everything above and decide the purpose of why you are learning a language, THEN play around with it and get a feel for it and see if you enjoy it.
______________________________________________________________________
You have reached the end of the tutorial.
Thanks for reading. Hoped this helped! (Please tell me to expand on certain things if you want me to, and ask any questions if you want below).
I am very new to cubecraft (as seen by this being my first post!), but I would like to share some knowledge with those who are interested in development as I have been developing for 5 years now and have developed and worked on all kinds of interesting projects!
The languages I will be covering are non-web development one's. If you really are passionate about web-development, then feel free to tell me to make another post about it some time.
To start with I am going to give a brief overview of how computers process and execute information (see it's relevance later on).
- Data in a computer is stored as binary (more technically known as machine code). Simply put, it's just 1's and 0's.
- These bits (each binary value) are grouped into binary words; which are normally multiples of 8 - forming what's known as a byte.
- This is where you get sizes from in files etc, (a KiloByte is 1024 bytes!).
- Anyway, there are two essential parts that every computer has - a Main Memory and a Processor.
- The Main Memory stores each binary word with a specific address.
- The Processor is full of registers (small temporary holding storage points which all perform specific jobs). Together they will fetch-decode and execute the data.
The different levels/tiers/generations of programming languages
Generally speaking, there are 4 generations of programming languages.
1st generation : The 1st generation is as simple as it gets. You are literally writing your program in binary.
2nd generation: The 2nd generation is known as assembly code. It's written as commands which perform functions on certain addresses or values from addresses and can also be used to manipulate registers in the Processor.
Example 1: LOAD #21 - would load the number 21 into a register called the accumulator (which just holds the most recent instruction) to be executed.
Example 2: ADD 14 - adds the value from memory address 14 with the co-existing value found in the accumulator.
3rd generation: The third generation is where the big differences come into play. Third generation languages are abstracted (simplified) way more than lower generations through named variables, Object-orientated programming, etc.
4th generation: 4th generation programming languages are the highest tier. They are known as declarative languages whereas 3rd generation programming languages are imperative. In a 4th generation programming language you define WHAT needs to be done, and HOW you want to do it. Whereas in 3rd generation programming languages you only define WHAT needs to be done.
Since these programming languages aren't in machine code (binary), how the hell does the computer run the program?!
To transfer languages into machine code, system software called Translators are used.
There are 3 types of translators :
Assembler : This turns assembly code into machine code.
Compiler : If a programming language uses a compiler, it means that the code needs to be compiled before it is run. A compiler links all of your source files and turns them into object code. This can then be turned into an executable file, which is composed of binary.
Examples of languages that use a compiler : Java, C, C++, C#
Interpreter : An interpreter reads the source code line by line and executes it on the go.
Examples of languages that use an interpreter : Python, Ruby,
Compiler vs Interpeter vs Assembler(very important):
Compiled :
- Produces executables.
- Will run large programs very quickly.
- The machine code isn't difficulty to understand, so it's easier to keep intellectual property.
- Easier to debug - since the program is checked line-by-line.
- Less likely to crash a computer - doesn't run directly on the CPU.
- Uses less memory - source code only has to be present one line at a time in the memory.
- Useful for editing hardware (physical components of the computer) as you can change the values that they operate on in the main memory. BARE IN MIND: Other high-level languages such as C++ can do this too, but not on a very-specific level.
It is essential you bare these factors in mind when choosing what language you want to uptake - ask yourself "What do I want to use it for?"
Syntax of programming languages and What they do
Unfortunately I cannot answer this as it would take wayyyy too long. They are all very different.
What I would ask you to do is look at everything above and decide the purpose of why you are learning a language, THEN play around with it and get a feel for it and see if you enjoy it.
______________________________________________________________________
You have reached the end of the tutorial.
Thanks for reading. Hoped this helped! (Please tell me to expand on certain things if you want me to, and ask any questions if you want below).