Defensive design section 6 Flashcards
What is defensive design
1) anticipate how uses might misuse the program
2) ensure code is maintain
3) reduce the number of errors in code
input sanitation
removing any unwanted characters before passing through the data
input validation
checking if data meets certain criteria before passing data
range check
data is within specific range
presence check
checks data has actually been entered
check digit
numerical data has been entered accurately
Format check
data has correct format
look up table
checks data values against acceptable values
length check
correct length
Authentication
confirm the identity of a user before they’re allowed to access certain places
ways to increase security
1) force users to use strong passwords
2) limit the number of failed authentication
3) ask for random selection of characer
what is a well maintained programe
makes it easy for other programmers to understand what the code does
comments
are useful for explaining what the key features of a program do
indentation
can be used to seperate different statements in the program
variables
should be named so that refer to what they actually do
What does IDE mean
integrated development environment
what is an IDE
a piece of software that provides features to help a programmer to develop their program
name the the features of the interface
code editor run time environment explorer window output window error diagnostics break point
What is a code editor, what does it feature.
where the code is written
most will have line numbering, auto-colour coding for things like strings, auto correct e.g.
What is a run time environment, how does it help with testing?
allows the code to be run quickly within the IDE
can help identify logic errors in the program
What is an explorer window
will help navigate through programs
What is an output window
to show the output from a program when it is run
What are error diagnostics, how does it help with testing?
help to find and fix errors
tell you the location of the error and suggest ways to fix it
What are break points.
common debugging tool, they can stop the program on certain lines so you can gather information like the value of variables as the program is running
what are the common features inside an IDE
translator
auto documentation
Graphical user interface (GUI)
what does the translator do
will translate the source code into machine code
what does Auto documentation do
helps with the maintenance and can extract certain features of a program
this information is stored in a separate doc
what does GUI do
helps the programmer design a user interface by building it up graphically rather than having to design it