ICDL Coding Principles (ICDL) flashcards
ICDL Coding Principles · Build recall with a focused review session.
32 cards. Read the term and the definition here. The deck at the top of this page is optional.
- Decomposition
- Breaking a large problem into smaller, more manageable sub-problems that can each be solved, tested and understood independently before being combined into a full solution.
- Abstraction
- Removing unnecessary detail from a problem so that only the features relevant to solving it are represented, making the problem simpler to model and reason about.
- Algorithm
- A finite, ordered sequence of unambiguous steps that takes input, produces output and always terminates, giving a general method for solving a class of problems.
- Pseudocode
- A language-independent, structured description of an algorithm that uses plain English and programming-style keywords but does not have to follow any real language's syntax rules.
- Flowchart decision symbol
- A diamond shape in a flowchart that represents a yes/no or true/false condition; two labelled arrows leave the diamond to show which branch is taken.
- Linear search
- A search algorithm that checks each item in a list one at a time from the start until the target is found or the list ends; it works on unsorted data.
- Binary search
- A search algorithm that repeatedly halves a sorted list by comparing the middle item with the target, needing roughly log2(n) comparisons instead of n.
- Sequence
- A control structure in which statements execute one after another in the order they are written, with no branching and no repetition of any statement.
- Selection
- A control structure that chooses between alternative paths using a Boolean condition, implemented with if, if-else or case statements in a program.
- Definite iteration
- A loop that repeats a known number of times, usually written as a counted for loop that runs from a start value to an end value.
- Indefinite iteration
- A loop that repeats while a condition remains true, used when the number of repetitions cannot be known in advance, such as a while loop.
- Function parameter
- A named value listed in a function's definition that receives the argument supplied by the caller, letting the same code operate on different data.
- Local variable scope
- A variable declared inside a function or block that can be accessed only within that block and ceases to exist when the block finishes executing.
- Infinite loop
- A loop whose condition never becomes false, so its body repeats forever; it usually indicates a logic error in the loop's control or update step.
- Variable
- A named storage location in memory whose value can be changed while the program runs; the name is used to read the value or assign a new one.
- Constant
- A named storage location whose value is assigned once and cannot be changed during execution, protecting data that must remain fixed throughout the program.
- Boolean data type
- A data type with exactly two possible values, true and false, used to store conditions and the results of comparisons in selection and iteration.
- Type casting
- Converting a value from one data type to another, either implicitly by the system or explicitly by the programmer, for example changing an integer into a real number.
- Modulo operator
- An arithmetic operator that returns the remainder after integer division; it is used to test for even numbers, multiples of a value, or wrapping round a range.
- Zero-based indexing
- A convention in which the first element of an array or list has index 0, so the last element of an n-item list sits at index n-1.
- Flag variable
- A Boolean variable set to true or false to record that a particular event has occurred, later used to control a decision or to end a loop.
- Test plan
- A document listing the test cases to be run, each with its input data, its expected output and the reason that particular case was selected.
- Black-box testing
- Testing a program only through its inputs and outputs, without seeing the internal code, so the tests reflect what an end user would experience.
- White-box testing
- Testing based on knowledge of a program's internal structure, with cases designed to execute specific statements, branches and paths within the code.
- Boundary data
- Test data lying on or just outside the edges of a valid range, such as the minimum, the maximum, and one step beyond each of those limits.
- Erroneous test data
- Invalid data deliberately entered to check that a program rejects it or handles it gracefully, for example letters typed into a field that expects a number.
- Trace table
- A table with one column per variable and one row per executed step, filled during a dry run to record how each value changes through the algorithm.
- Syntax error
- A breach of the programming language's grammar rules, such as a missing bracket or a misspelled keyword, which prevents the program from compiling or being interpreted.
- Logic error
- A mistake in the algorithm or its implementation that lets the program run to completion but produce incorrect output, such as testing less-than instead of less-than-or-equal.
- Runtime error
- An error that happens while the program is executing, such as dividing by zero or using an index outside the array, and which often stops the program.
- Breakpoint
- A marker set on a line of code in a debugger that pauses execution when that line is reached, letting the programmer inspect variables at that moment.
- Internal documentation
- Explanations written inside the source code itself, including comments, meaningful identifier names and consistent indentation, to help anyone reading or maintaining the code.