DESIGN, TESTING, IDEs Flashcards

(22 cards)

1
Q

what do structure diagram show

A

smaller tasks of a larger program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are the advantages of using structure diagrams

A
  • coding can be easier as you’re writing code to carry out simple tasks
  • many programmers can work on 1 program as each module can be written independently
  • easier to test as each module can be tested
  • individual sub programs and modules can be fixed and updated without affecting the rest of the program
  • able to reuse sub programs and modules in programs you write in the future
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

why should your program be well-maintained

A

makes it easy for other programmers to understand what the code does

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how can you make your program well-maintained

A
  • comments using #, useful to explain whats happening
  • indentation, to separate different statements in a program
  • naming variables appropriately, helps to understand what they do and can keep track of it easily
  • using sub programs, help other programmers to see different parts of a program work
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is defensive design used for

A

to ensure program functions correctly and never produce errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is input validation

A

checking if data meets certain criteria before passing it into the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how can you protect your program using defensive design

A
  • anticipate how users might misuse the program and preventing it
  • ensure code is well-maintained
  • reduce number of errors by testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

name 2 examples of input validation

A

length check, range check

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how does authentication protect your program

A

confirms identity of user before they are allowed to access certain pieces of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how can you increase the security of a password-based authentication system

A
  • force users to create strong passwords and change them regularly
  • limit number of failed password attempts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is a syntax error

A

when the compiler or interpreter doesn’t understand something because it doesn’t follow the rules/grammar of the programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is a logic error

A

when the compiler or interpreter is able to run the program but the program does something unexpected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what are the 2 main types of testing

A
  • iterative testing (testing while being developed)
  • final testing (testing after program is finished being developed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When testing data what is normal, boundary, invalid and erroneous data

A

normal = things that a user is likely to input in a program
boundary = values at the limit of what the program can handle
invalid = inputs with the correct data type that should be rejected by the program
erroneous = inputs with an incorrect data type that should be rejected by the program erroneous

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is low-level language and name 2 examples

A

source code that is tricky for humans to read and write but easy for a computer to run
machine code and assembly language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is high-level language and name 2 examples

A

source code that is easy for humans to write but computers need to translate it before hey can read and run it
python and C++

16
Q

what does a compiler do

A

translate high-level code directly into machine code

translates all of the source code at the same time to create 1 executable file

17
Q

what does a interpreter do

A

translates and runs the source code 1 instruction at a time, but doesn’t create an executable file

18
Q

what are the differences between compilers and interpreters

A
  • compilers are only need once, interpreters are need each time you want to run the program
  • compilers returns a list of errors for the entire program, interpreter will return the first error it finds and the stop
  • compilers can run the program very quickly after being compiled, interpreter runs more slowly as code is being translated while running
19
Q

what does IDE stand for

A

integrated development environment

20
Q

what is the main purpose of an IDE

A

software that provides features to help a programmer to develop their program

21
Q

what are 5 common features of an IDE

A
  • code editor (main part), where the code is written
  • output window, shows the output from a program when it is run
  • line numbering and automatic code colouring
  • error diagnostics to help find and fix errors in a a program
  • a translator (compiler or interpreter) allows source code to be understood by the computer