Programming 3- module 15) Flashcards
What do you need to be able to include as part of your process to make your code robust and secure?
Validation + authentication.
What does validation do?
Checks that a user has entered any data.
Checks data entered is within a set range.
What does verification do?
Checks for double entries.
Proofreads data.
What is double entry used for?
Entering data twice often by 2 different people to ensure no crossover- + comparing the 2 copies. Effectively doubles workload + costs more too.
What is proofreading used for?
This method involves someone checking data entered against original document. Time consuming + costly.
What types of test data are there?
Normal or typical.
Extreme or boundary.
Erroneous or invalid.
What is normal or typical data used for?
Testing if original check was set up accurately.
What is extreme or boundary data used for?
Checks that you’ve used ‘=>’ rather than just ‘>’.
What is erroneous or invalid data used for?
Checking that code is strong enough to withstand resulting input if user is malicious or not paying attention.
What are the three types of error that you may encounter?
Syntax errors.
Runtime errors.
Logic errors.
When do syntax errors occur?
When programmer fails to obey a grammar rule of the programming language they are using. Could be putting capital letters where don’t belong.
When do runtime errors occur?
A program running that comes across a problem it can’t resolve will throw, or stop with, a runtime error. Programming errors, hardware malfunctions or errors when accessing computer memory can cause this.
When do logic errors occur?
Can be most difficult kind of errors to detect + fix, as no obvious error within code. Program will be run successfully, but produces incorrect results.
What are the two language classifications?
High-level languages.
Low-level languages.
What are high-level languages?
Closest to human language, + are most recently developed. need a compiler as computer doesn’t understand them.