Tooltip
These resources have been reviewed and selected by STEM Learning’s team of education specialists for factual accuracy and relevance to teaching STEM subjects in UK schools.

Producing Robust Programs

The first video is about defensive design considerations.  Data is not always entered in ways that a program might expect.  If this can be easily rectified without asking the user to re-input the data, it is known as input sanitation.  In addition, to prevent invalid data crashing a program, validation techniques are used to check data before it is processed.  This video explores these two programming techniques.

The second video is about defensive design considerations.  This video explores things beyond invalid inputs that might cause a program to crash.  These include division by zero, communication and peripheral issues as well as problems with data files.  The video also explores authentication techniques to protect against rogue data being provided by bots.

The third video explains how programmers can make their programs maintainable.  The use of comments, white-space, indentation, descriptive variable names, the use of procedures and/or functions and the use of constants are all illustrated.

The fourth video introduces the purpose and types of testing at a level suitable for GCSE.  Reasons such as bug-fixing, checking performance and usability, security and meeting the requirements are outlined.  Iterative and terminal testing are explained as two approaches to testing a program for robustness.

The fifth video illustrates the difference between syntax and logic errors using a simple Python program.

The sixth video explains a range of tests that should be performed to ensure a program is robust.  Using a simple menu created in Python as an example, these include no data, invalid data, edge data and valid data.

Resources:

https://student.craigndave.org/videos/ocr-gcse-slr2-3-defensive-design-considerations-part-1

https://student.craigndave.org/videos/ocr-gcse-slr2-3-defensive-design-considerations-part-2

https://student.craigndave.org/videos/ocr-gcse-slr2-3-maintainability

https://student.craigndave.org/videos/ocr-gcse-slr2-3-the-purpose-and-types-of-testing

https://student.craigndave.org/videos/ocr-gcse-slr2-3-how-to-identify-syntax-and-logic-errors

https://student.craigndave.org/videos/ocr-gcse-slr2-3-suitable-test-data

Show health and safety information

Please be aware that resources have been published on the website in the form that they were originally supplied. This means that procedures reflect general practice and standards applicable at the time resources were produced and cannot be assumed to be acceptable today. Website users are fully responsible for ensuring that any activity, including practical work, which they carry out is in accordance with current regulations related to health and safety and that an appropriate risk assessment has been carried out.

Information on the permitted use of this resource is covered by the Category Three Content section in STEM Learning’s Terms and conditions.