Robust Programs Flashcards

1️⃣ Familiarise yourself with the flashcards:

  • Look through all the flashcards to see what's on both sides.
  • Make sure you understand the information on each card. If something's unclear, click the link to the revision notes at the bottom of the page for more details.

2️⃣ Test yourself:

  • Look at the question or prompt on each card and try to remember the answer before flipping it over.
  • Check the answer and make a note of any cards you find challenging and need to go over more.

3️⃣ Consistently Review and Practice:

  • Use spaced repetition: spend more time on the cards you struggle with and go over them more often.
  • Regularly review all the flashcards to help you better understand and retain the information over time.

Note: We may include questions that have multiple correct answers. It's useful to remember specific examples to understand these concepts better.

PERSONALISED 1-TO-1 TUTORING

Need more help on this topic? Get 1-to-1 support

Get support with clear explanations, practice and feedback (Ages 5 to 16).

  • DBS-checked tutors
  • Flexible times
  • Parents can be updated

Want an ad-free experience? Subscribe to remove ads

What is a robust program?

A program that keeps working safely and correctly, even with wrong or unexpected input.

What is defensive design?

Planning code to stop errors and misuse before they happen.

What is input sanitisation?

Cleaning data by removing or changing unsafe characters before using it.

What is input validation?

Checking data meets rules, like type, length, or range, before you use it.

Why use named constants instead of magic numbers?

They make code clearer and safer to update in one place.

What is whitelisting in input checks?

Only allowing inputs that match a list of safe values or patterns.

What is blacklisting in input checks?

Blocking inputs that match a list of known bad values or patterns.

Which is usually safer: whitelisting or blacklisting, and why?

Whitelisting, because it only lets known safe input through; blacklists can miss new bad input.

What does maintainability mean in programming?

How easy it is to read, fix, and improve code over time.

How do comments help make code maintainable?

They explain what the code does, so people can change it without breaking it.

How does indentation help a robust program?

It shows the code blocks clearly, making bugs easier to spot and avoid.

Why use subroutines (procedures or functions) in a robust program?

They split the program into small, reusable parts that are easier to test and fix.