Unit 10 · Lesson 1
Build the idea
Start with the concept and its key vocabulary.
Defensive design anticipates what could go wrong and makes the program respond safely rather than crash or grant access incorrectly. Authentication checks identity so only authorised users proceed. In a simple programming exercise, both the username and password must match their stored values. Real systems do not store visible plain-text passwords, but the small example teaches the selection logic.
Designing a program to handle misuse and unexpected input safely.
Verifying a user's identity, commonly with a username and password.
Given permission to access a system or resource.
Removing invalid or dangerous characters from input before it is processed.