Programming Flashcards

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

What is Modulisation?

A

The process of dividing a program into separate sub-programs

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

What is a built in function?

A

Functions that are bundled into a programming language by default, such as print in python

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

What are user defined functions?

A

Functions made by a developer for a program

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

What are anonymous /lambda functions?

A

Functions that aren’t declared using the def keyword in python

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

What’s the difference between a method and a function?

A

A method is a function which is also part of a class, a function however is standalone and not restricted.

All methods are functions, but not all functions are methods

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

How is an anonymous function called in python?

A

lambda [parameter(s)] : expression

An example would be:

    adding = lambda a,b : a + b

print(adding(2,3))

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

Why are lambda/anonymous functions used?

A

Lambda is another way of writing a small expression as a function that’s not named. Long story short, it’s quicker, and saves on time and space

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

What is Decomposition?

A

Breaking a complex problem into smaller sub-problems

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

What are the advantages of decomposition?

A

Different people can work on various sub-tasks, which can be combined to create the final solution. Maintenance of the final program can be completed at a modular level, simplifying it

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

What are the disadvantages of decomposition?

A

The modules may not combine correctly to solve the initial problem. If the initial problem isn’t fully understood it is difficult to decompose

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

What are the 4 steps of decomposition?

A
  1. Identify and describe the problems and processes
  2. Break down the problems into separate tasks
  3. Describe the tasks and subtasks
  4. Communicate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is abstraction?

A

The process of removing details and/or characteristics that aren’t needed, to focus on what is essential

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

What’s an example of abstraction?

A

The London underground map

Must say map, accept anything reasonable besides this

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

What are the 2 main steps of abstraction?

A
  1. Information needed to solve a problem should be identified.
  2. Carry out abstraction to filter any unnecessary information
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What should each layer of abstraction show/contain?

A

Inputs, Outputs, Variables, Constants, Key processes, Repeated processes

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

What’s a pattern?

A

Patterns are things that are common between problems or programs

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

What is the main reason for pattern recognition in programming?

A

By identifying and recognising patterns, it is possible in code to locate pre existing module(s) of code

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

What are the steps of pattern recognition?

A
  1. Identifying and interpreting common elements in problems or systems
  2. Identifying and interpreting common differences in problems or systems
  3. Identifying individual elements in the patterns
  4. Describing patterns that have been identified
  5. Making predictions based on identified patterns
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the point of identifying patterns in code?

A

To improve the efficiency of code and save time

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

How does facial recognition use pattern recognition?

A

Software identifies and confirms someone’s identity using photos, videos or in real time, using the patterns with someone’s face.

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

What is Pseudocode?

A

An informal programming description showing flow through a process

23
Q

What are the benefits of Pseudocode?

A
  1. It makes it really simple to communicate code to various developers.
  2. It’s very simple to follow even with minor errors.
  3. Clearly explains each line of code.
24
Q

Who uses Pseudocode?

A

Mainly, development teams that know various different languages

25
What's a disadvantage of Pseudocode?
It can still look fairly complicated, and contains large amounts of information that are redundant to them and just used for development and maintenance.
26
What is a function?
A named, reusable block of code
27
How do you import a module in python?
import [MODULE]
28
Why do we use functions?
To prevent redundant and repeated code
29
What are the types of tests used to find issues that need solving?
Concept testing, Unit testing/White box testing, Performance testing, System testing
30
What is regression testing?
Confirming if any changes to the system have had any adverse effects on existing features
31
What is automated testing?
Specialised testing that can be automated and is repetitive, an example of regression testing
32
What is concept testing?
Used to understand the strengths and weaknesses of a concept. Only interested stakeholders are provided with information on the concept.
33
What is unit testing?
Individual components/units are tested. Designed to validate that all modules functions as intended.
34
What is performance testing?
Used to test the speed, response time, reliability, scalability and resource use.
35
What is system testing?
Complete system testing with all software fully integrated. Final test carried out to verify the system meets the specification.
36
What are the types of system testing and their definitions?
1. Usability/Acceptance testing 2. Load/Stress testing 3. Regression testing 4. Functionality testing 5. Migration testing 6. Compatibility testing 7. Boundary testing 8. Fuzz testing
37
What is functional testing?
Testing to confirm the functionality of a software system against the functional requirements
38
Describe functional testing.
Used to confirm functionality of a software system against functional requirements. Each function of the software is tested by providing an input, then comparing the output against the functional requirements.
39
What needs to be considered when selecting testing tools and why?
1. Compatibility with OS’s 2. Versatility 3. Compatibility with various platforms 4. Test creation 5. Maintenance 6. Cost
40
What is boundary testing?
Consists of a series of tests using boundary values. Tests aspects of a program with the relevant boundary values.
41
What is merge sort?
A ‘divide and conquer algorithm’ that breaks down a problem into many subproblems recursively until they are simple to solve
42
Explain the basic steps of merge sort.
1. Split the array in half 2. Call merge sort on each half to sort them recursively 3. Merge both sorted halves into a single sorted array
43
Once a list is in individual elements, how is it sorted and placed back together?
Each element is compared to the one next to it to put it back into groups of 2, the one that is the lower value is placed on the left most side.
44
What are the two main searching types?
Linear and binary
45
How does linear search work?
Starting at the beginning of the dataset, each item is examined until a match is made.
46
How does a binary search work?
The search is repeatedly divided in half. If the value of the middle terms are checked and depending if the value being looked for is in the left or right half, the half that the answer is not in is removed.
47
What's the biggest drawback of binary search?
The list must be sorted before searching
48
What's the main benefit of binary search over linear search?
It's much faster
49
Why might you have to use linear search?
If the list is unsorted
50
What is RCA?
A process used to find the 'root' issue that caused a problem to occur
51
Why is RCA used?
To understand the problem, its cause, and how to solve it.
52
Why is RCA needed?
Because there’s no point in solving a constantly reoccurring problem without figuring out what’s causing it.
53
What is the most popular RCA method?
The 5 whys