Computer Languages and Representations Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a factor of the Software crisis and when did the Software crisis begin?

A

Began - 1960s

High cost of producing software - software costs have been rising as hardware costs have been falling

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

How are Programs represented and Computation implemented in:

  1. Functional Programming
  2. Logic Programming
  3. Finite State Machines
A
  1. Programs are represented by expressions
    Computation is represented by reduction
  2. Programs are represented by clauses
    Computation is represented by proof
  3. Programs are represented by state machines
    Computation is represented by transitions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the foundations in Functional and Logic programming?

A

Functional Programming - lambda calculus

Logic Programming - first-order logic

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

Define a Function

A

A function transforms information recieved by inputs to information transmitted by output.

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

What are arguments and results in functions?

A

Argument = Inputs
Results = Outputs

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

What is a must for an equation to apply?

A

Argument must match the pattern for an equation

(Any argument matches a variable pattern)

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

What is a Pattern?

A

A pattern may describe the structure of the argument and name its components

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

What is a Guard?

A

A guard is a Boolean expression that must be true for the equation to apply.

(Guards often work with patterns)

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

Define “otherwise”

A

A special final guard that is always true.

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

How are functions used in programming?

A

The function f to an argument x is written as f x.

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

What is a Type?

A

Set of values with the same usage and behaviour.

(All of the values in one of these sets are the same kind of thing such as an integer)

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

What is a Type System?

A

The fundamental purpose of a type system is to prevent errors during the execution of the programs, by ensuring types match correctly.

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

What is Type Checking?

A

Ensures types are used consistently, and that these errors are avoided.

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

Define Static Type Checking

A

Happens before program execution

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

Define Dynamic Type Checking

A

Happens during program execution

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

What is a negative of Local Defintions?

A

Having all function at the top level of a script can lead to name space pollution - clashes caused by reuse of the same name.

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

What is a Where Definition?

A

A where definition allows one to name a value, and to use it in an expression.

18
Q

What is a Let Definition?

A

A let definition allows one to name a value, and to use it in an expression.

19
Q

What are the steps for Polya’s heuristic strategies?

A
  1. Understand the problem
  2. Devise a plan
  3. Carry out the plan
  4. Look back and reflect
20
Q

Explain Understanding the problem in Polya’s heuristic strategies.

A

Involves careful study. May seem obvious, but failure to understand the problem often explains a failure to solve it.

21
Q

Explain Devising a plan in Polya’s heuristic strategies.

A

Involves identifying calclulations, computations or constructions that may be performed in order to obtain the solution

22
Q

What are 3 key questions when Devising a plan?

A
  • Did you use all the data?
  • Did you use the whole condition?
  • Could you use a related problem, solved before?
23
Q

Explain Carrying out the plan in Polya’s heuristic strategies.

A

Involves performing the steps in sequence to give the solution.

24
Q

What are 2 key questions when Carrying out the plan?

A
  • Can you see each step is correct?
  • Can you prove each step is correct?
25
Q

Explain Reflecting in Polya’s heuristic strategies.

A

Taking time to consider what worked and what didn’t. The insights gained may make it easier to find solutions to future problems

26
Q

What are 3 key questions when Reflecting?

A
  • Can you check the result?
  • Can you check the argument?
  • Can you use the result/method for some other problem?
27
Q

What is a design pattern?

A

It captures the idea of a good solution to a common design problem

They can make novices look like experts.

28
Q

What is the Generate-and-select design pattern?

A

Generator construct a large number of values that might be solutions to a problem.

Selector filters out those values that are solutions to the problem.

29
Q

What is the productivity paradox?

A

You can see computer age everywhere but in the productivity statistics

30
Q

What are the three explanations of the productivity paradox?

A
  1. Uneven/concentrated gains
  2. Implementation lags
  3. Mismeasurement
31
Q

Explain Uneven/concentrated gains in relation to the productivity paradox.

A

The gains are in few productive firms and sectors with limited weight in the overall economy.

32
Q

Explain Implementation lags in relation to the productivity paradox.

A

It takes considerable time for a new technologies to achieve critical mass, or for necessary complementary ones to appear.

33
Q

Explain Mismeasurements in relation to the productivity paradox.

A

Adopting new technologies can lead workers to move on from more productive adopting sectors to less productive ones, and so to negligible aggregate productivity growth.

34
Q

How do Artificial Neural Networks (ANNs) work behind the scenes?

A
  1. The core ANN is trained on text from the Internet to respond to a prompt with a list of most probable next words after the prompt
  2. The core ANN is tweaked by scoring its responses to sample queries. A second NN is trained on these scores to predict the most likely one to be assigned to a prompt.
  3. The second ANN is used in reinforcement learning to adjust the weights iin the core ANN so that its outputs are even most likely to satisfy humans
  4. Sometimes, data from user responses to LLM responses is fed back to fine-tune for still better results
35
Q

What are the concerns when using the large language models?

A
  1. Copyright
  2. Education
  3. Code quality
  4. Code security
  5. Not an expert
36
Q

What is the Copyright concern when using large language models?

A

Although the code produced is the melding of that from many sources, there may still be licensing problems

37
Q

What is the Education concern when using large language models?

A

Good solutions to many assignments can be completed directly, reducing their challenge and worth

38
Q

What is the Code quality concern when using large language models?

A

No guarantee of code quality when using a large language model, and a code review will need to be conducted before code is deployed.

39
Q

What is the Code security concern when using large language models?

A

No guarantee of code security when using a large language, and a security audit will need to be conducted before code is deployed

40
Q
A