It's meant to be a general introduction to programming without teaching any actual language. The idea here is to answer a lot of the questions that people have before they start. Without further ado:
Introduction to programming
What is programming?
Programming is the act of developing computer programs. You do this by writing, testing and debugging source code. This source code is written in a programming language, a language that the computer can understand.
What is a programming language?
A programming language is a machine-readable language used to tell a computer what to do.
Code: Select all
Show the text "Hello World" on the screen
Code: Select all
show "Hello World"
What makes a programming language?
There are many different programming languages. If there was one programming language that worked best in every case and everybody agreed on, there wouldn't be so many. There is just no end all-be all programming language (yet). So what makes a programming language, exactly?
Compilation/interpretation
There are different ways to run a program. Programs can be compiled, which means they are made into an executable file, or they can be run with the help of an interpreter. An interpreter
Type system
Programs deal with a lot of data. The previous example showed one form of data: text, another example is a number. Most languages are typed. This means that the language makes a distinction between different types of data. For example, they won't allow you to divide a number by text. There are different approaches to this:
- Statically typed languages
In static typing, all data has their type determined before the program is run. If there is an error such as a number being divided by text, the program is simply invalid and it won't run at all.
Manifestly typed: all types have to be written out explicitly
Type-inferred: the
Dynamically typed languages
In dynamic typing, types are determined at runtime. If you divide a number by text somewhere in your program, you won't be alerted of it until it happens.
In a high level language you could say "Bitch, make me a sandwich", while in a low level language you would have to define who you are, who the bitch is, what a sandwich is and how to make one.
Some languages are designed to be easily understood by humans, others are designed to be easy for the computer to interpret.
Paradigm
What do I do now?
Now that you know what a programming language is, you may learn one.