2. User interface considerations
The first port of call in defensive design is to decide on what kind of user interface to code for. There is a fine balancing act with giving the user access to all the information and abilities that they might need, while at the same time imposing limits on the things that they commonly get wrong.
Menu Driven Interface
A menu-driven user interface limits the user to being able to pick from a displayed list of choices.
The one above is a television / remote control interface. The only actions that the user can perform is to use the up-down-left-right buttons on their remote control to navigate and a 'select' button to select an option.
A menu interface can help to limit unexpected or invalid entries.
Another example are public booths with a touch sensitive screen.