Game Development Reference
In-Depth Information
2.2.2 Programs
In summary, a program is a long list of instructions to change the memory. However,
the program itself is also stored in memory. Before the instructions in the program
are executed, they are stored on a hard disk or a DVD, or a network drive, or a
USB flash disk, or any other storage medium. When they need to be executed, the
program is moved to the internal memory of the machine. In principle, it is possi-
ble that a program contains instructions that change another part of the program,
since the program is also stored in memory. Although this approach was in fashion
for a while—mostly as a failed attempt to write artificially intelligent programs—
programs like this proved to be extremely difficult to write.
For now, let us assume that a program resides in a part of the memory that is
isolated from the memory that is used/changed by the program. Before the program
is executed, it is placed in the memory by another specialized program, such as an
operating system .
Programming is the activity of writing programs. Programming certainly is not
an easy task, and you need a good sense of logical deduction since you need to be
constantly aware of what your program will do with the memory later on, when it is
executed.
2.3 Programming Languages
The instructions that, combined together, form the program need to be expressed
in some way. We could try to do that with hand gestures, or by making strange
sounds, however this is very hard for a computer to understand. Even typing these
instructions in plain English is not something that the computer can grasp, as we
have seen in the introduction. In practice, the instructions are coded as text, but we
need to follow a very strict way of writing them down. There are many different
ways of doing that, and each way is defined by a set of rules that determines how we
should write down the instructions. We call such a set of rules a programming lan-
guage . Many programming languages exist, because every time somebody thinks of
a slightly better way of expressing a certain type of instruction, this soon becomes a
new programming language. It is difficult to say how many programming languages
exist, because that also depends on whether you count all the versions and dialects
of a language, but suffice to say that there are thousands of them.
Fortunately, it is not necessary to learn all these different languages, because
there are many similarities between them. However, in the last sixty years, a lot has
happened. In the early days, the main goal of programming languages was to use the
new possibilities of computers. However, more recent languages focus on bringing
some order in the chaos that writing programs can cause. Programming languages
that share similar properties are said to belong to the same programming paradigm .
A paradigm refers to a set of practices that is commonly used.
Search WWH ::




Custom Search