Defensive Design: Producing robust programs: Computer Science: GCSE (9:1)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/15

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

16 Terms

1
New cards

Robust Program

Software that is built so it continues to work despite invalid input, user errors, hardware problems and cyberattacks by employing defensive design techniques and appropriate testing

2
New cards

Defensive design

Designing a program to be robust, planning for all possibilities or contingencies, anticipating misuse and using authentication to prevent unauthorised access

3
New cards

Commenting

Adding descriptions of code to a program, which improves maintainability, making it easy for others to understand and change

4
New cards

Indentation

A readability technique, moving code to the right to show where a block of code starts and ends. Mandatory in Python

5
New cards

Maintainability

Making code easier to follow and fix with comments, indentation and meaningful identifiers for variables and data structures

6
New cards

Identifier

The name chosen for a variable, data structure or subprogram. It should follow naming conventions and be meaningful e.g. temperature or calc_average, not just t or calc.

7
New cards

Naming conventions

House rules for naming subroutines, functions and variables to ensure maintainability

8
New cards

Validation

Checking an input value is reasonable, for example a number falls within a sensible range or the an email address has the correct format, it prevents runtime errors

9
New cards

Range check

A type of validation where the input value must fall within two bounds e.g. age must be between 0 and 150

10
New cards

Length check

A type of validation where the input value must have the right number of characters, e.g. a phone number must have 11 digits

11
New cards

Presence check

A type of validation where the input value cannot be left blank, there must be data there

12
New cards

Format check

Validation type that checks that the correct combination of characters has been entered. For example a postcode must match aa## #aa e.g. CM12 8UU

13
New cards

Lookup check

Where the input is validated against an allowable list of values e.g. a country must be in the list [England, Scotland, Wales, NI]

14
New cards

Authentication

Verifying the identity of someone, usually with a password. If a second method is used, e.g. text message, this is "two factor authentication" or 2FA

15
New cards

Subprogram

A block of instructions that completes a specific task. It can be a function or procedure. Breaking a large program into these improves maintainability

16
New cards

2FA

Two-factor authentication, making a login system more secure by adding a second method, such as a text message or code generator app, as well as a password