Mapa mental
Producing robust programs
Conteúdo do mapa
Producing robust programs
Validation
- Checking data to make sure it is reasonable
- Range check
- An age should be in a specific range
- Format check
- E-mail addresses should follow a specific format. (Regular expression)
- Presence check
- Checking to make sure data has been entered.
- Type check
- Checking to see if the data entered is a specific type, for example, checking if a number has been entered.
Authentication
- Ensuring that someone is who they say they are.
- Password
- PIN number
- Secret question
- Physical object
- Swipe card, biometrics, ...
Maintainability
- Ensuring that the code is readable and maintainable
- Comments
- Used to label what a part of the code does. For example: '// this is a loop'
- Sensible variable names
- Making sure variable names make sense. For example, 'userName' is a better than 'x'
- Indentation
- Using indentation to show separate blocks of code. (see example in the note)
- // Example Java code for(int i = 0; i < 10; i++) { System.out.println("The number is: " + i); }
- Using indentation to show separate blocks of code. (see example in the note)
Sanitization
- Removes any potentially malicious data from an input.
- Input sanitization is a (poor) method of preventing SQL Injection. By removing SQL queries from an input, you can mitigate SQL Injection.
Informações
- Descrição
- Year 8 Computing Mapa Mental sobre Producing robust programs, criado por joe thompson em 16-11-2020.
- Criado por
- joe thompson
- Visualizações
- 0
- Avaliação
Mais sobre Robust Programming and Testing