Programming terminology

User guide

Throughout this scheme and especially in the "live coding" videos, subject specific terminology is used extensively. The more students are exposed to the language of programming the more they will become confident with it. This also enables them to articulate problems and solutions more coherently.

Item question

Below is a glossary of programming terms suitable for GCSE and A level students.

You can use these terms and definitions to ask students, "item" questions from the block model of program comprehension during feedback conversations.

E.g. "Can you identify all the flag items in the program?"

E.g. "Can you identify an example of where a variable is initialised?"

Glossary

  • Argument: data passed into a subprogram. Enclosed in brackets when the subprogram is called. E.g. valid = is_valid(input).
  • Array: a data structure of a fixed size that holds data all of the same data type under a single identifier. E.g. names[10].
  • Assign: giving a variable or constant a value. E.g. score = score + points.
  • Block: a section of code. Usually inside a loop or selection.
  • Boolean: true or false.
  • Call: running the code inside a subprogram.
  • Casting: turning one data type into another. E.g. string into an integer. Synonymous with coercion.
  • Coercion: turning one data type into another. E.g. string into an integer. Synonymous with casting.
  • Condition: the comparison of one or more data structures. E.g. x < y. The outcome is true or false.
  • Constant: a value that can never change. Synonymous with fixed value variable.
  • Crash: when the program stops running unexpectedly.
  • Data type: Boolean, integer, float/double/decimal or string. The type of data held by a variable or constant.
  • Data structure: an organised store for data in memory - variable, constant, array, list etc.
  • Decomposition: breaking a problem down into smaller, manageable sections to make problem solving easier.
  • Decrement: subtract one from a variable. E.g. index = index -1 / index--.
  • Definition: identifying the start of a subprogram. E.g. def output / static void output.
  • Declare: the first reference to data structure. Often includes the data type. E.g. int score.
  • Enumerate: initial data for an array or list assigned when the structure is declared. E.g. valid_inputs = {'y','n'}
  • Execute: to start processing the instructions in a program. Synonymous with run.
  • Exception: a run-time error happens because of a special or unforeseen situation happening. E.g. division by zero, file not found etc.
  • File: data held on permanent secondary storage. I.e. on the SSD.
  • Flag: a variable that can only be either true or false. Also known as a Boolean data type.
  • Float: a number with a decimal component. E.g. 1.5. Synonymous with real. Double and decimal are also used in C#.
  • Function: a subprogram that returns a value. May take parameters.
  • Higher-order data structure: a data structure built from smaller data structures. E.g. stack, queue, graph, tree.
  • Identifier: the name of a subprogram, variable, constant or data structure.
  • Increment: add one to a variable. E.g. index = index + 1 / index++.
  • Initialise: giving a variable or constant a value for the first time. E.g. score = 0.
  • Integer: a whole number. E.g. 0, 1, 2, 3 etc.
  • Iteration: A definite loop where the code executes on each element of a data structure and doesn't require a condition to be met. This definition is not widely accepted beyond Pearson Edexcel specifications. It can also be used to simply mean repeating a section of code.
  • Library: a set of functions external to the program that can be included within the program extending the commands.
  • List: a data structure of a variable size that holds data of mixed data types under a single identifier. E.g. names = ['Craig, 'Dave'].
  • Logic error: the code runs but it does not produce the expected result.
  • Loop: a section of code that repeats more than once. Can be a repetition (while) or an iteration (for).
  • Modulus: the result of a modulo operator being applied to two values. E.g. 7 % 2 = 1.
  • Nesting: when one selection or iteration is written inside another. E.g. an if statement inside an if statement.
  • Operator: can be mathematical: + - * / ^ integer division, modulo %, or logical: < <= == >= >, or Boolean: OR, AND, NOT.
  • Parameter: variable assigned in subprogram definitions passed in from other parts of the program. Enclosed in brackets in the subprogram definition.
  • Parenthesis: brackets () used to signify arguments, parameters and set order of precedence.
  • Procedure: a block of code used for problem decomposition. May take parameters but does not return a value.
  • Repetition: An indefinite loop in which a block of code is executed until a condition is met. E.g. while x < 10.
  • Selection: branching of code to another program statement depending on the outcome of a condition. E.g. if x < 10:
  • Sequence: one instruction after another.
  • String: a data type used to represent text. A sequence of characters. E.g. "Craig".
  • Syntax error: the code cannot run because the rules of the language have been broken. E.g. mis-spelt command, missing bracket etc.
  • Qualifier: the character used to denote data. E.g. quotes around a string: name = "Craig".
  • Real: a number with a decimal component. Synonymous with double/decimal/float.
  • Repetition: repeating a block of code a given number of times. E.g. while x < 10. Synonymous with loop.
  • Return value: the result of a function given back to the function call. E.g. return score.
  • Run: to start processing the instructions in a program. Synonymous with execute.
  • Subprogram: a smaller defined part of the program. Can be a procedure or function. Used for problem decomposition.
  • Variable: an area of memory holding a single value of a single data type.

Different uses of variables

Ten roles a variables can have in a program. You can use these for class activities. E.g. "Identify the gatherer in this program."

  1. Bester: stores the highest value found so far in a loop. Also known as "best so far", or "wanted".
  2. Fixer: the value is never changed after initialisation. Known as a constant.
  3. Follower: Stores the old value of another variable before it is changed.
  4. Gatherer: Stores the sum of values so far in a loop.
  5. One-way flagger: a Boolean variable which once changed cannot get its original value again. Often used for validation.
  6. Organiser: a variable that is used for reorganised elements. Often used to store a sorted list.
  7. Recenter: stores the latest value input.
  8. Stepper: the value increments (goes up) or decrements (goes down) in a loop.
  9. Temper: a variable that is only needed for a very short time. Often used to swap two values.
  10. Walker: a variable used to traverse a higher-order structure. Often used to store a current node in a graph or tree.

Registered in England and Wales: 10442992

VAT Number: 290 9845 58

Telephone: 01452 947500

Email: admin@craigndave.co.uk

Bett Awards 2024 Finalist