Defensive Design

Lesson Instructions

Watch and follow the YouTube video,  the lesson contains three parts:

Defensive Design Full Lesson Video.mp4

Task - Validation Task

Task - Input Sanitisation Task

Input Sanitisation Task

Task - Exam Questions - Deliberate Practice

Exam Questions - Defensive Design

Mark Scheme

Question 1

Input sanitisation (1 mark)

 ...cleaning up input data / removing unwanted data

 ...by example (e.g. removing special characters / preventing SQL injection)

Validation (1 mark)

• ...checking whether input data should be allowed / is sensible / follows criteria

• ...by example (e.g. goals cannot be less than 0)

Verification (1 mark)

• ... checking whether data has been entered correctly

• ...by example (e.g. double entry / visual check)

Authentication (1 mark)

• ...ensuring only allowed / authorised users can gain access

• ...by example (e.g. usernames /passwords)

Maintainable code (1 mark)

• ...to allow other programmers to understand the code

• ...by example(e.g. comments, indentation, meaningful variable names)

Question 1 (b)

1 mark per bullet max 1

Do not accept "easier to understand"

Question 2 (a)

Question 2 (b)