Programming Terms

A List of Basic Programming Terms:

Here are the definitions for some basic programming terms, with usage examples. These terms are applicable to most programming languages.

I’ve tried to keep the definitions as simple as I can. This means that some definitions will be missing details and nuances, but they are correct in a general sense. For the practical purposes of a beginner programmer, the minor technicalities aren’t that important.

Where a term from this list is used in a definition, it will link to the term and look like this. Where a term can be used as both a noun and a verb (e.g. assignment/assign), I’ve only included a single definition – both usages should be deducible from the one definition.


A step-by-step procedure to achieve a specific goal. Can be implemented with code.

Example: I used the quick sort algorithm to sort the array alphabetically.


A value that is passed into a function when it is called. Arguments are said to be “passed” into a function, and functions are said to “take” arguments. Also known as a “parameter.”

Example: That function takes two arguments


A type of value that contains a sequence of other values.

Example: I put all our names into an array of strings.


The act of putting a value into a variable.

Example: I assigned the number 22 to the age variable.


A mistake in a program.

Example: There must be a bug because the output is wrong.


To run the code in a function. Also referred to as “running,” “executing,” or “invoking” a function. For the noun, see function call.

Example: I called the rand function and it returned 42.


A type that can be defined by the programmer. Classes are defined in order to create objects of that class.


A program that converts code into an executable, and checks that the syntax is correct. Sometimes compilers convert code into other code.

Example: The compiler is giving me an error, so I must have incorrect syntax somewhere.


A variable that never changes its value.

Example: The PI constant has the value 3.14.

Data Structure

A value that contains other values.

Example: Arrays are one kind of data structure.


To investigate and fix bugs.

Example: I spent all day debugging a complicated error.


Code that declares that something exists – usually a variable, function or a class. A declaration might not fully define the thing it is declaring. E.g. a constant may be declared to exist, without actually defining what it’s value is. Not all programming languages allow for declarations.

Example: My code won’t compile because I wrote a function declaration, but I forgot to write the actual function.


Code that fully implements something – usually a variable, function or a class. The code that implements a class is called the “class definition.” The code that implements a function is called the “function definition.”

Example: The function wasn’t doing what I expected, so I had a look at its definition.


A float that can represent a wider range of numbers than a normal float. Short for “double-precision floating-point number.”

Example: The number was so tiny I had to use a double instead of a float


Synonym for run.

Example: I can’t execute my program because it won’t compile.


A type of value that represents numbers with fractional parts. Short for “floating-point number”.

Example: The value 3.14 is a float.


A piece of code that is not run until it is called. Functions take zero or more arguments. When a function finishes running, it returns a return value back to the code that called it.

Example: I wrote a function that takes an array of numbers as an argument, and returns the average.


To write all the code to complete something – usually a function or a class.

Example: I finished implementing those functions.


Synonym for object.

Example: I created an instance of the Person class.

Instance Variable

A variable that is attached to an object. Also known as a “member variable” or just a “member.”

Example: On the tom object, I assigned the value "Tom Dalling" to the name instance variable.

Last updated