1.1. Computer glossary#
Here you will find a glossary with some of the computer terms used throughout the book. You can choose to either read them in detail now to learn what these terms mean, skim over them, or skip this page altogether and return at a later point in time when and if needed. Most of the terms will also be explained later in the book, so you can think of this page as an overview place.
You will notice, both here and throughout this book, that some terms are not unique to the computational world (e.g., terms such as function or library). Therefore, a part of the learning process will be to understand the meaning of the words within a given context.
Programming
Programming is the process of writing computer programs (sets of instructions that a computer can follow), to perform specific tasks. It involves using a programming language to create code.
Programming language
To write instructions in such as way that a computer can understand them (i.e., to write code, or to program), we use a programming language. Python, which we will use in this course, is an example of a programming language. While there are thousands of programming languages developed and available to use, some of the most popular today are Python, C, C++, C#, Rust, Java, JavaScript, PHP, R, Ruby, and Scala, among others. Once you master one language, switching to another is relatively easy because the underlying logic is usually very similar. Therefore, it is mostly a matter of learning a new syntax - the rules that structure a language.
Syntax
Syntax refers to the set of rules that define how code must be written in a programming language. It determines the correct structure and order of words, symbols, and punctuation so that the computer can understand and execute the instructions. Each programming language has its own unique syntax. Here are some examples of doing the same thing in a couple of different languages.
Python
print("Hello, world!")
JavaScript
console.log("Hello, world!");
C
printf("Hello, world!\n");
C++
std::cout << "Hello, world!" << std::endl;
Ruby
puts "Hello, world!"
Java
System.out.println("Hello, world!");
Each language uses a different syntax to achieve the same result. Although the code looks different in each example, they all have the same purpose: to display the message "Hello, world!" on the screen.
Algorithm
An algorithm is a step-by-step procedure for solving a problem using computer code. In other words, with an algorithm you are sketching what your approach to solving a problem will be. It is useful to think of the steps that will be needed before starting to write your code.
Fig. 1.2 Scheme of an algorithm for solving the problem of lamp not working.#
Script
A Python script is a file containing Python code.
You can recognize scripts by specific file extensions - just as you would recognize a Microsoft Word file by its .doc or .docx extension, you can spot a Python script by the .py extension.
To actually perform the task you programmed, you need to execute the script using Python.
Debugging
Finding errors in computer code is often referred to as catching bugs, and fixing them as fixing bugs or debugging. Debugging, therefore, means correcting errors in the code.
Historical note
Term debugging is attributed to Admiral Grace Hopper, who worked at Harvard University in the 1940s. Her co-workers found a moth stuck in the computer, thereby impeding its functioning. She famously remarked that the system needs debugging.
Fig. 1.3 The first case of a computer bug (photo source, image from the public domain).#
Package / Library
Packages are building blocks of programming. They consist of reusable pieces of code, so that you do not have to program everything from scratch (and thereby avoid “reinventing the wheel”). Sometimes, we refer to published packages as libraries. Examples of Python libraries are NumPy for scientific computing and Matplotlib for visualization.
Function
A Python function is a piece of reusable code that performs a specific task. You can either define functions by yourself (in your code) or use predefined ones, e.g., functions that come as part of Python packages (libraries).
Function that adds two numbers
def add_numbers(a, b):
return a + b
Calling (i.e., using) the function
result = add_numbers(3, 5)
print(result) # Output: 8
You will learn more on this in a later chapter.
Computer program and code
A computer program is an implementation of computer code which instructs the computer how to execute the algorithm. A program can consist of many parts, such as multiple functions, variables, and instructions working together.
def greet(name):
print("Hello, " + name)
def display_length(name):
print("The lenght of your name is:", len(name))
name = "Alice"
greet(name)
display_length(name)
Output:
Hello, Alice
The lenght of your name is: 5
This simple program consists of two user-defined functions: greet() and display_length. They both use Python’s built-in print() function to display output, and one of them also uses the built-in len() function to obtain the length of the name.
Package management
Like many things in computer world, Python packages get improved over time. As a consequence, new versions of packages are regularly released. Because a part of one package can depend on a part of another package, it is very important to keep track of used packages, their specific versions, and their dependencies. There are specialized tools for Python package management - pip and conda - which help us to avoid package version conflicts and ensure that the packages we use when working on a piece of code are compatible.
Environment
A Python environment is a setup in which a Python script is executed. For instance, if you use functions from the NumPy package in your code, (a specific version of) NumPy has to be present in the environment. Because packages can depend on each other, and because details of functions can change between versions, your code may stop working (“break”) upon package update. It is, therefore, good practice to work within environments that contain specific versions of packages needed in your code. There are also different types of Python environments: system environment, conda environment, virtual environment, and containerized environment.
Fig. 1.4 Illustration of two separate Python environments, each containing a different version of Python and different packages.#
Version control system
Version control system keeps track of changes in your code. It is extremely useful, as it allows for effective collaboration on your code and tracking changes (seeing everything that was modified in the past by you and/or your collaborators) between two commits. The most popular version control system is called Git.
Terminal, Command Line Interface (CLI), and Bash Shell
The Terminal is an application that allows communication with the operating system using Command Line Interface (CLI), which is useful for saving time and automating repetitive tasks. Unlike applications with graphical user interfaces (GUIs) - which contain buttons, sliders, and other interactive elements (think, e.g., of working on a Word file) - using the terminal requires us to enter lines of code (commands) in CLI in order to perform tasks. These commands are then executed by a shell, which is a user interface to the operating system. Different shells can be used to run commands. A default shell program used by macOS and Linux is BASH (Bourne-Again SHell), while Windows uses PowerShell.
Fig. 1.5 Terminal on macOS.#
Large Language Model (LLM)
Large Language Models are advanced AI (Artificial Intelligence) models capable of performing a wide range of tasks, including interacting with users by answering their questions, generating text, translating languages, and summarizing information. They are trained on large datasets and can both process and produce natural human language. Well-known examples of LLMs include GPT-5, Claude, and Gemini.