2.3 Producing robust programs

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/31

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:00 AM on 5/3/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

32 Terms

1
New cards

Defensive Design

Refers to designing and creating programs which are able to handle unexpected or erroneous data and/or inputs by anticipating misuse.

2
New cards

Importance of Defensive Design

Ensures the number of bugs in a program are reduced, the program behaves as expected regardless of user input, and any possible errors are accounted for.

3
New cards

Authentication

The process of determining the identity of a user, usually through a username and password.

4
New cards

Input Validation

The process of checking that data is appropriate for its use, so that it can be correctly processed without any errors.

5
New cards

Presence Check

Ensures that data has been entered and not blank.

6
New cards

Range Check

Ensures that an input falls within the required range.

7
New cards

Length Check

Ensures a specified number of characters have been entered.

8
New cards

Maintaining Programs

It is incredibly important to maintain programs to ensure that they function as intended, are secure, and can be improved over time.

9
New cards

Sub-programs

Functions and procedures that help to break down a program into manageable chunks, allowing for code reuse and easier testing.

10
New cards

Naming Conventions

All variables, functions and procedures should be appropriately named to signify their purpose, making it easier to track their roles.

11
New cards

Indentation

Required for the syntax of most programming languages and helps to visualize and understand what sections code belongs to.

12
New cards

Commenting

Using comments to describe what each line of code or function is responsible for, facilitating easier understanding later.

13
New cards

Density Calculation

The density is calculated by dividing mass by volume.

14
New cards

Comments in OCR Pseudocode

Comments in OCR Pseudocode are written using '//'. The hash key, '#', is used in Python.

15
New cards

Purpose of Testing

All programs should be tested to ensure that they are robust, secure, and work as intended.

16
New cards

Destructive Testing

Testing is usually destructive, meaning that you should aim to find as many errors through rigorous testing, rather than just showing that a program works.

17
New cards

Iterative Testing

This type of testing happens throughout development, usually testing individual sub-programs as they are created.

18
New cards

Final Testing

Testing which takes place at the end of development, which aims to test the functionality of the entire program and check for any bugs.

19
New cards

Alpha Testing

Alpha testing is carried out by developers in-house to fix any remaining issues.

20
New cards

Beta Testing

Beta testing is performed by groups of real end-users, commonly seen in large software releases such as in games.

21
New cards

Syntax Errors

Syntax errors are errors which break the grammatical rules of the programming language, which stop the program from running.

22
New cards

Common Syntax Errors

Common syntax errors include: Missing brackets, quotation marks or colons; Misspelling keywords, e.g prnt instead of print; Using variables which have not been declared; Incorrect indentation.

23
New cards

Logic Errors

Logic errors are errors in the program's design or logic, which cause it to produce an unexpected or incorrect output, even if the program runs or the syntax is correct.

24
New cards

Example of Logic Error

In the example, speed should be calculated as: speed = distance / time.

25
New cards

Test Data

Types of Test Data include Normal, Boundary, and Erroneous.

26
New cards

Normal Test Data

Typical input, e.g. 5.

27
New cards

Boundary Test Data

On the edge of valid range, e.g. 1 and 10.

28
New cards

Erroneous Test Data

Invalid input, e.g. -1, eleven, 'abc'.

29
New cards

Selecting Suitable Test Data

You should be able to identify appropriate test data for a given input field and justify why it's used.

30
New cards

Refining Algorithms

After an algorithm has been developed and tested, it may be refined over time to improve its functionality or its capacity.

31
New cards

Changes in Algorithm Refinement

Changes may include fixing problems found throughout testing, adding additional functionality, or improving existing functionality.

32
New cards

Efficiency in Algorithms

Making the program more efficient by removing unnecessary components.